Package org.apache.sis.internal.jaxb.gml
Class SC_VerticalCRS
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
org.apache.sis.internal.jaxb.gco.PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
org.apache.sis.internal.jaxb.gml.SC_VerticalCRS
- Direct Known Subclasses:
SC_VerticalCRS
public class SC_VerticalCRS
extends PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
JAXB adapter for
VerticalCRS
, 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.
This wrapper does not declare directly the XML element, because doing so would require
the implementation classes in the sis-referencing
module. Instead, this wrapper
declares an Object
property annotated with XmlAnyElement
, with a default
implementation returning null
. Modules capable to provide an instance shall create
a subclass like below:
- The path to
MyClass
shall be provided in the moduleMETA-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement
file. - The
DefaultVerticalCRS
class shall have theXmlRootElement(name = "VerticalCRS")
annotation. - The
DefaultVerticalCRS
class shall be declared by aTypeRegistration
implementation provided by the module.
- Since:
- 0.3
- Version:
- 0.7
- See Also:
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.protected
SC_VerticalCRS
(org.opengis.referencing.crs.VerticalCRS metadata) Wraps a Vertical CRS value with a<gml:VerticalCRS>
element at marshalling-time. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Class
<org.opengis.referencing.crs.VerticalCRS> Returns the GeoAPI interface which is bound by this adapter.Returns theDefaultVerticalCRS
generated from the metadata value.final void
setElement
(Object crs) Sets the value for the givenDefaultVerticalCRS
.protected SC_VerticalCRS
wrap
(org.opengis.referencing.crs.VerticalCRS value) Returns the Vertical CRS value wrapped by a<gml:VerticalCRS>
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
-
SC_VerticalCRS
public SC_VerticalCRS()Empty constructor for JAXB only. -
SC_VerticalCRS
protected SC_VerticalCRS(org.opengis.referencing.crs.VerticalCRS metadata) Wraps a Vertical CRS value with a<gml:VerticalCRS>
element at marshalling-time.- Parameters:
metadata
- the metadata value to marshal.
-
-
Method Details
-
wrap
Returns the Vertical CRS value wrapped by a<gml:VerticalCRS>
element.- Specified by:
wrap
in classPropertyType<SC_VerticalCRS,
org.opengis.referencing.crs.VerticalCRS> - 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<SC_VerticalCRS,
org.opengis.referencing.crs.VerticalCRS> - Returns:
VerticalCRS.class
-
getElement
Returns theDefaultVerticalCRS
generated from the metadata value. The default implementation returnsnull
. Subclasses shall override this method like below:- Returns:
- the metadata to be marshalled.
-
setElement
Sets the value for the givenDefaultVerticalCRS
. If the given value is an instance ofVerticalCRS
, then this method assigns that value to thePropertyType.metadata
field. Otherwise this method does nothing.- Parameters:
crs
- the unmarshalled metadata.
-