Package org.opengis.util
Interface ScopedName
-
- All Superinterfaces:
Comparable<GenericName>,GenericName
@UML(identifier="ScopedName", specification=ISO_19103) public interface ScopedName extends GenericName
A composite of aLocalName(as head) for locating another name space, and aGenericName(as tail) valid in that name space. For example if this name is"org.opengis.util.Record", then the head and tail components are as below. The path and tip() are also shown for completeness:
This definition allows for iteration. The tail may be either aorg . opengis . util . Record head tail path tip LocalNameor anotherScopedName. If it is a scoped name, then another another step towards a remote local name is taken. In this way, a scoped name may represent an arbitrarily distant local name simply by the number of times thetail()method evaluates to aScopedNamebefore finally terminating on aLocalName.It may be seen that
ScopedNameis the means by which fully-qualified names are expressed. However, aScopedNameis not, in itself, what is commonly thought of as a fully qualified name. TheScopedNametype is one link in the chain, not the entire chain. A scoped name is a fully qualified name only if its scope is global.- Since:
- 2.0
-
-
Method Summary
Modifier and Type Method Description LocalNamehead()Returns the first element in the sequence of parsed names.GenericNamepath()Returns every elements in the sequence parsed names except for the tip.GenericNametail()Returns every elements in the sequence of parsed names except for the head.LocalNametip()Returns the last element in the sequence of parsed names.StringtoString()Returns a locale-independent string representation of this scoped name.-
Methods inherited from interface GenericName
compareTo, depth, getParsedNames, push, scope, toFullyQualifiedName, toInternationalString
-
-
-
-
Method Detail
-
head
@UML(identifier="head", obligation=MANDATORY, specification=ISO_19103) LocalName 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:In the
GenericNamejavadoc, the heads are the blue elements in the head.tail column.Example: Ifthisname is"org.opengis.util.Record", then this method shall returns"org".Analogy: This method is similar in purpose to:Path.getName(0)from Java I/O;Name.get(0)from the Java Naming and Directory Interface.
- Specified by:
headin interfaceGenericName- Returns:
- the first element in the list of parsed names.
-
tail
@UML(identifier="tail", obligation=MANDATORY, specification=ISO_19103) GenericName tail()
Returns every elements in the sequence of parsed names except for the head. In other words, the following relationship must holds:tail().getParsedNames()equalsthis.getParsedNames().sublist(1, depth)
In the
GenericNamejavadoc, the tails are the yellow elements in the head.tail column.Analogy: 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.
-
path
GenericName path()
Returns every elements in the sequence parsed names except for the tip. In other words, the following relationship must holds:tip().getParsedNames()equalsthis.getParsedNames().sublist(0, depth-1)
In the
GenericNamejavadoc, the paths are the blue elements in the path.tip column.Analogy: This method is similar in purpose to:- the
File.getParentFile()orPath.getParent()from Java I/O; 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.
Departure from OGC/ISO specification:
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.In the
GenericNamejavadoc, the tips are the yellow elements in the path.tip column.Analogy: This method is similar in purpose to:- the
File.getName()orPath.getFileName()method in Java I/O; Name.get(size-1)from the Java Naming and Directory Interface.
- Specified by:
tipin interfaceGenericName- Returns:
- the last element in the list of parsed names.
- the
-
toString
@UML(identifier="scopedName", obligation=MANDATORY, specification=ISO_19103) String 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:Identifiernotation.Analogy: This method is similar in purpose to:- the
File.toString()orPath.toString()method in Java I/O.
- Specified by:
toStringin interfaceGenericName- Overrides:
toStringin classObject- Returns:
- the local-independent string representation of this name.
- the
-
-