## org.opengis.util
Interface ScopedName

All Superinterfaces:
  Comparable<GenericName>, GenericName

    @UML(identifier="ScopedName",
         specification=ISO_19103)
    public interface ScopedName

extends GenericName

A composite of a local name (as head) for locating another name space, and a generic name (as tail) valid in that name space. This definition allows for iteration. The tail may be either a local name or a scoped name. 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:
  GeoAPI 2.0
See Also:
  `NameFactory.createScopedName(org.opengis.util.GenericName, java.lang.String, org.opengis.util.InternationalString)`

Method Summary
`LocalName` `head()` Returns the head of this scoped name.
`LocalName` `name()` Returns the last element in the sequence of parsed names.
`GenericName` `path()` Returns a name which contains every element of the parsed names list except for the last element.
`GenericName` `tail()` Returns the tail of this scoped name.
`String` `toString()` Returns a locale-independent string representation of this scoped name.

Methods inherited from interface GenericName
`asLocalName, asScopedName, depth, getParsedNames, getScope, push, scope, toFullyQualifiedName, toInternationalString`

Methods inherited from interface Comparable
`compareTo`

Method Detail

### head

    @UML(identifier="head",
         obligation=MANDATORY,
         specification=ISO_19103)
    LocalName head()

  Returns the head of this scoped name. This is the first elements 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:

  - `head().scope() == this.scope()`

  Since:
    GeoAPI 2.1

### tail

    @UML(identifier="tail",
         obligation=MANDATORY,
         specification=ISO_19103)
    GenericName tail()

  Returns the tail of this scoped name. The returned name contains every elements of the parsed names list except for the first one, which is the head. In other words, the following relationship must holds:

  - `tail().getParsedNames() == this.getParsedNames().sublist(1,end)`

  Note: This condition can be understood in terms of the Java `equals` method instead of the Java identity comparator `==`.

  Since:
    GeoAPI 2.1

### path

    @Extension
    GenericName path()

  Returns a name which contains every element of the parsed names list except for the last element.

  Since:
    GeoAPI 2.1
  See Also:
    `File.getPath()`

### name

    @Extension
    LocalName name()

  Returns the last element in the sequence of parsed names.

  Specified by:
    `name` in interface `GenericName`
  Since:
    GeoAPI 2.1
  See Also:
    `File.getName()`

### 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++, 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.

  Specified by:
    `toString` in interface `GenericName`
  Overrides:
    `toString` in class `Object`

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.