Class ReferencingByIdentifiers

All Implemented Interfaces:
Serializable, Formattable, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceSystem
Direct Known Subclasses:
GeohashReferenceSystem, MilitaryGridReferenceSystem

public abstract class ReferencingByIdentifiers extends AbstractReferenceSystem
Base class of reference systems that describe locations using geographic identifiers instead of coordinates.

Immutability and thread safety

This base class is immutable and thus thread-safe if the property values (not necessarily the map itself) given to the constructor are also immutable. Most SIS subclasses and related classes are immutable under similar conditions. This means that unless otherwise noted in the javadoc, ReferencingByIdentifiers instances created using only SIS factories and static constants can be shared by many objects and passed between threads without synchronization.
Since:
0.8
Version:
1.3
See Also:
  • Field Details

    • THEME_KEY

      public static final String THEME_KEY
      Key for the "theme" property to be given to the object factory createFoo(…) methods. This is used for setting the value to be returned by getTheme().
      See Also:
    • OVERALL_OWNER_KEY

      public static final String OVERALL_OWNER_KEY
      Key for the "overallOwner" property to be given to the object factory createFoo(…) methods. This is used for setting the value to be returned by getOverallOwner().
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • theme

      private final org.opengis.util.InternationalString theme
      Property used to characterize the spatial reference system.
      See Also:
    • overallOwner

      private final AbstractParty overallOwner
      Authority with overall responsibility for the spatial reference system.
      See Also:
    • locationTypes

      final List<AbstractLocationType> locationTypes
      Description of location type(s) in the spatial reference system. This collection shall be unmodifiable.
      See Also:
  • Constructor Details

  • Method Details

    • properties

      static Map<String,Object> properties(Object name, String id, AbstractParty party)
      Convenience method for helping subclasses to build their argument for the constructor. The returned properties have the domain of validity set to the whole word and the theme to "mapping".
      Parameters:
      name - the reference system name as an Identifier or a String.
      id - an identifier for the reference system. Use SIS namespace until we find an authority for them.
      party - the overall owner, or null if none.
    • getTheme

      public org.opengis.util.InternationalString getTheme()
      Property used to characterize the spatial reference system.
      Returns:
      property used to characterize the spatial reference system.
      See Also:
    • getOverallOwner

      public AbstractParty getOverallOwner()
      Authority with overall responsibility for the spatial reference system.
      Upcoming API change — generalization
      in a future SIS version, the type of returned element may be generalized to the org.opengis.metadata.citation.Party interface. This change is pending GeoAPI revision for upgrade from ISO 19115:2003 to ISO 19115:2014.
      Returns:
      authority with overall responsibility for the spatial reference system.
      See Also:
    • getLocationTypes

      public List<? extends ModifiableLocationType> getLocationTypes()
      Description of location type(s) in the spatial reference system. The collection returned by this method is unmodifiable.
      Upcoming API change — generalization
      in a future SIS version, the type of elements type may be generalized to the org.opengis.referencing.gazetteer.Location interface. This change is pending GeoAPI revision.
      Returns:
      description of location type(s) in the spatial reference system.
      See Also:
    • rootType

      final AbstractLocationType rootType()
      Returns the first location type.
    • createCoder

      public abstract ReferencingByIdentifiers.Coder createCoder()
      Returns a new object performing conversions between DirectPosition and identifiers. The returned object is not thread-safe; a new instance must be created for each thread, or synchronization must be applied by the caller.
      Returns:
      a new object performing conversions between DirectPosition and identifiers.
      Since:
      1.3
    • equals

      public boolean equals(Object object, ComparisonMode mode)
      Compares this reference system with the specified object for equality. If the mode argument value is STRICT or BY_CONTRACT, then all available properties are compared including the theme and the overall owner.
      Specified by:
      equals in interface LenientComparable
      Overrides:
      equals in class AbstractReferenceSystem
      Parameters:
      object - the object to compare to this.
      mode - STRICT for performing a strict comparison, or IGNORE_METADATA for comparing only properties relevant to location identifications.
      Returns:
      true if both objects are equal.
      See Also:
    • computeHashCode

      protected long computeHashCode()
      Invoked by hashCode() for computing the hash code when first needed. See AbstractIdentifiedObject.computeHashCode() for more information.
      Overrides:
      computeHashCode in class AbstractReferenceSystem
      Returns:
      the hash code value. This value may change in any future Apache SIS version.
    • formatTo

      @Debug protected String formatTo(Formatter formatter)
      Formats a pseudo-Well Known Text (WKT) representation for this object. The format produced by this method is non-standard and may change in any future Apache SIS version.
      Overrides:
      formatTo in class AbstractIdentifiedObject
      Parameters:
      formatter - the formatter where to format the inner content of this pseudo-WKT element.
      Returns:
      an arbitrary keyword for the pseudo-WKT element.
      See Also: