Class TimeInstant

java.lang.Object
org.n52.shetland.ogc.gml.time.Time
org.n52.shetland.ogc.gml.time.TimeInstant
All Implemented Interfaces:
Serializable, Comparable<Time>
Direct Known Subclasses:
InspireDateOfCreation, InspireDateOfLastRevision, InspireDateOfPublication

public class TimeInstant extends Time
Class represents a GML conform timeInstant element
Since:
1.0.0
See Also:
  • Constructor Details

    • TimeInstant

      public TimeInstant()
      default constructor
    • TimeInstant

      public TimeInstant(org.joda.time.DateTime dateTime)
      constructor
      Parameters:
      dateTime - Time position of this time instant
    • TimeInstant

      public TimeInstant(org.joda.time.Instant instant)
      Creates a new TimeInstant.
      Parameters:
      instant - the instant
    • TimeInstant

      public TimeInstant(IndeterminateValue indeterminateValue)
      constructor
      Parameters:
      indeterminateValue - Indeterminate value
    • TimeInstant

      public TimeInstant(org.joda.time.DateTime dateValue, IndeterminateValue indeterminateValue)
      constructor with date and indeterminateValue.
      Parameters:
      dateValue - date of the timeInstante
      indeterminateValue - Indeterminate value
    • TimeInstant

      public TimeInstant(Date date)
      Constructor using Java Dates, setting unknown indeterminate values if null
      Parameters:
      date - Value date
    • TimeInstant

      public TimeInstant(org.joda.time.DateTime value, int requestedTimeLength)
  • Method Details

    • getValue

      public org.joda.time.DateTime getValue()
      Get time value
      Returns:
      Returns the value.
    • setValue

      public void setValue(org.joda.time.DateTime value)
      Set time value
      Parameters:
      value - The value to set.
    • resolveValue

      public org.joda.time.DateTime resolveValue()
      Get time value, resolving indeterminate value if value is null
      Returns:
      Returns the resolved value.
    • setRequestedTimeLength

      public void setRequestedTimeLength(int requestedTimeLength)
      Set requested time length
      Parameters:
      requestedTimeLength - the requestedTimeLength to set
    • getRequestedTimeLength

      public int getRequestedTimeLength()
      Get requested time length
      Returns:
      the requestedTimeLength
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Time o)
    • equals

      public boolean equals(Object paramObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isSetValue

      public boolean isSetValue()
      Check if time value is set
      Returns:
      true if set
    • getIndeterminateValue

      public IndeterminateValue getIndeterminateValue()
      Get indeterminate value
      Returns:
      Returns the indeterminateValue.
    • getTimePosition

      public TimePosition getTimePosition()
      Get the time position of this time instant
      Returns:
      Time position
    • setIndeterminateValue

      public Time setIndeterminateValue(IndeterminateValue indeterminateValue)
      Set indeterminate value
      Parameters:
      indeterminateValue - The indeterminateValue to set.
      Returns:
      this
    • isSetIndeterminateValue

      public boolean isSetIndeterminateValue()
      Check if indeterminate value is set
      Returns:
      true if set
    • isIndeterminateValueEqualTo

      public boolean isIndeterminateValueEqualTo(IndeterminateValue value)
      Check whether this indeterminate value equals expected value
      Parameters:
      value - Expected value
      Returns:
      true, if this indeterminate value equals expected value
    • isEmpty

      public boolean isEmpty()
      Description copied from class: Time
      Check if time is empty
      Overrides:
      isEmpty in class Time
      Returns:
      true, if value and indeterminateValue are NOT set
      See Also: