- All Superinterfaces:
Comparable<GenericName>
,GenericName
tail()
method
evaluates to a ScopedName
before finally terminating on a LocalName
.
It may be seen that ScopedName
is the means by which fully-qualified names are expressed.
However, a ScopedName
is not, in itself, what is commonly thought of as a fully
qualified name. The ScopedName
type is one link in the chain, not the entire chain.
A scoped name is a fully qualified name only if its scope is
global.
Example:
The illustration below shows the head, tail, path and name of "org.opengis.util.Record"
.
org . opengis . util . Record head tail path tip
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionhead()
Returns the first element in the sequence of parsed names.path()
Returns every elements of the parsed names list except for the tip.tail()
Returns every elements of the parsed names list except for the head.tip()
Returns the last element in the sequence of parsed names.toString()
Returns a locale-independent string representation of this scoped name.Methods inherited from interface Comparable
compareTo
Methods inherited from interface GenericName
depth, getParsedNames, push, scope, toFullyQualifiedName, toInternationalString
-
Method Details
-
head
Returns the first element in the sequence of parsed names. The head element must exists in the same name space than this scoped name. In other words, the following relationship must holds:This method is similar in purpose to
Name.get(0)
from the Java Naming and Directory Interface.Example: If
this
name is"org.opengis.util.Record"
, then this method shall returns"org"
.- Specified by:
head
in interfaceGenericName
- Returns:
- The first element in the list of parsed names.
- Since:
- 2.2
-
tail
Returns every elements of the parsed names list except for the head. In other words, the following relationship must holds:tail().getParsedNames() equals this.getParsedNames().sublist(1, depth)
This method is similar in purpose to
from the Java Naming and Directory Interface.Name.getSuffix
(1)- Returns:
- All elements except the first one in the in the list of parsed names.
- Since:
- 2.1
-
path
GenericName path()Returns every elements of the parsed names list except for the tip. In other words, the following relationship must holds:tip().getParsedNames() equals this.getParsedNames().sublist(0, depth-1)
This method is similar in purpose to
from the Java Naming and Directory Interface.Name.getPrefix
(size-1)- Returns:
- All elements except the last one in the in the list of parsed names.
- Since:
- 2.1
- Departure from OGC/ISO abstract specification:
Extension for convenience without introduction of new functionality
This method is not part of ISO specification. It has been added in GeoAPI as a complement of the ISOtail()
method.
-
tip
LocalName tip()Returns the last element in the sequence of parsed names.This method is similar in purpose to
Name.get(size-1)
from the Java Naming and Directory Interface.- Specified by:
tip
in interfaceGenericName
- Returns:
- The last element in the list of parsed names.
- Since:
- 2.1
-
toString
Returns a locale-independent string representation of this scoped name. This method encapsulates the domain logic which formats the parsed names into a legal string representation of the name. There will be variants on this theme. XML aficionados may require URIs. For Java classes, a dotted notation is more appropriate, for C/C++, a double-colon, for directories, a forward or reverse slash, and for CRS, it will depend on the mode of expression: URN orAuthority:Identifier
notation.- Specified by:
toString
in interfaceGenericName
- Overrides:
toString
in classObject
- Returns:
- A local-independent string representation of this name.
-