Class RS_ReferenceSystem
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
org.apache.sis.internal.jaxb.gco.PropertyType<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
org.apache.sis.internal.jaxb.metadata.RS_ReferenceSystem
- Direct Known Subclasses:
RS_ReferenceSystem.Since2014
public class RS_ReferenceSystem
extends PropertyType<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
JAXB adapter mapping ISO 19111 Coordinate Reference Systems to
MD_ReferenceSystem
object used in ISO 19115.
Coordinate Reference Systems (CRS) are defined in details by ReferenceSystem
implementation classes.
But the ISO 19115 metadata standards do not reference those CRS classes directly (except in one case).
Instead, the metadata standards reference CRS by their identifier (for example an EPSG code),
optionally accompanied by a code telling whether the CRS type is geographic, projected, temporal,
a compound of the above, etc. Those two information are combined in a MD_ReferenceSystem
class
In order to have a more uniform way to handle reference systems, we replace MD_ReferenceSystem
tuples
by associations to the actual Reference System objects. GeoAPI does that by using the ReferenceSystem
interface as the parent of CoordinateReferenceSystem
interface.
We use this adapter for replacing the full CRS object by the (identifier, type) tuple at marshalling time
where such tuple is expected.- Since:
- 0.3
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Wraps the value only if marshalling an element from the ISO 19115:2014 metadata model. -
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.protected
RS_ReferenceSystem
(org.opengis.referencing.ReferenceSystem value) Wraps a Reference System value in aMD_ReferenceSystem
element at marshalling-time. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Class
<org.opengis.referencing.ReferenceSystem> Returns the GeoAPI interface which is bound by this adapter.final ReferenceSystemMetadata
Invoked by JAXB at marshalling time for getting the actual metadata to write inside the<gmd:RS_ReferenceSystem>
XML element.final void
Invoked by JAXB at unmarshalling time for storing the result temporarily.protected RS_ReferenceSystem
wrap
(org.opengis.referencing.ReferenceSystem value) Invoked byPropertyType
at marshalling time for wrapping the given metadata value in a<gmd:RS_ReferenceSystem>
XML 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
-
RS_ReferenceSystem
public RS_ReferenceSystem()Empty constructor for JAXB only. -
RS_ReferenceSystem
protected RS_ReferenceSystem(org.opengis.referencing.ReferenceSystem value) Wraps a Reference System value in aMD_ReferenceSystem
element at marshalling-time.- Parameters:
value
- the metadata element to marshal.
-
-
Method Details
-
getBoundType
Returns the GeoAPI interface which is bound by this adapter. This method is indirectly invoked by the private constructor below, so it shall not depend on the state of this object.- Specified by:
getBoundType
in classPropertyType<RS_ReferenceSystem,
org.opengis.referencing.ReferenceSystem> - Returns:
ReferenceSystem.class
-
wrap
Invoked byPropertyType
at marshalling time for wrapping the given metadata value in a<gmd:RS_ReferenceSystem>
XML element.- Specified by:
wrap
in classPropertyType<RS_ReferenceSystem,
org.opengis.referencing.ReferenceSystem> - Parameters:
value
- the metadata element to marshal.- Returns:
- a
PropertyType
wrapping the given the metadata element.
-
getElement
Invoked by JAXB at marshalling time for getting the actual metadata to write inside the<gmd:RS_ReferenceSystem>
XML element. This is the value or a copy of the value given in argument to thewrap
method.- Returns:
- the metadata to be marshalled.
-
setElement
Invoked by JAXB at unmarshalling time for storing the result temporarily.- Parameters:
value
- the unmarshalled metadata.
-