Class TemporalElementTests

java.lang.Object
org.opengis.cite.kml22.BaseFixture
org.opengis.cite.kml22.level1.TemporalElementTests

public class TemporalElementTests extends BaseFixture
Contains test methods that apply to temporal elements (TimeSpan and TimeStamp).
See Also:
  • "OGC 07-134r2: OGC KML 2.2 - Abstract Test Suite"
  • Field Summary

    Fields inherited from class org.opengis.cite.kml22.BaseFixture

    NS_MAP, testSubject
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    checkIndefiniteInterval(Element timeSpan, org.opengis.cite.validation.ValidationErrorHandler errHandler)
    An error is produced if any kml:TimeSpan elements does not have at least one of the required children, kml:begin or kml:end.
    (package private) void
    checkInterval(Element timeSpan, org.opengis.cite.validation.ValidationErrorHandler errHandler)
    An error is produced if any kml:TimeSpan elements, which specify both a kml:begin and kml:end, specify an invalid interval (kml:begin is before kml:end).
    (package private) org.joda.time.DateTime
    Parses a string representing an instant in time as an ISO 8601 DateTime object.
    void
    [Test] Verifies that a TimeSpan element satisfies all of the following constraints: it includes at least one child element (kml:begin or kml:end); if it is a definite interval (both kml:begin and kml:end are present), then the begin value is earlier than the end value.
    void
    [Test] Verifies that a kml:TimeStamp element has a child kml:when element.

    Methods inherited from class org.opengis.cite.kml22.BaseFixture

    obtainTestSubject, setTestSubject, verifyElementNotEmpty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TemporalElementTests

      public TemporalElementTests()
  • Method Details

    • verifyTimeSpan

      public void verifyTimeSpan()
      [Test] Verifies that a TimeSpan element satisfies all of the following constraints:
      1. it includes at least one child element (kml:begin or kml:end);
      2. if it is a definite interval (both kml:begin and kml:end are present), then the begin value is earlier than the end value.
      See Also:
      • "OGC 07-134r2, ATC 4: TimeSpan"
    • verifyTimeStamp

      public void verifyTimeStamp()
      [Test] Verifies that a kml:TimeStamp element has a child kml:when element.
      See Also:
      • "OGC 07-134r2, ATC 5: TimeStamp"
    • checkIndefiniteInterval

      void checkIndefiniteInterval(Element timeSpan, org.opengis.cite.validation.ValidationErrorHandler errHandler)
      An error is produced if any kml:TimeSpan elements does not have at least one of the required children, kml:begin or kml:end.
      Parameters:
      timeSpan - A kml:TimeSpan element.
      errHandler - The error handler that receives any errors that were detected.
    • checkInterval

      void checkInterval(Element timeSpan, org.opengis.cite.validation.ValidationErrorHandler errHandler)
      An error is produced if any kml:TimeSpan elements, which specify both a kml:begin and kml:end, specify an invalid interval (kml:begin is before kml:end).
      Parameters:
      timeSpan - A kml:TimeSpan element.
      errHandler - The error handler that receives any errors that were detected.
    • parseDateTime

      org.joda.time.DateTime parseDateTime(String str)
      Parses a string representing an instant in time as an ISO 8601 DateTime object.
      Parameters:
      str - The string to parse.
      Returns:
      The corresponding DateTime object, or null if the value could not be parsed.