Package net.sourceforge.processdash.data

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


        return true;
    }
   
    private void addTaskListNames(ExportedDataValue val) {
        SimpleData d = val.getSimpleValue();
        if (!d.test())
            return;
       
        ListData list = null;
        if (d instanceof ListData)
            list = (ListData) d;
View Full Code Here


    }

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

    private void updateDataRegistrations(Set<String> newNamesToWatch) {
        // make a list of the registrations that have changed
        Set<String> unneededNames;
View Full Code Here

            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

        // 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();
View Full Code Here

        String dataName = DataRepository.createDataName(taskPath,
                TASK_ID_DATA_NAME);
        SimpleData currentValue = data.getSimpleValue(dataName);
        ListData list = null;
       
        if (currentValue == null || currentValue.test() == false)
            return null;
        if (currentValue instanceof ListData)
            list = (ListData) currentValue;
        else if (currentValue instanceof StringData)
            list = ((StringData) currentValue).asList();
View Full Code Here

    public static List<EVTaskDependency> getDependencies(DataContext data,
            String taskPath) {
        String dataName = DataRepository.createDataName(taskPath,
                TASK_DEPENDENCIES_DATA_NAME);
        SimpleData currentValue = data.getSimpleValue(dataName);
        if (currentValue == null || !currentValue.test())
            return null;

        List<EVTaskDependency> result = new LinkedList<EVTaskDependency>();
        try {
            Element e = XMLUtils.parse(currentValue.format())
View Full Code Here

    public void hierarchyChanged(Event e) {
        updatePSPDataAnalysisVisibility();
    }
    public void updatePSPDataAnalysisVisibility() {
        SimpleData sd = parent.getData().getSimpleValue("/PSP/Project List");
        boolean hasPspTasks = (sd != null && sd.test());
        menuItem.setVisible(hasPspTasks);
    }
  }

}
View Full Code Here

   
    private AbstractInstruction getExportInstructionFromData(String name) {
        if (!name.endsWith("/"+EXPORT_DATANAME))
            return null;
        SimpleData dataVal = data.getSimpleValue(name);
        if (dataVal == null || !dataVal.test())
            return null;
        String filename = Settings.translateFile(dataVal.format());

        String path = name.substring(0,
                name.length() - EXPORT_DATANAME.length() - 1);
View Full Code Here

                filename, filter);
        instr.setAttribute(DATANAME_ATTR, name);
       
        String instrDataname = name + EXPORT_INSTRUCTIONS_SUFFIX;
        SimpleData instrVal = data.getSimpleValue(instrDataname);
        if (instrVal != null && instrVal.test())
            addXmlDataToInstruction(instr, instrVal.format());
       
        String disableDataname = name + EXPORT_DISABLED_SUFFIX;
        SimpleData disableVal = data.getSimpleValue(disableDataname);
        if (disableVal != null && disableVal.test())
View Full Code Here

        if (instrVal != null && instrVal.test())
            addXmlDataToInstruction(instr, instrVal.format());
       
        String disableDataname = name + EXPORT_DISABLED_SUFFIX;
        SimpleData disableVal = data.getSimpleValue(disableDataname);
        if (disableVal != null && disableVal.test())
            instr.setEnabled(false);

        String urlDataname = name + EXPORT_URL_SUFFIX;
        SimpleData urlVal = data.getSimpleValue(urlDataname);
        if (urlVal != null && urlVal.test())
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.