Class TM_Primitive

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.apache.sis.internal.jaxb.gco.PropertyType<TM_Primitive,org.opengis.temporal.TemporalPrimitive>
org.apache.sis.internal.jaxb.gml.TM_Primitive
Direct Known Subclasses:
TM_Primitive.Since2014

public class TM_Primitive extends PropertyType<TM_Primitive,org.opengis.temporal.TemporalPrimitive>
JAXB adapter for TemporalPrimitive, in order to integrate the value in an element complying with OGC/ISO standard. Note that the CRS is formatted using the GML schema, not the ISO 19139:2007 one.
Since:
0.3
Version:
1.0
  • Constructor Details

    • TM_Primitive

      public TM_Primitive()
      Empty constructor for JAXB.
    • TM_Primitive

      private TM_Primitive(org.opengis.temporal.TemporalPrimitive metadata)
      Wraps a Temporal Primitive value at marshalling-time.
      Parameters:
      metadata - the metadata value to marshal.
  • Method Details

    • wrap

      protected TM_Primitive wrap(org.opengis.temporal.TemporalPrimitive value)
      Returns the Vertical CRS value wrapped by a temporal primitive element.
      Specified by:
      wrap in class PropertyType<TM_Primitive,org.opengis.temporal.TemporalPrimitive>
      Parameters:
      value - the value to marshal.
      Returns:
      the adapter which wraps the metadata value.
    • getBoundType

      protected final Class<org.opengis.temporal.TemporalPrimitive> getBoundType()
      Returns the GeoAPI interface which is bound by this adapter.
      Specified by:
      getBoundType in class PropertyType<TM_Primitive,org.opengis.temporal.TemporalPrimitive>
      Returns:
      TemporalPrimitive.class
    • getTimePeriod

      public final TimePeriod getTimePeriod()
      Returns the TimePeriod generated from the metadata value. This method is systematically called at marshalling-time by JAXB.
      Returns:
      the time period, or null.
    • getTimeInstant

      public final TimeInstant getTimeInstant()
      Returns the TimeInstant generated from the metadata value. This method is systematically called at marshalling-time by JAXB.
      Returns:
      the time instant, or null.
    • setTimePeriod

      public final void setTimePeriod(TimePeriod period)
      Sets the value from the TimePeriod. This method is called at unmarshalling-time by JAXB.
      Parameters:
      period - the wrapper to set.
    • setTimeInstant

      public final void setTimeInstant(TimeInstant instant)
      Sets the value from the TimeInstant. This method is called at unmarshalling-time by JAXB.
      Parameters:
      instant - the wrapper to set.
    • toDate

      private static Date toDate(Context context, TimePeriodBound bound)
      Returns the date of the given bounds, or null if none.
    • warningOccured

      private static void warningOccured(String method, Exception e)
      Reports a warning for the given exception.
      Parameters:
      method - the name of the method to declare in the log record.
      e - the exception.