|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectDefaultReferenceIdentifier
NamedIdentifier
@Immutable public class NamedIdentifier
An identification of a CRS object which is both an identifier
and a name. 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
aliases. Casting an alias
GenericName to an ReferenceIdentifier gives access to more
informations, like the URL of the authority.
The generic name will be inferred from ReferenceIdentifier attributes. More
specifically, a scoped name will be created using the shortest
authority's alternate titles (or the
main title if there is no alternate titles) as the
scope, and the code as the
tip. This heuristic rule seems reasonable since,
according ISO 19115, the alternate titles
often contains abbreviation (for example "DCW" as an alternative title for
"Digital Chart of the World").
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from interface ReferenceIdentifier |
|---|
CODESPACE_KEY, VERSION_KEY |
| Fields inherited from interface Identifier |
|---|
AUTHORITY_KEY, CODE_KEY |
| Constructor Summary | |
|---|---|
NamedIdentifier(Citation authority,
InternationalString code)
Constructs an identifier from an authority and code informations. |
|
NamedIdentifier(Citation authority,
String code)
Constructs an identifier from an authority and code informations. |
|
NamedIdentifier(Citation authority,
String code,
String version)
Constructs an identifier from an authority and code informations. |
|
NamedIdentifier(Map<String,?> properties)
Constructs an identifier from a set of properties. |
|
NamedIdentifier(ReferenceIdentifier identifier)
Creates a new identifier from the specified one. |
|
| Method Summary | |
|---|---|
int |
compareTo(GenericName object)
Compares this name with the specified object for order. |
int |
depth()
Returns the depth of this name within the namespace hierarchy. |
boolean |
equals(Object object)
Compares this identifier with the specified object for equality. |
List<? extends LocalName> |
getParsedNames()
Returns the sequence of local names making this generic name. |
LocalName |
head()
Returns the first element in the sequence of parsed names. |
ScopedName |
push(GenericName scope)
Returns this name expanded with the specified scope. |
NameSpace |
scope()
Returns the scope (name space) in which this name is local. |
LocalName |
tip()
The last element in the sequence of parsed names. |
GenericName |
toFullyQualifiedName()
Returns a view of this name as a fully-qualified name. |
InternationalString |
toInternationalString()
Returns a local-dependent string representation of this generic name. |
String |
toString()
Returns a string representation of this generic name. |
| Methods inherited from class DefaultReferenceIdentifier |
|---|
getAuthority, getCode, getCodeSpace, getRemarks, getVersion, hashCode, isDeprecated |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NamedIdentifier(ReferenceIdentifier identifier)
If the given identifier implements the GenericName interface, then calls to
tip(), head(), scope() and similar methods will delegates
to that name.
identifier - The identifier to copy.
public NamedIdentifier(Map<String,?> properties)
throws IllegalArgumentException
properties - The properties to be given to this identifier.
InvalidParameterValueException - if a property has an invalid value.
IllegalArgumentException - if a property is invalid for some other reason.
public NamedIdentifier(Citation authority,
InternationalString code)
authority - The authority (e.g. OGC or EPSG),
or null if not available.code - The code. The toString(null) method
is invoked for the code, and the complete international string is retained for
the generic name.
public NamedIdentifier(Citation authority,
String code)
authority - The authority (e.g. OGC or EPSG),
or null if not available.code - The code. This parameter is mandatory.
public NamedIdentifier(Citation authority,
String code,
String version)
authority - The authority (e.g. OGC or EPSG),
or null if not available.code - The code. This parameter is mandatory.version - The version, or null if none.| Method Detail |
|---|
public LocalName tip()
DefaultReferenceIdentifier.getCode() provided as a local name.
tip in interface GenericNameDefaultReferenceIdentifier.getCode()public LocalName head()
DefaultReferenceIdentifier.getCodeSpace(org.opengis.metadata.citation.Citation) provided as a local name.
head in interface GenericNamescope(),
DefaultReferenceIdentifier.getCodeSpace(org.opengis.metadata.citation.Citation)public NameSpace scope()
DefaultReferenceIdentifier.getCodeSpace(org.opengis.metadata.citation.Citation) provided as a name space.
scope in interface GenericNamehead(),
DefaultReferenceIdentifier.getCodeSpace(org.opengis.metadata.citation.Citation)public int depth()
depth in interface GenericNamepublic List<? extends LocalName> getParsedNames()
getParsedNames in interface GenericNamepublic ScopedName push(GenericName scope)
name with this.
push in interface GenericNamepublic GenericName toFullyQualifiedName()
toFullyQualifiedName in interface GenericNamepublic InternationalString toInternationalString()
toString() except that each element has
been localized in the specified locale.
If no international string is available, then this method returns an implementation mapping
to toString() for all locales.
toInternationalString in interface GenericNamepublic String toString()
getParsedNames()
separated by an arbitrary character (usually : or /).
toString in interface GenericNametoString in class DefaultReferenceIdentifierpublic int compareTo(GenericName object)
compareTo in interface Comparable<GenericName>object - The object to compare with.
public boolean equals(Object object)
equals in class DefaultReferenceIdentifierobject - The object to compare with this name.
true if the given object is equal to this name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||