Class ReferenceSystemMetadata

java.lang.Object
org.apache.sis.internal.simple.SimpleIdentifiedObject
org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata
All Implemented Interfaces:
Serializable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceSystem
Direct Known Subclasses:
DirectReferenceSystem, IndirectReferenceSystem

public class ReferenceSystemMetadata extends SimpleIdentifiedObject implements org.opengis.referencing.ReferenceSystem
An implementation of ReferenceSystem marshalled as specified in ISO 19115. This is different than the ReferenceSystem implementation provided in the referencing module, since the latter marshals the CRS as specified in GML (close to ISO 19111 model). This class contains only CRS identification as below: The referenceSystemType attribute is currently missing. See SIS-470.

Note that this implementation is very simple and serves no other purpose than being a container for XML parsing or formatting. For real referencing service, consider using AbstractReferenceSystem subclasses instead.

Since:
0.3
Version:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    true if marshalling ISO 19115:2003 model, or false if marshalling ISO 19115:2014 model.
    private static final long
    For cross-version compatibility.

    Fields inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject

    name

    Fields inherited from interface org.opengis.referencing.IdentifiedObject

    ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceSystem

    DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a reference system without identifier.
    ReferenceSystemMetadata(org.opengis.referencing.ReferenceIdentifier name)
    Creates a new reference system from the given identifier.
    ReferenceSystemMetadata(org.opengis.referencing.ReferenceSystem crs)
    Creates a new reference system from the given one.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    Invoked by JAXB Marshaller before this object is marshalled to XML.
    boolean
    equals(Object object, ComparisonMode mode)
    Compares this object with the given one for equality.
    final org.opengis.referencing.ReferenceIdentifier
    Returns the primary name by which this object is identified.
    final void
    setName(org.opengis.referencing.ReferenceIdentifier name)
    Sets the primary name by which this object is identified.

    Methods inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject

    equals, getAlias, getDomainOfValidity, getIdentifiers, getRemarks, getScope, hashCode, toString, toWKT

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.referencing.IdentifiedObject

    getAlias, getIdentifiers, getRemarks, toWKT

    Methods inherited from interface org.opengis.referencing.ReferenceSystem

    getDomainOfValidity, getScope
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • isLegacyMetadata

      private boolean isLegacyMetadata
      true if marshalling ISO 19115:2003 model, or false if marshalling ISO 19115:2014 model.
  • Constructor Details

    • ReferenceSystemMetadata

      public ReferenceSystemMetadata()
      Creates a reference system without identifier. This constructor is mainly for JAXB.
    • ReferenceSystemMetadata

      public ReferenceSystemMetadata(org.opengis.referencing.ReferenceSystem crs)
      Creates a new reference system from the given one.
      Parameters:
      crs - the reference system to partially copy.
    • ReferenceSystemMetadata

      public ReferenceSystemMetadata(org.opengis.referencing.ReferenceIdentifier name)
      Creates a new reference system from the given identifier.
      Parameters:
      name - the primary name by which this object is identified.
  • Method Details

    • beforeMarshal

      private void beforeMarshal(Marshaller marshaller)
      Invoked by JAXB Marshaller before this object is marshalled to XML.
    • getName

      public final org.opengis.referencing.ReferenceIdentifier getName()
      Returns the primary name by which this object is identified. This method can be invoked during ISO 19115-3 marshalling.
      Specified by:
      getName in interface org.opengis.referencing.IdentifiedObject
      Overrides:
      getName in class SimpleIdentifiedObject
      Returns:
      the identifier given at construction time.
    • setName

      public final void setName(org.opengis.referencing.ReferenceIdentifier name)
      Sets the primary name by which this object is identified.
      Parameters:
      name - the new primary name.
    • equals

      public boolean equals(Object object, ComparisonMode mode)
      Compares this object with the given one for equality.
      Specified by:
      equals in interface LenientComparable
      Overrides:
      equals in class SimpleIdentifiedObject
      Parameters:
      object - the object to compare with this reference system.
      mode - the strictness level of the comparison.
      Returns:
      true if both objects are equal.
      See Also: