Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.SimpleData


        }
    }

    private boolean test(String path, String name) {
        String dataName = DataRepository.createDataName(path, name);
        SimpleData sd = ctx.getData().getSimpleValue(dataName);
        return (sd != null && sd.test());
    }
View Full Code Here


        if (owner == null || owner.trim().length() == 0)
            return false;

        DataContext c = getDataContext();
        for (String name : NAMES_TO_CHECK) {
            SimpleData sd = c.getSimpleValue(name);
            if (sd == null || !sd.test() || sd.format().trim().length() == 0)
                return false;
        }

        c.putValue("../Student_Profile_Complete", ImmutableDoubleData.TRUE);
        if (c.getSimpleValue("Completed") == null)
View Full Code Here

            export(src, elemName, dest, tagName);
        }

        protected void export(DataContext src, String elemName,
                XmlSerializer dest, String tagName) throws IOException {
            SimpleData sd = src.getSimpleValue(elemName);
            writeTag(dest, tagName, sd);
        }
View Full Code Here

        uri.append(".shtm");

        String unit, units;
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        SimpleData d = data.getSimpleValue(prefix + "/" + UNITS_NAME);
        units = (d != null ? d.format() : null);
        if (units == null || units.trim().length() == 0)
            units = resources.getString("Default_Units");
        
        int semicolonPos = units.indexOf(';');
        if (semicolonPos > -1) {
View Full Code Here

            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.
        String prefix = path.toString();
        String projSchedIdDataName = DataRepository.createDataName(
            prefix, PROJECT_SCHEDULE_ID);

        // Next, check to see if the named schedule actually exists.
        String taskListName = val.format();
        if (EVTaskListData.exists(data, taskListName)
                || EVTaskListRollup.exists(data, taskListName)) {
            // The named schedule exists!  Retrieve its actual task list ID,
            // and record this for posterity.  Note that in the most common
            // case, we will be recording the exact same ID value that is
            // already present - but the data repository will be able to
            // efficiently figure out whether a real change was made.
            String taskListIdDataName = DataRepository.createDataName(
                    MAIN_DATA_PREFIX + taskListName, ID_DATA_NAME);
            SimpleData taskListID = data.getSimpleValue(taskListIdDataName);
            data.putValue(projSchedIdDataName, taskListID);

            // Finally, return the name we found.
            return taskListName;
        }
View Full Code Here

        while (i.hasNext()) {
            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

            buildWbsIdMap(result, props, prop.getChild(i), data);
    }

    private static String getWbsId(DataRepository data, String path) {
        String dataName = DataRepository.createDataName(path, "Project_WBS_ID");
        SimpleData val = data.getSimpleValue(dataName);
        if (val == null)
            return null;
        else
            return val.format();
    }
View Full Code Here

    private static Map getWbsSubcomponentInfo(DataRepository data, String path,
            String wbsId) {
        String dataName = DataRepository.createDataName(path,
            "Project_Component_Info");
        SimpleData val = data.getSimpleValue(dataName);
        if (val == null)
            return null;

        Element xml;
        try {
            xml = XMLUtils.parse(val.format()).getDocumentElement();
        } catch (Exception e) {
            return null;
        }

        Map result = new HashMap();
View Full Code Here

            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) {
            String result = (String) wbsIdMap.get(wbsID);
            if (result != null)
                return result;
            wbsID = DataRepository.chopPath(wbsID);
View Full Code Here

    public static String getSelectedMethod(DataRepository data, String prefix,
                                           String targetDataElem) {
        String dataName = DataRepository.createDataName
            (prefix, targetDataElem + "/Probe Method");
        SimpleData val = data.getSimpleValue(dataName);
        return (val == null ? null : val.format());
    }
View Full Code Here

TOP

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

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.