Examples of SimpleData


Examples of net.sourceforge.processdash.data.SimpleData

    }

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

Examples of net.sourceforge.processdash.data.SimpleData

          /** Respond to a change in the value of the freeze flag.
           */
          public synchronized void dataIsConsistent() {
              //System.out.println(freezeFlagName + " = "+ observedFlagValue);
              SimpleData flagValue = getSimpleValue(freezeFlagName);
              boolean flagState = (flagValue != null && flagValue.test());
              int newState = (flagState ? FDS_FROZEN : FDS_THAWED);

              if (initializing) {
                  initializing = false;
                  currentState = newState;
View Full Code Here

Examples of net.sourceforge.processdash.data.SimpleData

            logger.warning("Encountered recursively defined data "
                    + "when calculating " + name + " - ABORTING");
            return; // break out of infinite loops.
        }
       
        SimpleData oldValue = value;
        SimpleData newValue = null;
        String newAlias = null;
        SubscribingExpressionContext context = null;

        // attempt to perform the calculation up to 10 times.  (This should
        // be more than generous - even one retry should be rare.)
        int retryCount = 10
        while (retryCount-- > 0 && extChanges.isDirty()) {
            context = new SubscribingExpressionContext(data, prefix, this,
                    name, currentSubscriptions);
            ListStack stack = new ListStack();
            int changeCount = -1;

            try {
                calcNameSet.add(name);
                changeCount = extChanges.getUnhandledChangeCount();
                script.run(stack, context);
                newAlias = (String) stack.peekDescriptor();
                newValue = (SimpleData) stack.pop();
                if (newValue != null && newAlias == null)
                    newValue = (SimpleData) newValue.getEditable(false);
            } catch (ExecutionException e) {
                logger.warning("Error executing " + name + ": " + e);
                newValue = null;
            } finally {
                calcNameSet.remove(name);
View Full Code Here

Examples of net.sourceforge.processdash.data.SimpleData

                targetVal = FormatUtil.parseNumber(target);
            } catch (Exception e) {
                SaveableData val = getDataRepository().getInheritableValue(
                        getPrefix(), target);
                if (val != null) {
                    SimpleData sVal = val.getSimpleValue();
                    if (sVal instanceof NumberData)
                        targetVal = ((NumberData) sVal).getDouble();
                }
            }
            if (targetVal == 0)
                continue;
           
            boolean reverse = parameters.containsKey("r" + n);

            SimpleData d = data.getData(1, n);
            if (d instanceof NumberData) {
                NumberData num = (NumberData) d;
                double val = num.getDouble();
                if (Double.isInfinite(val) || Double.isNaN(val))
                    val = 1.0;
View Full Code Here

Examples of net.sourceforge.processdash.data.SimpleData

                throws XmlPullParserException, IOException {
            try {
                String elemName = parser.getAttributeValue(null, NAME_ATTR);
                String dataName = concat(prefix, elemName);
                String valueText = parser.nextText();
                SimpleData value = parse(valueText);
                if (shouldImport(dataName, value))
                    defns.put(dataName, value);
            } catch (MalformedValueException e) {
                e.printStackTrace();
            }
View Full Code Here

Examples of net.sourceforge.sijaf.example.file.SimpleData

  public DefaultDesktopCtrl(DefaultDesktopApplication appl) {
    this.appl = appl;
    this.view = new DefaultDesktopView(appl, this);
    SimpleFileModel model = new SimpleFileModel();
    SimpleData data = new SimpleData();
    model.setData(data);
    this.fileCtrl = new SimpleFileCtrl(model, appl.getMainFrame(), this);
  }
View Full Code Here

Examples of pspdash.data.SimpleData

     */
    private ListData getList(String listName) {
        if (listName.startsWith("[")) {
            // listName names a data element
            listName = trimDelim(listName);
            SimpleData d = getSimpleValue(listName);
            if (d instanceof ListData)   return (ListData) d;
            if (d instanceof StringData) return ((StringData) d).asList();
            if (d instanceof SimpleData) {
                ListData result = new ListData();
                result.add(d.format());
            }
            return EMPTY_LIST;
        } else {
            // listName names an environment variable or parameter
            ListData result = new ListData();
View Full Code Here

Examples of pspdash.data.SimpleData

     */
    private String getString(String name) {
        if (name.startsWith("[")) {
            // listName names a data element
            name = trimDelim(name);
            SimpleData d = getSimpleValue(name);
            return (d == null ? "" : d.format());
        } else if ("_UNIQUE_".equals(name)) {
            return Long.toString(uniqueNumber++);
        } else {
                                // try for an environment variable first.
            Object result = env.get(name);
View Full Code Here

Examples of pspdash.data.SimpleData

            name = trimDelim(name);
            if (checkDefined) {
                name = data.createDataName(prefix, name);
                return (data.getValue(name) != null);
            } else {
                SimpleData d = getSimpleValue(name);
                return (d == null ? false : d.test());
            }
        }
        return false;
    }
View Full Code Here

Examples of pspdash.data.SimpleData

        result.append("\n</select></td></tr>\n");
        return CACHE.put(rollupID, result.toString());
    }

    private ListData getList(DataRepository data, String dataName) {
        SimpleData d = data.getSimpleValue(dataName);
        if (d instanceof ListData)
            return (ListData) d;
        else if (d instanceof StringData)
            return ((StringData) d).asList();
        else
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.