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
    Modifier
    Constructor
    Description
    protected
    Empty constructor for subclasses only.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract Class<BoundType>
    Returns the class of code list wrapped by this adapter.
    protected String
    Returns the default code space for the wrapped code list.
    final org.apache.sis.internal.jaxb.gml.CodeListAdapter.Value
    Substitutes the code list by the proxy to be marshalled into an XML file or stream.
    final BoundType
    unmarshal(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CodeListAdapter

      protected CodeListAdapter()
      Empty constructor for subclasses only.
  • Method Details

    • getCodeListClass

      protected abstract Class<BoundType> getCodeListClass()
      Returns the class of code list wrapped by this adapter.
      Returns:
      the code list class.
    • getCodeSpace

      protected String getCodeSpace()
      Returns the default code space for the wrapped code list. The default implementation returns null.
      Returns:
      the default code space, or null.
    • unmarshal

      public final BoundType unmarshal(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. JAXB calls automatically this method at unmarshalling time.
      Specified by:
      unmarshal in class XmlAdapter<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

      public final org.apache.sis.internal.jaxb.gml.CodeListAdapter.Value marshal(BoundType code)
      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 class XmlAdapter<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.