Class FinalLocationType

java.lang.Object
org.apache.sis.referencing.gazetteer.AbstractLocationType
org.apache.sis.referencing.gazetteer.FinalLocationType
All Implemented Interfaces:
Serializable, LenientComparable

final class FinalLocationType extends AbstractLocationType implements Serializable
Unmodifiable description of a location created as a snapshot of another LocationType instance at ReferencingByIdentifiers construction time. This instance will be set a different reference system than the original location type.
Since:
0.8
Version:
1.1
  • Field Details

    • serialVersionUID

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

      private final org.opengis.util.InternationalString name
      Name of the location type.
    • theme

      private final org.opengis.util.InternationalString theme
      Property used as the defining characteristic of the location type.
    • identifications

      private final List<org.opengis.util.InternationalString> identifications
      Method(s) of uniquely identifying location instances. This list is unmodifiable.
    • definition

      private final org.opengis.util.InternationalString definition
      The way in which location instances are defined.
    • referenceSystem

      private final ReferencingByIdentifiers referenceSystem
      The reference system that comprises this location type.
    • territoryOfUse

      private final org.opengis.metadata.extent.GeographicExtent territoryOfUse
      Geographic area within which the location type occurs.
    • owner

      private final AbstractParty owner
      Name of organization or class of organization able to create and destroy location instances.
    • parents

      private final List<AbstractLocationType> parents
      Parent location types (location types of which this location type is a sub-division). This list is unmodifiable.
    • children

      final List<AbstractLocationType> children
      Child location types (location types which sub-divides this location type). This list is unmodifiable.
  • Constructor Details

    • FinalLocationType

      private FinalLocationType(AbstractLocationType source, ReferencingByIdentifiers rs, Map<AbstractLocationType,FinalLocationType> existing)
      Creates a copy of the given location type with the reference system set to the given value.
      Parameters:
      source - the location type to copy.
      rs - the reference system that comprises this location type.
      existing - other FinalLocationType instances created before this one.
  • Method Details

    • snapshot

      Creates a snapshot of the given location types. This method returns a new collection within which all elements are snapshots (as FinalLocationType instances) of the given location types, except the reference system which is set to the given value.
      Parameters:
      rs - the reference system to assign to the new location types.
      existing - an initially empty identity hash map for internal usage by this method.
    • snapshot

      private static List<org.opengis.util.InternationalString> snapshot(Collection<? extends org.opengis.util.InternationalString> c)
      Returns the given collection as an unmodifiable list.
    • unmodifiable

      private static Object unmodifiable(Object metadata)
      Returns an unmodifiable copy of the given metadata, if necessary and possible.
      Parameters:
      metadata - the metadata object to eventually copy, or null.
      Returns:
      an unmodifiable copy of the given metadata object, or null if the given argument is null.
    • getName

      public org.opengis.util.InternationalString getName()
      Returns the name of the location type.
      Examples: “administrative area”, “town”, “locality”, “street”, “property”.
      Specified by:
      getName in class AbstractLocationType
      Returns:
      name of the location type.
    • getTheme

      public org.opengis.util.InternationalString getTheme()
      Returns the property used as the defining characteristic of the location type.
      Examples: “local administration” for administrative areas, “built environment” for towns or properties, “access” for streets, “electoral”, “postal”.
      Specified by:
      getTheme in class AbstractLocationType
      Returns:
      property used as the defining characteristic of the location type.
      See Also:
    • getIdentifications

      public Collection<org.opengis.util.InternationalString> getIdentifications()
      Returns the method(s) of uniquely identifying location instances.
      Examples: “name”, “code”, “unique street reference number”, “geographic address”.
      Specified by:
      getIdentifications in class AbstractLocationType
      Returns:
      method(s) of uniquely identifying location instances.
    • getDefinition

      public org.opengis.util.InternationalString getDefinition()
      Returns the way in which location instances are defined.
      Specified by:
      getDefinition in class AbstractLocationType
      Returns:
      the way in which location instances are defined.
    • getTerritoryOfUse

      public org.opengis.metadata.extent.GeographicExtent getTerritoryOfUse()
      Returns the geographic area within which the location type occurs.
      Examples: the geographic domain for a location type “rivers” might be “North America”.
      Specified by:
      getTerritoryOfUse in class AbstractLocationType
      Returns:
      geographic area within which the location type occurs.
    • getReferenceSystem

      public ReferencingByIdentifiers getReferenceSystem()
      Returns the reference system that comprises this location type.
      Specified by:
      getReferenceSystem in class AbstractLocationType
      Returns:
      the reference system that comprises this location type.
    • getOwner

      public AbstractParty getOwner()
      Returns the name of organization or class of organization able to create and destroy location instances.
      Specified by:
      getOwner in class AbstractLocationType
      Returns:
      organization or class of organization able to create and destroy location instances.
    • getParents

      public Collection<AbstractLocationType> getParents()
      Returns the parent location types (location types of which this location type is a sub-division). A location type can have more than one possible parent. For example, the parent of a location type named “street” could be “locality”, “town” or “administrative area”.
      Specified by:
      getParents in class AbstractLocationType
      Returns:
      parent location types, or an empty collection if none.
    • getChildren

      public Collection<AbstractLocationType> getChildren()
      Returns the child location types (location types which sub-divides this location type).
      Specified by:
      getChildren in class AbstractLocationType
      Returns:
      child location types, or an empty collection if none.