Class GM_Object

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<GM_Object,org.opengis.geometry.Geometry>
org.apache.sis.internal.jaxb.geometry.GM_Object

public class GM_Object extends XmlAdapter<GM_Object,org.opengis.geometry.Geometry>
JAXB adapter for Geometry, in order to integrate the value in an element complying with OGC/ISO standard. The geometry element names are usually prefixed by gml:.

The default implementation does almost nothing. The geometry objects will not create the expected JAXBElement type. This class is only a hook to be extended by more specialized subclasses in GML modules.

Since:
0.3
Version:
0.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected JAXBElement<? extends org.opengis.geometry.Geometry>
    The Geometry value covered by a gml:** element.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor for JAXB and subclasses only.
  • Method Summary

    Modifier and Type
    Method
    Description
    final GM_Object
    marshal(org.opengis.geometry.Geometry value)
    Converts a GeoAPI interface to the appropriate adapter for the way it will be marshalled into an XML file or stream.
    final org.opengis.geometry.Geometry
    Converts an adapter read from an XML stream to the GeoAPI interface which will contains this value.
    protected GM_Object
    wrap(org.opengis.geometry.Geometry value)
    Returns the geometry value to be covered by a gml:** element.

    Methods inherited from class java.lang.Object

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

    • geometry

      protected JAXBElement<? extends org.opengis.geometry.Geometry> geometry
      The Geometry value covered by a gml:** element.
  • Constructor Details

    • GM_Object

      public GM_Object()
      Empty constructor for JAXB and subclasses only.
  • Method Details

    • unmarshal

      public final org.opengis.geometry.Geometry unmarshal(GM_Object value)
      Converts an adapter read from an XML stream to the GeoAPI interface which will contains this value. JAXB calls automatically this method at unmarshalling time.
      Specified by:
      unmarshal in class XmlAdapter<GM_Object,org.opengis.geometry.Geometry>
      Parameters:
      value - the adapter for a geometry value.
      Returns:
      an instance of the GeoAPI interface which represents the geometry value.
    • marshal

      public final GM_Object marshal(org.opengis.geometry.Geometry value)
      Converts a GeoAPI interface to the appropriate adapter for the way it will be marshalled into an XML file or stream. JAXB calls automatically this method at marshalling time.
      Specified by:
      marshal in class XmlAdapter<GM_Object,org.opengis.geometry.Geometry>
      Parameters:
      value - the geometry value, here the interface.
      Returns:
      the adapter for the given value.
    • wrap

      protected GM_Object wrap(org.opengis.geometry.Geometry value)
      Returns the geometry value to be covered by a gml:** element. The default implementation returns null if all cases. Subclasses must override this method in order to provide useful marshalling.
      Parameters:
      value - the value to marshal.
      Returns:
      the adapter which covers the geometry value.