Package org.apache.sis.internal.jaxb.gco
Class URIAdapter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<GO_CharacterString,URI>
org.apache.sis.internal.jaxb.gco.URIAdapter
- Direct Known Subclasses:
URIAdapter.AsURL
JAXB adapter wrapping a URI value with a
<gcx:FileName>
element.- Since:
- 0.3
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Replace<gcx:FileName>
by<gmd:URL>
if marshalling legacy ISO 19139:2007 document. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts aURI
to the object to be marshalled in a XML file or stream.final URI
unmarshal
(GO_CharacterString value) Converts a URI read from a XML stream to the object containing the value.
-
Constructor Details
-
URIAdapter
public URIAdapter()Empty constructor for JAXB.
-
-
Method Details
-
unmarshal
Converts a URI read from a XML stream to the object containing the value. JAXB calls automatically this method at unmarshalling time.- Specified by:
unmarshal
in classXmlAdapter<GO_CharacterString,
URI> - Parameters:
value
- the wrapper for the URI value, ornull
.- Returns:
- a
URI
which represents the URI value, ornull
. - Throws:
URISyntaxException
- if the string is not a valid URI.
-
marshal
Converts aURI
to the object to be marshalled in a XML file or stream. JAXB calls automatically this method at marshalling time.- Specified by:
marshal
in classXmlAdapter<GO_CharacterString,
URI> - Parameters:
value
- the URI value, ornull
.- Returns:
- the wrapper for the given URI, or
null
.
-