Examples of SimpleData


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.greaterThan(getArg(arguments, i)))
                result = getArg(arguments, i);

        return result;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

    protected String getValue(String name) {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        if (prefix == null) prefix = "";
        String dataName = data.createDataName(prefix, name);
        SimpleData d = data.getSimpleValue(dataName);
        return (d == null ? null : d.format());
    }
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 = getArg(arguments, 0);
        if (arg == null)
            return LogicOperators.FALSE;
        else
            return LogicOperators.TRUE;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

            return getPrefix(action) + "/PW_STOR";
        }

        String getPassword() {
            String dataName = passwordRecallName();
            SimpleData val = data.getSimpleValue(dataName);
            if (val == null) return null;
            String str = val.format();
            if (NO_PASSWORD.equals(str)) return NO_PASSWORD;
            return Base64.decode(str);
        }
View Full Code Here

Examples of pspdash.data.SimpleData

        // search for tasks that belong to the named task list.
        SortedMap tasks = new TreeMap(DataComparator.instance);
        String ordinalPrefix = "/" + TASK_ORDINAL_PREFIX + taskListName;
        Iterator i = data.getKeys();
        String dataName, path;
        SimpleData value;
        while (i.hasNext()) {
            dataName = (String) i.next();
            if (!dataName.endsWith(ordinalPrefix)) continue;
            value = data.getSimpleValue(dataName);
            path = dataName.substring
View Full Code Here

Examples of pspdash.data.SimpleData

    }
    private EVSchedule getSchedule(DataRepository data, String taskListName) {
        String globalPrefix = MAIN_DATA_PREFIX + taskListName;
        String dataName =
            data.createDataName(globalPrefix, EST_HOURS_DATA_NAME);
        SimpleData d = data.getSimpleValue(dataName);
        if (d instanceof StringData) d = ((StringData) d).asList();
        if (d instanceof ListData)
            return new EVSchedule((ListData) d);
        else
            return new EVSchedule();
View Full Code Here

Examples of pspdash.data.SimpleData

     */
    protected void loadID(String taskListName) {
        String globalPrefix = MAIN_DATA_PREFIX + taskListName;
        String dataName = data.createDataName(globalPrefix, ID_DATA_NAME);

        SimpleData d = data.getSimpleValue(dataName);
        if (d != null) {
            taskListID = d.format();
        } else {
            // This task list doesn't have a unique ID yet.  Generate one.
            // It should be a value that needs no special handling to
            // appear as an XML attribute.
            int i = Math.abs((new Random()).nextInt());
View Full Code Here

Examples of pspdash.data.SimpleData

    /** Write the CGI header. */
    protected void writeHeader() {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        String dataName = DataRepository.createDataName(prefix, DATA_NAME);
        SimpleData d = data.getSimpleValue(dataName);
        String subsetPrefix = null;
        if (d != null) subsetPrefix = d.format();
        if (subsetPrefix == null || subsetPrefix.length() == 0)
            subsetPrefix = DEFAULT_PREFIX;

        out.print("Location: ");
        out.print(TinyWebServer.urlEncodePath(subsetPrefix));
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

Examples of pspdash.data.SimpleData

    /** Load process customization settings from data for this project. */
    private void loadGenericVariables() {
        DataRepository data = getDataRepository();
        String prefix = getPrefix();
        SimpleData d;
        d = data.getSimpleValue(prefix + "/" + SHOW_SIZE_NAME);
        showSize = (d != null && d.test());
        d = data.getSimpleValue(prefix + "/" + SHOW_DEF_NAME);
        showDefects = (d != null && d.test());
        d = data.getSimpleValue(prefix + "/" + UNITS_NAME);
        if (d == null) {
            unit = "Unit"; units = "Units";
        } else {
            units = d.format();
            int semicolonPos = units.indexOf(';');
            if (semicolonPos > -1) {
                unit  = units.substring(0, semicolonPos);
                units = units.substring(semicolonPos+1);
            } else if (units.endsWith("s")) {
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.