Package net.sourceforge.processdash.data

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


        return true;
      }
    }

    printErr("Time mismatch for " + path + ": expected " + expectedValue
        + ", got " + (value == null ? null : value.format()));
    return false;
  }

  protected File createAndPopulateDataDir() throws IOException {
    File result = createTempDir();
View Full Code Here


        return getOwnerName((DataContext) data);
    }
    public static String getOwnerName(DataContext data) {
        SimpleData val = data.getSimpleValue("/Owner");
        if (val == null) return null;
        String result = val.format();

        String defaultVal = Resources.getDashBundle("ProcessDashboard")
            .getString("Enter_your_name");
        if (result.equals(defaultVal))
            return null;
View Full Code Here

        return result;
    }
   
    private static String getStrVal(DataContext data, String name) {
        SimpleData sd = data.getSimpleValue(name);
        return (sd == null ? null : sd.format());
    }

    public static SortedMap<String, SizePerItemTable> getDefinedTables(
            DataRepository data) {
        SortedMap<String, SizePerItemTable> result = new TreeMap<String, SizePerItemTable>();
View Full Code Here

        if (val == null || !val.test())
            return;

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

        maybeListenForDataChanges(dataName);
View Full Code Here

    private boolean pathMatchesProjectID(String path, String projectID) {
        String dataName = DataRepository.createDataName(path,
            PROJECT_ID_DATA_NAME);
        SimpleData sd = ctx.getData().getSimpleValue(dataName);
        return (sd != null && projectID.equals(sd.format()));
    }

    private static final boolean hasValue(String s) {
        return XMLUtils.hasValue(s);
    }
View Full Code Here

            xml.attribute(null, PATH_ATTR, resultSet.getRowName(row));

            for (int col = 1; col <= resultSet.numCols(); col++) {
                String name = resultSet.getColName(col);
                SimpleData d = resultSet.getData(row, col);
                String value = (d == null ? null : d.format());

                if (inlineAttributes) {
                    if (value != null)
                        xml.attribute(null, name, value);
                } else {
View Full Code Here

        }
    }

    public String getString(String dataName) {
        SimpleData sd = getSimpleValue(dataName);
        return (sd == null ? null : sd.format());
    }

    public List<String> getList(String dataName) {
        SimpleData sd = getSimpleValue(dataName);
        ListData ld = ListData.asListData(sd);
View Full Code Here

        if (col == 0) return getRowName(row);

        SimpleData d = getData(row, col);
        if (d == null || !d.isDefined()) return "";

        String result = d.format();
        if (result.startsWith("#") || result.startsWith("ERR")) return result;

        int fmt = useRowFormats ? row : col;
        return prefix[fmt] + result + suffix[fmt];
    }
View Full Code Here

    }

    private String getSelectedMethod() {
        SimpleData val = getValue(getDataName(SEL_METHOD));
        if (val == null) return null;
        String result = val.format();
        if (result.endsWith("  ")) return null;
        return result.trim();
    }

View Full Code Here

    private String lookupString(DataRepository data, String prefix, String n) {
        String dataName = DataRepository.createDataName(prefix, n);
        SimpleData d = data.getSimpleValue(dataName);
        if (d == null) return null;
        String result = d.format();
        if (result.length() == 0) return null;
        return result;
    }
   
    private boolean shouldOnlyIncludeCompletedProjects(DataRepository data,
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.