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.InternationalStringThe 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.InternationalStringName of the location type.private final AbstractPartyName 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 ReferencingByIdentifiersThe reference system that comprises this location type.private static final longFor cross-version compatibility.private final org.opengis.metadata.extent.GeographicExtentGeographic area within which the location type occurs.private final org.opengis.util.InternationalStringProperty used as the defining characteristic of the location type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFinalLocationType(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.InternationalStringReturns 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.InternationalStringgetName()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.GeographicExtentReturns the geographic area within which the location type occurs.org.opengis.util.InternationalStringgetTheme()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 Objectunmodifiable(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- otherFinalLocationTypeinstances 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 (asFinalLocationTypeinstances) 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
nullif 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:
getNamein 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:
getThemein 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:
getIdentificationsin 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:
getDefinitionin 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:
getTerritoryOfUsein classAbstractLocationType- Returns:
- geographic area within which the location type occurs.
-
getReferenceSystem
Returns the reference system that comprises this location type.- Specified by:
getReferenceSystemin 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:
getOwnerin 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:
getParentsin 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:
getChildrenin classAbstractLocationType- Returns:
- child location types, or an empty collection if none.
-