Package org.apache.sis.internal.jaxb.gml
Class CodeListAdapter<BoundType extends org.opengis.util.CodeList<BoundType>>
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<CodeListAdapter.Value,BoundType>
org.apache.sis.internal.jaxb.gml.CodeListAdapter<BoundType>
- Type Parameters:
BoundType
- the code list being wrapped.
- Direct Known Subclasses:
CD_PixelInCell
,CD_VerticalDatumType
,CS_AxisDirection
,CS_RangeMeaning
public abstract class CodeListAdapter<BoundType extends org.opengis.util.CodeList<BoundType>>
extends XmlAdapter<CodeListAdapter.Value,BoundType>
JAXB adapter for GML code lists, in order to integrate the value in an element
complying with GML standard. A subclass shall exist for each code list.
- Since:
- 0.3
- Version:
- 0.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Wraps theCodeList
value in a GML document. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the class of code list wrapped by this adapter.protected String
Returns the default code space for the wrapped code list.final CodeListAdapter.Value
Substitutes the code list by the proxy to be marshalled into an XML file or stream.final BoundType
unmarshal
(CodeListAdapter.Value identifier) Substitutes the adapter value read from an XML stream by the object which will contain the value.
-
Constructor Details
-
CodeListAdapter
protected CodeListAdapter()Empty constructor for subclasses only.
-
-
Method Details
-
getCodeListClass
Returns the class of code list wrapped by this adapter.- Returns:
- the code list class.
-
getCodeSpace
Returns the default code space for the wrapped code list. The default implementation returnsnull
.- Returns:
- the default code space, or
null
.
-
unmarshal
Substitutes the adapter value read from an XML stream by the object which will contain the value. JAXB calls automatically this method at unmarshalling time.- Specified by:
unmarshal
in classXmlAdapter<CodeListAdapter.Value,
BoundType extends org.opengis.util.CodeList<BoundType>> - Parameters:
identifier
- the code space and identifier.- Returns:
- a code list which represents the GML value.
-
marshal
Substitutes the code list by the proxy to be marshalled into an XML file or stream. JAXB calls automatically this method at marshalling time.- Specified by:
marshal
in classXmlAdapter<CodeListAdapter.Value,
BoundType extends org.opengis.util.CodeList<BoundType>> - Parameters:
code
- the code list value.- Returns:
- the proxy for the given code list.
-