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<org.apache.sis.internal.jaxb.gml.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<org.apache.sis.internal.jaxb.gml.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
- Author:
- Guilhem Legal (Geomatys), Martin Desruisseaux (Geomatys)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the class of code list wrapped by this adapter.protected StringReturns the default code space for the wrapped code list.final org.apache.sis.internal.jaxb.gml.CodeListAdapter.ValueSubstitutes the code list by the proxy to be marshalled into an XML file or stream.final BoundTypeunmarshal(org.apache.sis.internal.jaxb.gml.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:
unmarshalin classXmlAdapter<org.apache.sis.internal.jaxb.gml.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:
marshalin classXmlAdapter<org.apache.sis.internal.jaxb.gml.CodeListAdapter.Value,BoundType extends org.opengis.util.CodeList<BoundType>> - Parameters:
code- the code list value.- Returns:
- the proxy for the given code list.
-