Class SC_VerticalCRS

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.apache.sis.internal.jaxb.gco.PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
org.apache.sis.internal.jaxb.gml.SC_VerticalCRS
Direct Known Subclasses:
SC_VerticalCRS

public class SC_VerticalCRS extends PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
JAXB adapter for VerticalCRS, in order to integrate the value in an element complying with OGC/ISO standard. Note that the CRS is formatted using the GML schema, not the ISO 19139:2007 one.

This wrapper does not declare directly the XML element, because doing so would require the implementation classes in the sis-referencing module. Instead, this wrapper declares an Object property annotated with XmlAnyElement, with a default implementation returning null. Modules capable to provide an instance shall create a subclass like below:

Next, the module shall provides the following:
  • The path to MyClass shall be provided in the module META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement file.
  • The DefaultVerticalCRS class shall have the XmlRootElement(name = "VerticalCRS") annotation.
  • The DefaultVerticalCRS class shall be declared by a TypeRegistration implementation provided by the module.
Since:
0.3
Version:
0.7
See Also:
  • Constructor Details

    • SC_VerticalCRS

      public SC_VerticalCRS()
      Empty constructor for JAXB only.
    • SC_VerticalCRS

      protected SC_VerticalCRS(org.opengis.referencing.crs.VerticalCRS metadata)
      Wraps a Vertical CRS value with a <gml:VerticalCRS> element at marshalling-time.
      Parameters:
      metadata - the metadata value to marshal.
  • Method Details

    • wrap

      protected SC_VerticalCRS wrap(org.opengis.referencing.crs.VerticalCRS value)
      Returns the Vertical CRS value wrapped by a <gml:VerticalCRS> element.
      Specified by:
      wrap in class PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
      Parameters:
      value - the value to marshal.
      Returns:
      the adapter which wraps the metadata value.
    • getBoundType

      protected final Class<org.opengis.referencing.crs.VerticalCRS> getBoundType()
      Returns the GeoAPI interface which is bound by this adapter.
      Specified by:
      getBoundType in class PropertyType<SC_VerticalCRS,org.opengis.referencing.crs.VerticalCRS>
      Returns:
      VerticalCRS.class
    • getElement

      public Object getElement()
      Returns the DefaultVerticalCRS generated from the metadata value. The default implementation returns null. Subclasses shall override this method like below:
      Returns:
      the metadata to be marshalled.
    • setElement

      public final void setElement(Object crs)
      Sets the value for the given DefaultVerticalCRS. If the given value is an instance of VerticalCRS, then this method assigns that value to the PropertyType.metadata field. Otherwise this method does nothing.
      Parameters:
      crs - the unmarshalled metadata.