Class SC_SingleCRS

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<SC_SingleCRS,org.opengis.referencing.crs.SingleCRS>
org.apache.sis.internal.jaxb.gco.PropertyType<SC_SingleCRS,org.opengis.referencing.crs.SingleCRS>
org.apache.sis.internal.jaxb.referencing.SC_SingleCRS

public final class SC_SingleCRS extends PropertyType<SC_SingleCRS,org.opengis.referencing.crs.SingleCRS>
JAXB adapter mapping implementing class to the GeoAPI interface. See package documentation for more information about JAXB and interface.
Since:
0.7
Version:
0.7
  • Constructor Details

    • SC_SingleCRS

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

      private SC_SingleCRS(org.opengis.referencing.crs.SingleCRS crs)
      Constructor for the wrap(org.opengis.referencing.crs.SingleCRS) method only.
  • Method Details

    • getBoundType

      protected Class<org.opengis.referencing.crs.SingleCRS> getBoundType()
      Returns the GeoAPI interface which is bound by this adapter. This method is indirectly invoked by the private constructor below, so it shall not depend on the state of this object.
      Specified by:
      getBoundType in class PropertyType<SC_SingleCRS,org.opengis.referencing.crs.SingleCRS>
      Returns:
      SingleCRS.class
    • wrap

      protected SC_SingleCRS wrap(org.opengis.referencing.crs.SingleCRS crs)
      Invoked by PropertyType at marshalling time for wrapping the given value in a <gml:AbstractSingleCRS> XML element.
      Specified by:
      wrap in class PropertyType<SC_SingleCRS,org.opengis.referencing.crs.SingleCRS>
      Parameters:
      crs - the element to marshal.
      Returns:
      a PropertyType wrapping the given the element.
    • getElement

      public AbstractCRS getElement()
      Invoked by JAXB at marshalling time for getting the actual element to write inside the <gml:AbstractSingleCRS> XML element. This is the value or a copy of the value given in argument to the wrap method.
      Returns:
      the element to be marshalled.
    • setElement

      public void setElement(AbstractCRS crs)
      Invoked by JAXB at unmarshalling time for storing the result temporarily.
      Note: the unmarshalled CRS may be of GeodeticCRS type, which is not the most specific GeoAPI type. See SC_CRS.setElement(AbstractCRS) for more discussion.
      Parameters:
      crs - the unmarshalled element.
      Throws:
      IllegalArgumentException - if the unmarshalled CRS is not a single CRS.