Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.SaveableData


        String pfx = getPrefix();
        if (pfx == null) pfx = "/";
        StringBuffer prefix = new StringBuffer(pfx);
        ListData list;
        Element result = null;
        SaveableData val;
        for (val = data.getInheritableValue(prefix, FILE_XML_DATANAME);
             val != null;
             val = data.getInheritableValue(chop(prefix), FILE_XML_DATANAME)) {

            if (val != null && !(val instanceof SimpleData))
                val = val.getSimpleValue();

            if (val instanceof StringData)
                list = ((StringData) val).asList();
            else if (val instanceof ListData)
                list = (ListData) val;
View Full Code Here


            String timeElementName = DataRepository.createDataName(
                    pathName, "Time");
            String orphanElementName = DataRepository.createDataName(
                pathName, "Orphaned Time");
            SaveableData currentVal = data.getValue(timeElementName);
            SaveableData orphanedVal = data.getValue(orphanElementName);

            if (pathValue == null) { 
                // this is a parent node where time logging is not allowed,
                // and no time log entries were found there
View Full Code Here

     */
    private static String getRegisteredTaskListForPath(DataRepository data,
            String projectPath) {
        // check to see if one of our parents names a registered schedule.
        StringBuffer path = new StringBuffer(projectPath);
        SaveableData sd = data.getInheritableValue(path, PROJECT_SCHEDULE_NAME);
        if (sd == null) return null;
        SimpleData val = sd.getSimpleValue();
        if (val == null || !val.test()) return null;

        // We found a named schedule. Remember the prefix of the project that
        // registered this schedule name.  Also, save the data name for the
        // corresponding schedule ID attribute.
View Full Code Here

        }
    }

    private static String rerootPath(DataRepository data, String defectPath,
            Map wbsIdMap) {
        SaveableData wbsIdValue = data.getInheritableValue(defectPath,
                "Project_WBS_ID");
        if (wbsIdValue == null)
            return defectPath;
        SimpleData wbsIdSimpleValue = wbsIdValue.getSimpleValue();
        if (wbsIdSimpleValue == null)
            return defectPath;

        String wbsID = wbsIdSimpleValue.format();
        while (wbsID != null && wbsID.length() > 0) {
View Full Code Here

        SimpleData sd = getValue(prefix, dataName, inherit);
        return (sd == null ? null : sd.format());
    }

    private SimpleData getValue(String prefix, String dataName, boolean inherit) {
        SaveableData d;
        if (inherit)
            d = data.getInheritableValue(prefix, dataName);
        else
            d = data.getValue(DataRepository.createDataName(prefix, dataName));
        return (d == null ? null : d.getSimpleValue());
    }
View Full Code Here

    private boolean shouldBeVisible(String path) {
        if (path == null)
            return false;

        SaveableData enabledVal =  context.getData().getInheritableValue(path,
                ENABLED_DATA_NAME);
        if (enabledVal == null)
            return Settings.getBool(ENABLED_SETTING_NAME, true);

        SimpleData enabled = enabledVal.getSimpleValue();
        return (enabled != null && enabled.test());
    }
View Full Code Here

    private String getProjectID() {
        String prefix = getPrefix();
        if (prefix == null)
            return null;

        SaveableData projectIDVal = getDataRepository().getInheritableValue(
            prefix, "Project_ID");
        if (projectIDVal == null)
            return null;

        SimpleData sd = projectIDVal.getSimpleValue();
        return (sd == null ? null : sd.format());
    }
View Full Code Here

        // we can't guess.  Give up.
        return null;
    }

    private void lookupLabelFilter() {
        SaveableData sval = data.getInheritableValue(prefix, "Label//Filter");
        SimpleData val = (sval == null ? null : sval.getSimpleValue());
        parameters.put(LABEL_FILTER_PARAM, val == null ? "" : val.format());
    }
View Full Code Here

        SimpleData val = (sval == null ? null : sval.getSimpleValue());
        parameters.put(LABEL_FILTER_PARAM, val == null ? "" : val.format());
    }
   
    private void lookupPathFilter() {
        SaveableData sval = data.getInheritableValue(prefix, "Earned_Value//Path_Filter");
        if (sval == null) sval = data.getInheritableValue(prefix, "Earned_Value_Path_Filter");
        SimpleData val = (sval == null ? null : sval.getSimpleValue());
        parameters.put(PATH_FILTER_PARAM, val == null ? "" : val.format());

        sval = data.getInheritableValue(prefix, "Earned_Value//Merged_Path_Filter");
        if (sval == null) sval = data.getInheritableValue(prefix, "Earned_Value_Merged_Path_Filter");
        val = (sval == null ? null : sval.getSimpleValue());
        parameters.put(MERGED_PATH_FILTER_PARAM, val == null ? "" : val.format());
    }
View Full Code Here

    private static List getLabelDataForPath(DataRepository data, String path) {
        if (path == null)
            return null;

        SaveableData val = data.getInheritableValue(path, TASK_LABELS_DATANAME);
        if (val != null) {
            SimpleData list = val.getSimpleValue();
            if (list instanceof StringData)
                list = ((StringData) list).asList();
            if (list instanceof ListData)
                return ((ListData) list).asList();
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.SaveableData

Copyright © 2018 www.massapicom. 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.