Interface ScopedName

All Superinterfaces:
Comparable<GenericName>, GenericName

@UML(identifier="ScopedName", specification=ISO_19103) public interface ScopedName extends GenericName
A composite of a LocalName (as head) for locating another name space, and a GenericName (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:
org
.
opengis
.
util
.
Record
This definition allows for iteration. The tail may be either a LocalName or another ScopedName. 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 the 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.

Since:
2.0
  • 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:

      In the GenericName javadoc, the heads are the blue elements in the head.tail column.

      Example: if this name is "org.opengis.util.Record", then this method shall returns "org".
      Analogy: this method is similar in purpose to:
      Specified by:
      head in interface GenericName
      Returns:
      the first element in the list of parsed names.
    • tail

      Returns every elements in the sequence of parsed names except for the head. In other words, the following relationship must holds:

      In the GenericName javadoc, the tails are the yellow elements in the head.tail column.

      Analogy: this method is similar in purpose to Name.getSuffix(1) from the Java Naming and Directory Interface.
      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:

      In the GenericName javadoc, the paths are the blue elements in the path.tip column.

      Analogy: this method is similar in purpose to:
      Returns:
      all elements except the last one in the in the list of parsed names.
      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 ISO tail() method.
    • tip

      LocalName tip()
      Returns the last element in the sequence of parsed names.

      In the GenericName javadoc, the tips are the yellow elements in the path.tip column.

      Analogy: this method is similar in purpose to:
      Specified by:
      tip in interface GenericName
      Returns:
      the last element in the list of parsed names.
    • 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 or Authority:Identifier notation.
      Analogy: this method is similar in purpose to the File.toString() or Path.toString() method in Java I/O.
      Specified by:
      toString in interface GenericName
      Overrides:
      toString in class Object
      Returns:
      the local-independent string representation of this name.