Class RS_ReferenceSystem

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
org.apache.sis.internal.jaxb.gco.PropertyType<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
org.apache.sis.internal.jaxb.metadata.RS_ReferenceSystem
Direct Known Subclasses:
RS_ReferenceSystem.Since2014

public class RS_ReferenceSystem extends PropertyType<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
JAXB adapter mapping ISO 19111 Coordinate Reference Systems to MD_ReferenceSystem object used in ISO 19115. Coordinate Reference Systems (CRS) are defined in details by ReferenceSystem implementation classes. But the ISO 19115 metadata standards do not reference those CRS classes directly (except in one case). Instead, the metadata standards reference CRS by their identifier (for example an EPSG code), optionally accompanied by a code telling whether the CRS type is geographic, projected, temporal, a compound of the above, etc. Those two information are combined in a MD_ReferenceSystem class In order to have a more uniform way to handle reference systems, we replace MD_ReferenceSystem tuples by associations to the actual Reference System objects. GeoAPI does that by using the ReferenceSystem interface as the parent of CoordinateReferenceSystem interface. We use this adapter for replacing the full CRS object by the (identifier, type) tuple at marshalling time where such tuple is expected.
Since:
0.3
Version:
1.0
See Also:
  • Constructor Details

    • RS_ReferenceSystem

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

      protected RS_ReferenceSystem(org.opengis.referencing.ReferenceSystem value)
      Wraps a Reference System value in a MD_ReferenceSystem element at marshalling-time.
      Parameters:
      value - the metadata element to marshal.
  • Method Details

    • getBoundType

      protected final Class<org.opengis.referencing.ReferenceSystem> 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<RS_ReferenceSystem,org.opengis.referencing.ReferenceSystem>
      Returns:
      ReferenceSystem.class
    • wrap

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

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

      public final void setElement(ReferenceSystemMetadata value)
      Invoked by JAXB at unmarshalling time for storing the result temporarily.
      Parameters:
      value - the unmarshalled metadata.