Package org.apache.sis.internal.jaxb.gml
Class TM_Primitive
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<TM_Primitive,org.opengis.temporal.TemporalPrimitive>
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
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Wraps the value only if marshalling ISO 19115-3 element. -
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB.private
TM_Primitive
(org.opengis.temporal.TemporalPrimitive metadata) Wraps a Temporal Primitive value at marshalling-time. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Class
<org.opengis.temporal.TemporalPrimitive> Returns the GeoAPI interface which is bound by this adapter.final TimeInstant
Returns theTimeInstant
generated from the metadata value.final TimePeriod
Returns theTimePeriod
generated from the metadata value.final void
setTimeInstant
(TimeInstant instant) Sets the value from theTimeInstant
.final void
setTimePeriod
(TimePeriod period) Sets the value from theTimePeriod
.private static Date
toDate
(Context context, TimePeriodBound bound) Returns the date of the given bounds, ornull
if none.private static void
warningOccured
(String method, Exception e) Reports a warning for the given exception.protected TM_Primitive
wrap
(org.opengis.temporal.TemporalPrimitive value) Returns the Vertical CRS value wrapped by a temporal primitive element.Methods inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
accept2014, getActuate, getArcRole, getHRef, getNilReason, getRole, getShow, getTitle, getUUIDREF, incomplete, marshal, setActuate, setArcRole, setHRef, setNilReason, setRole, setShow, setTitle, setUUIDREF, unmarshal
-
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
Returns the Vertical CRS value wrapped by a temporal primitive element.- Specified by:
wrap
in classPropertyType<TM_Primitive,
org.opengis.temporal.TemporalPrimitive> - Parameters:
value
- the value to marshal.- Returns:
- the adapter which wraps the metadata value.
-
getBoundType
Returns the GeoAPI interface which is bound by this adapter.- Specified by:
getBoundType
in classPropertyType<TM_Primitive,
org.opengis.temporal.TemporalPrimitive> - Returns:
TemporalPrimitive.class
-
getTimePeriod
Returns theTimePeriod
generated from the metadata value. This method is systematically called at marshalling-time by JAXB.- Returns:
- the time period, or
null
.
-
getTimeInstant
Returns theTimeInstant
generated from the metadata value. This method is systematically called at marshalling-time by JAXB.- Returns:
- the time instant, or
null
.
-
setTimePeriod
Sets the value from theTimePeriod
. This method is called at unmarshalling-time by JAXB.- Parameters:
period
- the wrapper to set.
-
setTimeInstant
Sets the value from theTimeInstant
. This method is called at unmarshalling-time by JAXB.- Parameters:
instant
- the wrapper to set.
-
toDate
Returns the date of the given bounds, ornull
if none. -
warningOccured
Reports a warning for the given exception.- Parameters:
method
- the name of the method to declare in the log record.e
- the exception.
-