Package pspdash.data

Examples of pspdash.data.DateData


  public long scanTask (TaskEntry te) { // fill in 'slurp'able data fields
    String thePath = te.taskName.path();

    NumberData pt = (NumberData)data.getSimpleValue (thePath + PLANNED_TIME);
    te.plannedTime = ((pt == null) ? 0 : pt.getInteger());
    DateData ad = (DateData)data.getSimpleValue (thePath + COMPLETED_TIME);
    te.actualDate = ((ad == null) ? null : ad.getValue());
    return te.plannedTime;
  }
View Full Code Here


                                        (te.actualDate), col, row);
          else
            taskTable.table.setValueAt ("", col, row);
        } else {
          te.actualDate = d;
          DateData ad = new DateData (d, true);
          data.putValue (te.taskName.path() + COMPLETED_TIME, ad);
        }
        break;
      }
      break;
View Full Code Here

        add(new PushVariable(trimDelim(node))); }
    public void caseTStringLiteral(TStringLiteral node) {
        add(new PushConstant(new ImmutableStringData(trimDelim(node)))); }
    public void caseTDateLiteral(TDateLiteral node) {
        try {
            add(new PushConstant(new DateData(node.getText())));
        } catch (Exception mve) {
            throw new CompilationException
                ("Couldn't parse date literal '" + node.getText() + "'.");
        }
    }
View Full Code Here

                data.createDataName(fullName, DATE_COMPLETED_DATA_NAME);

            // save the Date object to the data repository
            if (aValue instanceof Date) {
                dateCompleted = (Date) aValue;
                data.userPutValue(dataName, new DateData(dateCompleted, true));
            } else {
                dateCompleted = null;
                data.userPutValue(dataName, null);
            }
        }
View Full Code Here

            return maxDateOf(arguments, context);
    }

    private Object maxDateFor(List arguments, ExpressionContext context)
    {
        DateData result = null;
        Object val;

        String name = asString(getArg(arguments, 0));
        if (name == null) return null;

        Iterator i = collapseLists(arguments, 1).iterator();
        String path, dataName;
        while (i.hasNext()) {
            path = asStringVal(i.next());
            if (path == null) continue;

            dataName = DataRepository.createDataName(path, name);
            val = context.get(dataName);
            if (val == null)
                return null;
            if (val instanceof DateData &&
                (result == null || result.lessThan((DateData) val)))
                result = (DateData) val;
        }
        return result;
    }
View Full Code Here

        return result;
    }

    private Object maxDateOf(List arguments, ExpressionContext context)
    {
        DateData result = null;
        Object val;

        Iterator i = collapseLists(arguments, 0).iterator();
        while (i.hasNext()) {
            val = i.next();
            if (val == null)
                return null;
            if (val instanceof DateData &&
                (result == null || result.lessThan((DateData) val)))
                result = (DateData) val;
        }
        return result;
    }
View Full Code Here

    super(r, name, readOnly);
  }


  public void setBoolean(Boolean b) {
    value = (b.booleanValue() ? new DateData() : null);
  }
View Full Code Here


    private void markCompleted() {
          // mark this phase as completed in the data repository.
      String dataName = getCompletedDataname(self);
      parent.data.userPutValue(dataName, new DateData());
    }
View Full Code Here

                             new DoubleData(currentMinutes, false));
        //System.out.println("updating time to " + currentMinutes);

        if (stopwatch != null)
            parent.hierarchy.workPerformed
                (new DateData(stopwatch.createTime, true));
    }
View Full Code Here

TOP

Related Classes of pspdash.data.DateData

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.