Examples of SimpleData


Examples of pspdash.data.SimpleData

                                      ObjectCache cache,
                                      String taskListName) {
        String globalPrefix = MAIN_DATA_PREFIX + taskListName;
        String dataName =
            data.createDataName(globalPrefix, TASK_LISTS_DATA_NAME);
        SimpleData listVal = data.getSimpleValue(dataName);
        ListData list = null;
        if (listVal instanceof ListData)
            list = (ListData) listVal;
        else if (listVal instanceof StringData)
            list = ((StringData) listVal).asList();
View Full Code Here

Examples of pspdash.data.SimpleData

        return result;
    }
    /** get the name of the person who owns the data in the repository */
    protected String getOwner() {
        DataRepository data = getDataRepository();
        SimpleData val = data.getSimpleValue("/Owner");
        if (val == null) return null;
        String result = val.format();
        if ("Enter your name".equals(result))
            return null;
        else
            return result;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

        }
    }


    private void loadStructuralData() {
        SimpleData d = getValue(TASK_ORDINAL_PREFIX + taskListName);
        if (d instanceof NumberData)
            taskOrdinal = savedTaskOrdinal = ((NumberData) d).getInteger();

        d = getValue(TASK_PRUNING_PREFIX + taskListName);
        if (d instanceof NumberData)
View Full Code Here

Examples of pspdash.data.SimpleData

        if (newTaskListName != null && newValue != defaultValue) {
            String newDataName = dataNamePrefix + newTaskListName;
            if (newDataName.equals(oldDataName)) oldDataName = null;
            if (newValue != savedValue || oldDataName != null) {
                SimpleData d = new DoubleData(newValue, false);
                String dataName = data.createDataName(fullName, newDataName);
                data.putValue(dataName, d);
            }
        }
View Full Code Here

Examples of pspdash.data.SimpleData

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(List arguments, ExpressionContext context)
    {
        SimpleData result = null;

        arguments = collapseLists(arguments, 0);
        for (int i = 0;  i < arguments.size();  i++)
            if (result == null ||
                result.lessThan(getArg(arguments, i)))
                result = getArg(arguments, i);

        return result;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

            taskListID = taskListName.substring(0, pos);
            taskListName = taskListName.substring(pos+XMLID_FLAG.length());
        }

        String dataName = data.createDataName(taskListName, XML_DATA_NAME);
        SimpleData value = data.getSimpleValue(dataName);
        if (!(value instanceof StringData) && taskListID != null) {
            dataName = getDataNameForID(data, taskListID);
            if (dataName != null)
                value = data.getSimpleValue(dataName);
        }

        if (value instanceof StringData)
            return value.format();
        else
            return null;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

            return null;
    }

    private static String getIDForDataName(DataRepository data,
                                              String dataName) {
        SimpleData value = data.getSimpleValue(dataName);
        if (!(value instanceof StringData)) return null;

        String xmlDoc = value.format();

        String pattern = " "+XMLID_ATTR+"='";
        int beg = xmlDoc.indexOf(pattern);
        if (beg == -1) return null;
        beg += pattern.length();
View Full Code Here

Examples of pspdash.data.SimpleData

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(List arguments, ExpressionContext context)
    {
        SimpleData test = getArg(arguments, 0);
        SimpleData t    = getArg(arguments, 1);
        SimpleData f    = getArg(arguments, 2);

        if (test != null && test.test())
            return t;
        else
            return f;
View Full Code Here

Examples of pspdash.data.SimpleData

        Iterator i = collapseLists(arguments, 1).iterator();
        String path, dataName, alias;
        alias = NO_ALIAS_YET;
        boolean editable;
        SimpleData sVal = null;
        while (i.hasNext()) {
            path = asStringVal(i.next());
            if (path == null) continue;

            dataName = DataRepository.createDataName(path, name);
View Full Code Here

Examples of pspdash.data.SimpleData

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(List arguments, ExpressionContext context)
    {
        SimpleData arg;

        for (int i = 0;   i < arguments.size();   i++)
            if (!isBadValue(arg = getArg(arguments, i)))
                return arg;

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.