Package pspdash.data

Examples of pspdash.data.SaveableData


        public PathVariable(String name) {
            this(name, name, null, null); }
        public PathVariable(String name, String metaName, String impliedPath,
                            String defaultValue) {
            this.metaName = metaName;
            SaveableData val = null;
            DataRepository data = getDataRepository();

            if (name.startsWith("/")) {
                // The name is absolute - look it up in the data repository.
                val = data.getSimpleValue(dataName = name);

            } else {
                // Look for an inheritable value with this name in the data
                // repository.
                StringBuffer prefix = new StringBuffer(getPrefix());
                val = data.getInheritableValue(prefix, name);
                if (val != null && !(val instanceof SimpleData))
                    val = val.getSimpleValue();
                dataName = data.createDataName(prefix.toString(), name);
            }

            // Check to see if a value was POSTed to this CGI script for this
            // data element.  If so, it would override any previous value.
View Full Code Here


        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

    public static boolean taskIsPruned(DataRepository data,
                                       String taskListName,
                                       String taskPath)
    {
        SaveableData d = data.getInheritableValue
            (taskPath, TASK_PRUNING_PREFIX + taskListName);
        int pruningFlag = INFER_FROM_CONTEXT;

        if (d != null && d.getSimpleValue() instanceof NumberData)
            pruningFlag = ((NumberData) d.getSimpleValue()).getInteger();

        return pruningFlag == USER_PRUNED;
    }
View Full Code Here

        // get the defect type standard for this project.
        String defectTypeName = null;
        if (path == null) path = "";

        SaveableData defectSetting = data.getInheritableValue
            (path, SETTING_DATA_NAME);

        if (defectSetting != null)
            defectTypeName = defectSetting.getSimpleValue().format();
        if (defectTypeName == null)
            defectTypeName = Settings.getVal("defectTypeStandard");
        if (defectTypeName == null)
            defectTypeName = DEFAULT_NAME;
View Full Code Here

        else
            return val.format();
    }

    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

            System.err.println("Couldn't update time log " + timeLogFilename);
            ioe.printStackTrace();
        }

        // Need to make changes to the data elements.
        SaveableData d = parent.data.getValue(timeElementName);
                                // Calculate the amount of time in this phase,
                                // NOT COUNTING the current time log entry.
        double previousTime = (d == null ? 0.0 : ((DoubleData) d).getDouble())
            - savedElapsedMinutes;
                                // Calculate the amount of time in this phase,
View Full Code Here

TOP

Related Classes of pspdash.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.