Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.SimpleData.format()


        SimpleData val = data.getSimpleValue(dataName);
        if (val == null)
            return;

        try {
            Element xml = XMLUtils.parse(val.format()).getDocumentElement();
            augmentHierarchy(hier, node, xml);
        } catch (Exception e) {
        }
    }
View Full Code Here


            String dataName = (String) i.next();
            if (!dataName.endsWith(ID_DATA_NAME))
                continue;
           
            SimpleData sd = data.getSimpleValue(dataName);
            if (sd != null && taskListID.equals(sd.format())) {
                String taskListName = dataName.substring(
                    MAIN_DATA_PREFIX.length(),
                    dataName.length() - ID_DATA_NAME.length() - 1);
                if (EVTaskListData.exists(data, taskListName)
                        || EVTaskListRollup.exists(data, taskListName))
View Full Code Here

        String dataName = DataRepository.createDataName
            (globalPrefix, ID_DATA_NAME);
   
        SimpleData d = data.getSimpleValue(dataName);
        if (d != null) {
            taskListID = d.format();
        } else {
            // This task list doesn't have a unique ID yet.  Generate one.
            // It should be a value that needs no special handling to
            // appear as an XML attribute.
            int i = Math.abs((new Random()).nextInt());
View Full Code Here

        String globalPrefix = MAIN_DATA_PREFIX + taskListName;
        String dataName = DataRepository.createDataName
            (globalPrefix, METADATA_DATA_NAME);

        SimpleData d = data.getSimpleValue(dataName);
        String val = (d == null ? null : d.format());
        if (StringUtils.hasValue(val)) {
            try {
                metaData.load(new ByteArrayInputStream(val.getBytes("ISO-8859-1")));
            } catch (Exception e) {
                e.printStackTrace();
View Full Code Here

        String dataName = globalPrefix + "/" + SNAPSHOT_DATA_PREFIX + "/"
                + snapshotId;
        SimpleData d = data.getSimpleValue(dataName);
        if (d != null && d.test()) {
            try {
                return new EVSnapshot(snapshotId, d.format());
            } catch (Exception e) {
                logger.warning("Couldn't open snapshot '" + snapshotId
                        + "' for task list '" + taskListName + "' - aborting");
            }           
        }
View Full Code Here

        SimpleData result = null;
        if (value != null)
            result = value.getSimpleValue();

        return (result == null ? null : result.format());
    }

    private SaveableData getData(SizeMetricApiRequestData request,
            String dataElemName) {
        String dataName = DataRepository.createDataName(request.targetPath,
View Full Code Here

    private String getProcessString(String stringName, boolean tryGlobal) {
        SimpleData val = getValue(stringName);
        if (val == null && tryGlobal)
            val = getValue(getGlobalName(stringName));
       
        return val == null ? "" : val.format();
    }

    public String getSizeUnits() {
        String result = getProcessString("Size Units", false).trim();
        if (result.length() > 0)
View Full Code Here

        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        if (prefix == null) prefix = "";
        String dataName = DataRepository.createDataName(prefix, name);
        SimpleData d = data.getSimpleValue(dataName);
        return (d == null ? null : d.format());
    }

    /** Display the welcome page */
    protected void showWelcomePage() {
        String desiredLocation = getParameter(TARGET_PARENT_PARAM);
View Full Code Here

                // is for the same project as the newly received invitation.
                // If so, write the new invitation to this data element,
                // overwriting the old invitation.
                try {
                    String preexistingProjectID = XMLUtils
                            .parse(preexistingInvitation.format())
                            .getDocumentElement().getAttribute(PROJECT_ID);
                    if (projectID.equals(preexistingProjectID))
                        return dataName;

                } catch (Exception e) {
View Full Code Here

            String dataPrefix = DATA_PREFIX + i;
            String dataName = dataPrefix + DATA_SUFFIX;
            SimpleData sd = ctx.getData().getSimpleValue(dataName);
            if (sd != null) {
                try {
                    handlePendingInvitation(ctx, dataPrefix, sd.format());
                } catch (Exception e) {
                    ctx.getData().putValue(dataName, null);
                    if (!(e instanceof AlreadyJoinedException))
                        e.printStackTrace();
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.