Class GO_Temporal

Direct Known Subclasses:
GO_Temporal.Since2014

public class GO_Temporal extends XmlAdapter<GO_Temporal,Temporal>
JAXB adapter wrapping the date value in a <gco:Date> or <gco:DateTime> element, for ISO 19115-3 compliance. Only one of Date or DateTime field shall be non-null. At marshalling time, the choice is performed depending on whatever the given date contains hour, minute or seconds fields.

Difference between ISO 19139:2007 and ISO 19115-3:2016

The ISO baseTypes.xsd files define two kinds of date property:
  • gco:Date_PropertyType accepts either gco:Date or gco:DateTime.
  • gco:DateTime_PropertyType accepts only gco:DateTime.
In the legacy standard (ISO 19139:2007), date properties (in particular in citations) were of type Date_PropertyType. But in the new standard (ISO 19115-3:2016), most date properties are of type DateTime_PropertyType, i.e. gco:Date is not legal anymore. The only exception is versionDate in cat:AbstractCT_Catalogue.
Since:
1.3
Version:
1.3
Author:
Cédric Briançon (Geomatys), Martin Desruisseaux (Geomatys)
See Also:
  • Constructor Details

    • GO_Temporal

      public GO_Temporal()
      Empty constructor for JAXB.
  • Method Details

    • unmarshal

      public final Temporal unmarshal(GO_Temporal value)
      Converts a date read from a XML stream to the object which will contain the value. JAXB calls automatically this method at unmarshalling time.
      Specified by:
      unmarshal in class XmlAdapter<GO_Temporal,Temporal>
      Parameters:
      value - the adapter for this metadata value.
      Returns:
      a temporal object which represents the metadata value.
    • marshal

      public GO_Temporal marshal(Temporal value)
      Converts the temporal object to the object to be marshalled in a XML file or stream. JAXB calls automatically this method at marshalling time. The use of <gco:Date> or <gco:DateTime> is determined automatically.
      Specified by:
      marshal in class XmlAdapter<GO_Temporal,Temporal>
      Parameters:
      value - the date value.
      Returns:
      the adapter for this date.