| java.lang.Object org.geotools.referencing.NamedIdentifier
NamedIdentifier | public class NamedIdentifier implements ReferenceIdentifier,GenericName,Serializable(Code) | | An identification of a CRS object. The main interface implemented by this class is
ReferenceIdentifier . However, this class also implements
GenericName in order to make it possible to reuse the same identifiers in the list of
. Casting an alias's
to an
gives access to more informations, like the URL of the authority.
The
will be infered from
attributes. More specifically, a
will be constructed using the shortest authority's
(or the
if there is no alternate titles) as the
, and the
as the
. This heuristic rule seems raisonable
since, according ISO 19115, the
often contains abreviation (for example "DCW" as an alternative title for
"Digital Chart of the World").
since: 2.1 version: $Id: NamedIdentifier.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux |
Constructor Summary | |
public | NamedIdentifier(Map properties) Constructs an identifier from a set of properties. | public | NamedIdentifier(Citation authority, InternationalString code) Constructs an identifier from an authority and code informations. | public | NamedIdentifier(Citation authority, String code) Constructs an identifier from an authority and code informations. | public | NamedIdentifier(Citation authority, String code, String version) Constructs an identifier from an authority and code informations. | | NamedIdentifier(Map properties, boolean standalone) Implementation of the constructor. |
Method Summary | |
public LocalName | asLocalName() Returns a view of this object as a local name. | public ScopedName | asScopedName() Returns a view of this object as a scoped name,
or
null if this name has no scope. | public int | compareTo(Object object) Compares this name with the specified object for order. | public int | depth() Returns the depth of this name within the namespace hierarchy. | public boolean | equals(Object object) Compares this identifier with the specified object for equality. | public Citation | getAuthority() Organization or party responsible for definition and maintenance of the
. | public String | getCode() Identifier code or name, optionally from a controlled list or pattern. | public String | getCodeSpace() Name or identifier of the person or organization responsible for namespace. | public List | getParsedNames() Returns the sequence of
making this generic name. | public InternationalString | getRemarks() Comments on or information about this identifier, or
null if none. | public GenericName | getScope() Returns the scope (name space) of this generic name. | public String | getVersion() Identifier of the version of the associated code space or code, as specified by the
code authority. | public int | hashCode() Returns a hash code value for this identifier. | public LocalName | name() Returns the last element in the sequence of
. | public ScopedName | push(GenericName scope) Returns this name expanded with the specified scope. | public NameSpace | scope() Returns the scope (name space) in which this name is local. | public GenericName | toFullyQualifiedName() Returns a view of this name as a fully-qualified name. | public InternationalString | toInternationalString() Returns a local-dependent string representation of this generic name. | public String | toString() Returns a string representation of this generic name. |
NamedIdentifier | public NamedIdentifier(Map properties) throws IllegalArgumentException(Code) | | Constructs an identifier from a set of properties. Keys are strings from the table below.
Key are case-insensitive, and leading and trailing spaces are ignored. The map given in
argument shall contains at least a "code" property. Other properties listed
in the table below are optional.
"remarks" is a localizable attributes which may have a language and country
code suffix. For example the "remarks_fr" property stands for remarks in
and the "remarks_fr_CA" property stands
for remarks in
.
throws: InvalidParameterValueException - if a property has an invalid value. throws: IllegalArgumentException - if a property is invalid for some other reason. |
NamedIdentifier | public NamedIdentifier(Citation authority, InternationalString code)(Code) | | Constructs an identifier from an authority and code informations. This is a convenience
constructor for commonly-used parameters. If more control are wanted (for example adding
remarks), use the
.
Parameters: authority - The authority (e.g. Citations.OGC OGC or Citations.EPSG EPSG). Parameters: code - The code. The is usedfor the code, and the international string is used for the. |
NamedIdentifier | public NamedIdentifier(Citation authority, String code)(Code) | | Constructs an identifier from an authority and code informations. This is a convenience
constructor for commonly-used parameters. If more control are wanted (for example adding
remarks), use the
.
Parameters: authority - The authority (e.g. Citations.OGC OGC or Citations.EPSG EPSG). Parameters: code - The code. This parameter is mandatory. |
NamedIdentifier | public NamedIdentifier(Citation authority, String code, String version)(Code) | | Constructs an identifier from an authority and code informations. This is a convenience
constructor for commonly-used parameters. If more control are wanted (for example adding
remarks), use the
.
Parameters: authority - The authority (e.g. Citations.OGC OGC or Citations.EPSG EPSG). Parameters: code - The code. This parameter is mandatory. Parameters: version - The version, or null if none. |
NamedIdentifier | NamedIdentifier(Map properties, boolean standalone) throws IllegalArgumentException(Code) | | Implementation of the constructor. The remarks in the
properties will be
parsed only if the
standalone argument is set to
true , i.e.
this identifier is being constructed as a standalone object. If
false , then
this identifier is assumed to be constructed from inside the
AbstractIdentifiedObject constructor.
Parameters: properties - The properties to parse, as described in the public constructor. Parameters: standalone - true for parsing "remarks" as well. throws: InvalidParameterValueException - if a property has an invalid value. throws: IllegalArgumentException - if a property is invalid for some other reason. |
asLocalName | public LocalName asLocalName()(Code) | | Returns a view of this object as a local name. The local name returned by this method
will have the same
than this generic name.
NamedIdentifier.name() |
compareTo | public int compareTo(Object object)(Code) | | Compares this name with the specified object for order. Returns a negative integer,
zero, or a positive integer as this name lexicographically precedes, is equals to,
or follows the specified object.
|
depth | public int depth()(Code) | | Returns the depth of this name within the namespace hierarchy.
since: 2.3 |
equals | public boolean equals(Object object)(Code) | | Compares this identifier with the specified object for equality.
|
getAuthority | public Citation getAuthority()(Code) | | Organization or party responsible for definition and maintenance of the
.
The authority, or null if not available. |
getCode | public String getCode()(Code) | | Identifier code or name, optionally from a controlled list or pattern.
The code. |
getCodeSpace | public String getCodeSpace()(Code) | | Name or identifier of the person or organization responsible for namespace.
The codespace, or null if not available. |
getParsedNames | public List getParsedNames()(Code) | | Returns the sequence of
making this generic name.
Each element in this list is like a directory name in a file path name.
The length of this sequence is the generic name depth.
|
getRemarks | public InternationalString getRemarks()(Code) | | Comments on or information about this identifier, or
null if none.
|
getScope | public GenericName getScope()(Code) | | Returns the scope (name space) of this generic name. If this name has no scope
(e.g. is the root), then this method returns
null .
NamedIdentifier.scope() |
getVersion | public String getVersion()(Code) | | Identifier of the version of the associated code space or code, as specified by the
code authority. This version is included only when the
uses versions. When appropriate, the edition is identified by the effective date,
coded using ISO 8601 date format.
The version, or null if not available. |
hashCode | public int hashCode()(Code) | | Returns a hash code value for this identifier.
|
name | public LocalName name()(Code) | | Returns the last element in the sequence of
.
since: 2.3 |
push | public ScopedName push(GenericName scope)(Code) | | Returns this name expanded with the specified scope. One may represent this operation
as a concatenation of the specified
name with
this .
since: 2.3 |
scope | public NameSpace scope()(Code) | | Returns the scope (name space) in which this name is local.
since: 2.3 |
toFullyQualifiedName | public GenericName toFullyQualifiedName()(Code) | | Returns a view of this name as a fully-qualified name.
since: 2.3 |
toInternationalString | public InternationalString toInternationalString()(Code) | | Returns a local-dependent string representation of this generic name. This string
is similar to the one returned by
NamedIdentifier.toString except that each element has
been localized in the
.
If no international string is available, then this method returns an implementation mapping
to
NamedIdentifier.toString for all locales.
|
toString | public String toString()(Code) | | Returns a string representation of this generic name. This string representation
is local-independant. It contains all elements listed by
NamedIdentifier.getParsedNames separated by an arbitrary character (usually
: or
/ ).
|
|
|