|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNamedIdentifier
public class NamedIdentifier
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
aliases. Casting an alias's
generic name to an identifier
gives access to more informations, like the URL of the authority.
The generic name will be infered from identifier attributes. More specifically, a scoped name will be constructed 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 head. This heuristic rule seems raisonable since, according ISO 19115, the alternate titles often contains abreviation (for example "DCW" as an alternative title for "Digital Chart of the World").
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. |
Method Summary | |
---|---|
LocalName |
asLocalName()
Deprecated. Replaced by tip() . |
ScopedName |
asScopedName()
Deprecated. Replaced by toFullyQualifiedName() . |
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. |
Citation |
getAuthority()
Organization or party responsible for definition and maintenance of the code. |
String |
getCode()
Identifier code or name, optionally from a controlled list or pattern. |
String |
getCodeSpace()
Name or identifier of the person or organization responsible for namespace. |
List<LocalName> |
getParsedNames()
Returns the sequence of local names making this generic name. |
InternationalString |
getRemarks()
Comments on or information about this identifier, or null if none. |
GenericName |
getScope()
Deprecated. Replaced by scope() . |
String |
getVersion()
Identifier of the version of the associated code space or code, as specified by the code authority. |
int |
hashCode()
Returns a hash code value for this identifier. |
LocalName |
head()
Returns the first element in the sequence of parsed names. |
LocalName |
name()
Deprecated. Replaced by tip() . |
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()
Returns 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 Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NamedIdentifier(Map<String,?> properties) throws IllegalArgumentException
"code"
property. Other properties listed
in the table below are optional.
Property name | Value type | Value given to |
---|---|---|
"code" |
String |
getCode() |
"code" |
String |
getCodeSpace() |
"authority" |
String or Citation |
getAuthority() |
"version" |
String |
getVersion() |
"remarks" |
String or InternationalString |
getRemarks() |
"remarks"
is a localizable attributes which may have a language and country
code suffix. For example the "remarks_fr"
property stands for remarks in
French and the "remarks_fr_CA"
property stands
for remarks in French Canadian.
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
).code
- The code. The English name is used
for the code, and the international string is used for the
generic name.public NamedIdentifier(Citation authority, String code)
authority
- The authority (e.g. OGC
or EPSG
).code
- The code. This parameter is mandatory.public NamedIdentifier(Citation authority, String code, String version)
authority
- The authority (e.g. OGC
or EPSG
).code
- The code. This parameter is mandatory.version
- The version, or null
if none.Method Detail |
---|
public String getCode()
getCode
in interface Identifier
public String getCodeSpace()
getCodeSpace
in interface ReferenceIdentifier
null
if not available.public Citation getAuthority()
getAuthority
in interface Identifier
null
if not available.public String getVersion()
getVersion
in interface ReferenceIdentifier
null
if not available.public InternationalString getRemarks()
null
if none.
public LocalName head()
head
in interface GenericName
public LocalName tip()
tip
in interface GenericName
@Deprecated public LocalName name()
tip()
.
name
in interface GenericName
@Deprecated public LocalName asLocalName()
tip()
.
public NameSpace scope()
scope
in interface GenericName
public GenericName getScope()
scope()
.
null
.
public int depth()
depth
in interface GenericName
public List<LocalName> getParsedNames()
getParsedNames
in interface GenericName
null
neither empty.public ScopedName push(GenericName scope)
name
with this
.
push
in interface GenericName
scope
- The name to use as prefix.
public GenericName toFullyQualifiedName()
toFullyQualifiedName
in interface GenericName
null
).@Deprecated public ScopedName asScopedName()
toFullyQualifiedName()
.
null
if this name has no scope.
public 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 GenericName
public String toString()
getParsedNames()
separated by an arbitrary character (usually :
or /
).
toString
in interface GenericName
toString
in class Object
public int compareTo(GenericName object)
compareTo
in interface Comparable<GenericName>
object
- The object to compare with.
public boolean equals(Object object)
equals
in class Object
object
- The object to compare with this name.
true
if the given object is equals to this name.public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |