Class RS_Identifier
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<Code,org.opengis.referencing.ReferenceIdentifier>
org.apache.sis.internal.jaxb.referencing.RS_Identifier
public final class RS_Identifier
extends XmlAdapter<Code,org.opengis.referencing.ReferenceIdentifier>
JAXB adapter mapping the GeoAPI
Identifier
to an implementation class that can be marshalled.
See the package documentation for more information about JAXB and interfaces.
Note that a class of similar name is defined in the org.apache.sis.internal.jaxb.metadata
package,
which serve the same purpose (wrapping exactly the same interface) but using the ISO 19139:2007 syntax instead.
The ISO 19139 syntax represents the code and codespace as XML elements, while in this GML representation the code
is a XML value and the codespace is a XML attribute.
Marshalling
Identifiers are typically marshalled as below: If theIdentifier
to marshal contains a version,
then this adapter concatenates the version to the codespace in a "URI-like" way like below:
Unmarshalling
Some data producers put a URN instead of a simple code value, as in the example below: In such case this class takes the codespace as the authority ("IOGP" in above example), and the 3 last URI elements are parsed as the codespace, version (optional) and code values respectively.- Since:
- 0.4
- Version:
- 0.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmarshal
(org.opengis.referencing.ReferenceIdentifier value) Substitutes the identifier by the wrapper to be marshalled into an XML file or stream.org.opengis.referencing.ReferenceIdentifier
Substitutes the wrapper value read from an XML stream by the object which will represents the identifier.
-
Constructor Details
-
RS_Identifier
public RS_Identifier()
-
-
Method Details
-
unmarshal
Substitutes the wrapper value read from an XML stream by the object which will represents the identifier. JAXB calls automatically this method at unmarshalling time.- Specified by:
unmarshal
in classXmlAdapter<Code,
org.opengis.referencing.ReferenceIdentifier> - Parameters:
value
- the wrapper for this metadata value.- Returns:
- an identifier which represents the value.
-
marshal
Substitutes the identifier by the wrapper to be marshalled into an XML file or stream. JAXB calls automatically this method at marshalling time.- Specified by:
marshal
in classXmlAdapter<Code,
org.opengis.referencing.ReferenceIdentifier> - Parameters:
value
- the metadata value.- Returns:
- the adapter for the given metadata.
-