Class TimeInstant

java.lang.Object
org.apache.sis.internal.jaxb.gml.GMLAdapter
org.apache.sis.internal.jaxb.gml.TimeInstant

public final class TimeInstant extends GMLAdapter
Encapsulates a gml:TimeInstant. This element may be used alone, or included in a TimePeriodBound.GML2 object. The latter is itself included in TimePeriod. Note that GML3 does not anymore include TimeInstant inside TimePeriod.
Since:
0.3
Version:
0.3
  • Field Details

    • timePosition

      public XMLGregorianCalendar timePosition
      The date, optionally with its time component. The time component is omitted if the hours, minutes, seconds and milliseconds fields are all set to 0.

      WARNING: The timezone information may be lost! This is because this field is derived from a Date, in which case we don't know if the time is really 0 or just unspecified. This class assumes that a time of zero means "unspecified". This will be revised after we implemented ISO 19108.

  • Constructor Details

    • TimeInstant

      public TimeInstant()
      Empty constructor used by JAXB.
    • TimeInstant

      public TimeInstant(Instant instant)
      Creates a new time instant initialized to the given value.
      Parameters:
      instant - the initial instant value.
  • Method Details

    • toXML

      static XMLGregorianCalendar toXML(Instant instant)
      Creates a XML Gregorian Calendar from the given instants, if non-null. Otherwise returns null.

      WARNING: The timezone information may be lost! This is because this field is derived from a Date, in which case we don't know if the time is really 0 or just unspecified. This class assumes that a time of zero means "unspecified". This will be revised after we implemented ISO 19108.

    • toString

      public String toString()
      Returns a string representation for debugging and formatting error message.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this time instant.