Package buri.ddmsence.ddms

Examples of buri.ddmsence.ddms.ApproximableDate


   * Generates an acquiredOn Date for testing
   */
  private List<ApproximableDate> getTestAcquiredOns() throws InvalidDDMSException {
    List<ApproximableDate> list = new ArrayList<ApproximableDate>();
    if (DDMSVersion.getCurrentVersion().isAtLeast("4.1")) {
      list.add(new ApproximableDate(ApproximableDateTest.getFixtureElement("acquiredOn", true)));
    }
    return (list);
  }
View Full Code Here


  /**
   * Generates an approximableDate for testing
   */
  private ApproximableDate.Builder getTestApproximableStart() throws InvalidDDMSException {
    Element element = ApproximableDateTest.getFixtureElement("approximableStart", true);
    ApproximableDate date = new ApproximableDate(element);
    return (new ApproximableDate.Builder(date));
  }
View Full Code Here

  /**
   * Generates an approximableDate for testing
   */
  private ApproximableDate.Builder getTestApproximableEnd() throws InvalidDDMSException {
    Element element = ApproximableDateTest.getFixtureElement("approximableEnd", true);
    ApproximableDate date = new ApproximableDate(element);
    return (new ApproximableDate.Builder(date));
  }
View Full Code Here

    if (!version.isAtLeast("4.0.1"))
      prefix += "TimePeriod.";
    StringBuffer text = new StringBuffer();
    text.append(buildHTMLTextOutput(format, prefix + "name", TEST_NAME));
    if (isApproximable) {
      ApproximableDate start = new ApproximableDate(ApproximableDateTest.getFixtureElement("approximableStart",
        true));
      ApproximableDate end = new ApproximableDate(ApproximableDateTest.getFixtureElement("approximableEnd", true));
      text.append(start.getHTMLTextOutput(format, prefix, ""));
      text.append(end.getHTMLTextOutput(format, prefix, ""));
    }
    else {
      text.append(buildHTMLTextOutput(format, prefix + "start", TEST_START));
      text.append(buildHTMLTextOutput(format, prefix + "end", TEST_END));
    }
View Full Code Here

    try {
      setXOMElement(element, false);
      _acquiredOns = new ArrayList<ApproximableDate>();
      Elements acquiredOns = element.getChildElements(ACQUIRED_ON_NAME, getNamespace());
      for (int i = 0; i < acquiredOns.size(); i++) {
        _acquiredOns.add(new ApproximableDate(acquiredOns.get(i)));
      }
      validate();
    }
    catch (InvalidDDMSException e) {
      e.setLocator(getQualifiedName());
View Full Code Here

    public Dates commit() throws InvalidDDMSException {
      if (isEmpty())
        return (null);
      List<ApproximableDate> acquiredOns = new ArrayList<ApproximableDate>();
      for (IBuilder builder : getAcquiredOns()) {
        ApproximableDate component = (ApproximableDate) builder.commit();
        if (component != null)
          acquiredOns.add(component);
      }
      return (new Dates(acquiredOns, getCreated(), getPosted(), getValidTil(), getInfoCutOff(), getApprovedOn(),
        getReceivedOn()));
View Full Code Here

        if (nameElement != null && !Util.isEmpty(nameElement.getValue()))
          _name = nameElement.getValue();

        Element approximableStart = element.getFirstChildElement(APPROXIMABLE_START_NAME, getNamespace());
        if (approximableStart != null)
          _approximableStart = new ApproximableDate(approximableStart);
        Element approximableEnd = element.getFirstChildElement(APPROXIMABLE_END_NAME, getNamespace());
        if (approximableEnd != null)
          _approximableEnd = new ApproximableDate(approximableEnd);
      }
      _securityAttributes = new SecurityAttributes(element);
      validate();
    }
    catch (InvalidDDMSException e) {
View Full Code Here

TOP

Related Classes of buri.ddmsence.ddms.ApproximableDate

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.