Class FinalLocationType
java.lang.Object
org.apache.sis.referencing.gazetteer.AbstractLocationType
org.apache.sis.referencing.gazetteer.FinalLocationType
- All Implemented Interfaces:
Serializable
,LenientComparable
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 Summary
FieldsModifier and TypeFieldDescription(package private) final List
<AbstractLocationType> Child location types (location types which sub-divides this location type).private final org.opengis.util.InternationalString
The way in which location instances are defined.private final List
<org.opengis.util.InternationalString> Method(s) of uniquely identifying location instances.private final org.opengis.util.InternationalString
Name of the location type.private final AbstractParty
Name of organization or class of organization able to create and destroy location instances.private final List
<AbstractLocationType> Parent location types (location types of which this location type is a sub-division).private final ReferencingByIdentifiers
The reference system that comprises this location type.private static final long
For cross-version compatibility.private final org.opengis.metadata.extent.GeographicExtent
Geographic area within which the location type occurs.private final org.opengis.util.InternationalString
Property used as the defining characteristic of the location type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the child location types (location types which sub-divides this location type).org.opengis.util.InternationalString
Returns the way in which location instances are defined.Collection
<org.opengis.util.InternationalString> Returns the method(s) of uniquely identifying location instances.org.opengis.util.InternationalString
getName()
Returns the name of the location type.getOwner()
Returns the name of organization or class of organization able to create and destroy location instances.Returns the parent location types (location types of which this location type is a sub-division).Returns the reference system that comprises this location type.org.opengis.metadata.extent.GeographicExtent
Returns the geographic area within which the location type occurs.org.opengis.util.InternationalString
getTheme()
Returns the property used as the defining characteristic of the location type.(package private) static List
<AbstractLocationType> snapshot
(Collection<? extends AbstractLocationType> types, ReferencingByIdentifiers rs, Map<AbstractLocationType, FinalLocationType> existing) Creates a snapshot of the given location types.private static List
<org.opengis.util.InternationalString> snapshot
(Collection<? extends org.opengis.util.InternationalString> c) Returns the given collection as an unmodifiable list.private static Object
unmodifiable
(Object metadata) Returns an unmodifiable copy of the given metadata, if necessary and possible.Methods inherited from class org.apache.sis.referencing.gazetteer.AbstractLocationType
checkForCycles, equals, equals, hashCode, snapshot, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
name
private final org.opengis.util.InternationalString nameName of the location type. -
theme
private final org.opengis.util.InternationalString themeProperty used as the defining characteristic of the location type. -
identifications
Method(s) of uniquely identifying location instances. This list is unmodifiable. -
definition
private final org.opengis.util.InternationalString definitionThe way in which location instances are defined. -
referenceSystem
The reference system that comprises this location type. -
territoryOfUse
private final org.opengis.metadata.extent.GeographicExtent territoryOfUseGeographic area within which the location type occurs. -
owner
Name of organization or class of organization able to create and destroy location instances. -
parents
Parent location types (location types of which this location type is a sub-division). This list is unmodifiable. -
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
- otherFinalLocationType
instances created before this one.
-
-
Method Details
-
snapshot
static List<AbstractLocationType> snapshot(Collection<? extends AbstractLocationType> types, ReferencingByIdentifiers rs, Map<AbstractLocationType, FinalLocationType> existing) Creates a snapshot of the given location types. This method returns a new collection within which all elements are snapshots (asFinalLocationType
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
Returns an unmodifiable copy of the given metadata, if necessary and possible.- Parameters:
metadata
- the metadata object to eventually copy, ornull
.- Returns:
- an unmodifiable copy of the given metadata object, or
null
if the given argument isnull
.
-
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 classAbstractLocationType
- 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 classAbstractLocationType
- Returns:
- property used as the defining characteristic of the location type.
- See Also:
-
getIdentifications
Returns the method(s) of uniquely identifying location instances.Examples: “name”, “code”, “unique street reference number”, “geographic address”.- Specified by:
getIdentifications
in classAbstractLocationType
- 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 classAbstractLocationType
- 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 classAbstractLocationType
- Returns:
- geographic area within which the location type occurs.
-
getReferenceSystem
Returns the reference system that comprises this location type.- Specified by:
getReferenceSystem
in classAbstractLocationType
- Returns:
- the reference system that comprises this location type.
-
getOwner
Returns the name of organization or class of organization able to create and destroy location instances.- Specified by:
getOwner
in classAbstractLocationType
- Returns:
- organization or class of organization able to create and destroy location instances.
-
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 classAbstractLocationType
- Returns:
- parent location types, or an empty collection if none.
-
getChildren
Returns the child location types (location types which sub-divides this location type).- Specified by:
getChildren
in classAbstractLocationType
- Returns:
- child location types, or an empty collection if none.
-