Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.StringData


        // the mere act of creating the recorder should have initialized
        // all times to their correct values
        assertTimes(expectedTimes);

        // add a bogus value to the data repository
        StringData stringData = new StringData("\"foo");
        data.putValue("/Project/Time", new DoubleData(666, false));
        data.putValue("/Non Project/Time", stringData);
        // but we don't want it to show up.
        expectedTimes.put("/Project", new Integer(0));
        boolean timesMatch = false;
View Full Code Here


                    defns.put(indivTagName, TagData.getInstance());
            }
        }

        SimpleData parse(String value) throws MalformedValueException {
            StringData result = StringData.create(value);
            result.setEditable(false);
            return result;
        }
View Full Code Here

            // look up the data for this row.
            for (int d=0;  d < dataNames.length;  d++)

                if (dataNames[d].startsWith("\"")) {
                    try {
                        result.setData(p+1, d+1, new StringData(dataNames[d]));
                    } catch (MalformedValueException mve) {}

                } else if (dataNames[d].indexOf('[') != -1) {
                    try {
                        result.setData(p+1, d+1,
View Full Code Here

                    } catch (MalformedValueException mve) { }
                    result.setData(p+1, d+1,
                                   value==null ?null :value.getSimpleValue());

                } else if (dataNames[d].startsWith("\"")) { try {
                    result.setData(p+1, d+1, new StringData(dataNames[d]));
                } catch (MalformedValueException mve) {
                    result.setData(p+1, d+1, null);
                }

                } else {
View Full Code Here

    /** Save the unique ID for this task list.
     * @param newName the name to use when saving this task list.
     * @param data the DataRepository
     */
    protected String saveID(String newName, DataRepository data) {
        StringData value = StringData.create(taskListID);
        return persistDataValue(newName, data, ID_DATA_NAME, value);
    }
View Full Code Here

     *            the data repository prefix where metrics should be stored
     */
    private void validateAndStoreData(SizeMetricApiRequestData request,
            String dataPrefix) {
        // parse and validate the supplied parameter values
        StringData description = getDescription(request);
        StringData sizeUnits = getSizeUnits(request);
        DoubleData actSize = getActualSize(request);

        // store them into the data repository
        putData(request, dataPrefix + "/" + DESCRIPTION_ELEM, description);
        putData(request, dataPrefix + "/" + UNITS_ELEM, sizeUnits);
View Full Code Here

        tempDir = createTempDir();
        DashboardTimeLog dashboardTimeLog = new DashboardTimeLog(tempDir, data,
                hier);
       
        String dataName = DataRepository.createDataName(PATH4, "Time");
        data.putValue(dataName, new StringData("\"foo"));
       
        approver = dashboardTimeLog;
        timeLog = dashboardTimeLog;
        timeLoggingModel = (DefaultTimeLoggingModel) dashboardTimeLog
                .getTimeLoggingModel();
View Full Code Here

            SimpleData sd = data.getSimpleValue(dataName);
            if (!(sd instanceof StringData))
                continue;

            try {
                StringData str = (StringData) sd;
                TaskScheduleChartSettings s = new TaskScheduleChartSettings(
                        dataName, str.format());
                dest.put(s.getSettingsIdentifier(), s);
            } catch (Exception e) {
                TaskScheduleChart.logger.warning(
                    "Could not load chart settings for " + dataName);
            }
View Full Code Here

    {
        String variable = asStringVal(getArg(arguments, 0));
        if (variable == null) return null;
        String defaultValue = asStringVal(getArg(arguments, 1));

        StringData result = null;
        String units = asString(context.get(variable));
        if (StringUtils.hasValue(units) && !units.equals(defaultValue)) {
            int semicolonPos = units.lastIndexOf(';');
            if (semicolonPos != -1)
                units = units.substring(semicolonPos+1);
View Full Code Here

TOP

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

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.