Package org.apache.sis.internal.jaxb.gco
Class GO_Real
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<GO_Real,Double>
org.apache.sis.internal.jaxb.gco.PropertyType<GO_Real,Double>
org.apache.sis.internal.jaxb.gco.GO_Real
- Direct Known Subclasses:
GO_Real.Since2014
Wraps double values in Relationship with
This adapter is identical to
<gco:Real>
element.
The ISO 19115-3 standard requires most types to be wrapped by an element representing the value type.
The JAXB default behavior is to marshal primitive Java types directly, without such wrapper element.
The role of this class is to add the <gco:…>
wrapper element required by ISO 19115-3.
Relationship with GO_Decimal
This adapter is identical to GO_Decimal
except for the element name, which is "Real"
instead of "Decimal"
. This adapter is the most widely used one in IS 19139 XML schema.
The few exceptions are documented in GO_Decimal
.- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Java type which is bound by this adapter.final Double
Invoked by JAXB at marshalling time for getting the actual value to write.final void
setElement
(Double metadata) Invoked by JAXB at unmarshalling time for storing the result temporarily.protected GO_Real
Allows JAXB to change the result of the marshalling process, according to the ISO 19115-3 standard and its requirements about primitive types.Methods inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
accept2014, getActuate, getArcRole, getHRef, getNilReason, getRole, getShow, getTitle, getUUIDREF, incomplete, marshal, resolve, setActuate, setArcRole, setHRef, setNilReason, setRole, setShow, setTitle, setUUIDREF, unmarshal
-
Constructor Details
-
GO_Real
GO_Real()Empty constructor used only by JAXB. -
GO_Real
Constructs a wrapper for the given value.- Parameters:
value
- the value.
-
-
Method Details
-
getBoundType
Returns the Java type which is bound by this adapter.- Specified by:
getBoundType
in classPropertyType<GO_Real,
Double> - Returns:
Double.class
-
wrap
Allows JAXB to change the result of the marshalling process, according to the ISO 19115-3 standard and its requirements about primitive types.- Specified by:
wrap
in classPropertyType<GO_Real,
Double> - Parameters:
value
- the double value we want to wrap in an element representing its type.- Returns:
- a wrapper for the double value, that is to say a double value wrapped
by
<gco:Real>
element.
-
getElement
Invoked by JAXB at marshalling time for getting the actual value to write.- Returns:
- the value to be marshalled.
-
setElement
Invoked by JAXB at unmarshalling time for storing the result temporarily.- Parameters:
metadata
- the unmarshalled value.
-