Package org.apache.sis.internal.jaxb.gco
Class GO_Boolean
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<GO_Boolean,Boolean>
org.apache.sis.internal.jaxb.gco.PropertyType<GO_Boolean,Boolean>
org.apache.sis.internal.jaxb.gco.GO_Boolean
Surrounds boolean value by
<gco:Boolean>
.
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.- Since:
- 0.3
- Version:
- 0.4
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor used only by JAXB.private
GO_Boolean
(Boolean value) Constructs a wrapper for the given value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Java type which is bound by this adapter.Invoked by JAXB at marshalling time for getting the actual value to write.void
setElement
(Boolean metadata) Invoked by JAXB at unmarshalling time for storing the result temporarily.protected GO_Boolean
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_Boolean
public GO_Boolean()Empty constructor used only by JAXB. -
GO_Boolean
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_Boolean,
Boolean> - Returns:
Boolean.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_Boolean,
Boolean> - Parameters:
value
- the boolean value we want to surround by an element representing its type.- Returns:
- an adaptation of the boolean value, that is to say a boolean value surrounded
by
<gco:Boolean>
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.
-