Class Time

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

public abstract class Time extends Object implements Comparable<Time>, Serializable
Abstract class for time objects
Since:
1.0.0
See Also:
  • Constructor Details

    • Time

      public Time()
      default constructor
    • Time

      public Time(String gmlId)
      constructor
      Parameters:
      gmlId - GML id
  • Method Details

    • setGmlId

      public void setGmlId(String gmlId)
      Set GML id
      Parameters:
      gmlId - Id to set
    • getGmlId

      public String getGmlId()
      Get GML id. If not null, first # (document reference indicator) is removed
      Returns:
      GML id
    • isSetGmlId

      public boolean isSetGmlId()
      Check whether GML id is set
      Returns:
      true, if GML id is set
    • isReferenced

      public boolean isReferenced()
      Check whether GML id contains document reference indicator
      Returns:
      true, if GML id contains document reference indicator
    • getTimeFormat

      public Time.TimeFormat getTimeFormat()
      Get time format
      Returns:
      Time format
    • setTimeFormat

      public void setTimeFormat(Time.TimeFormat timeFormat)
      Set time format
      Parameters:
      timeFormat - Time format to set
    • isSetTimeFormat

      public boolean isSetTimeFormat()
      Check whether time format is set
      Returns:
      true, if time format is set
    • getReference

      public String getReference()
      Get reference
      Returns:
      Reference
    • setReference

      public void setReference(String reference)
      Set reference
      Parameters:
      reference - Reference to set
    • isSetReference

      public boolean isSetReference()
      Check reference is set
      Returns:
      true, if reference is set
    • getNilReason

      public Time.NilReason getNilReason()
      Get the nil reason
      Returns:
      Nil reason
    • setNilReason

      public void setNilReason(Time.NilReason nilReason)
      Set nil reason
      Parameters:
      nilReason - Nil reason to set
    • isSetNilReason

      public boolean isSetNilReason()
      Check if nil reason is set
      Returns:
      true, if nil reason is set
    • isNilReasonEqualTo

      public boolean isNilReasonEqualTo(Enum value)
      Check if set nil reason equals to
      Parameters:
      value - whose it shall comply with
      Returns:
      true, if nil reason equals queried
    • resolveDateTime

      protected org.joda.time.DateTime resolveDateTime(org.joda.time.DateTime dateTime, IndeterminateValue indeterminateValue)
      Resolve date time from dateTime or from indertminateValue
      Parameters:
      dateTime - DateTime to check
      indeterminateValue - IndeterminateValue to check
      Returns:
      Passed DateTime or current time IndeterminateValue.NOW
    • isEmpty

      public boolean isEmpty()
      Check if time is empty
      Returns:
      true if not set nil reason and not set reference