GeoAPI 2.0
Build 2005-06-08

org.opengis.util
Interface GenericName

All Superinterfaces:
Comparable
All Known Subinterfaces:
LocalName, ScopedName

@UML(identifier="GenericName",
     specification=ISO_19103)
public interface GenericName
extends Comparable

Base interface for generic scoped and local name structure for type and attribute name in the context of name spaces.

The natural ordering for generic names is implementation dependent. A recommended practice is to compare lexicographically each element in the list of parsed names. Specific attributes of the name, such as how it treats case, may affect the ordering. In general, two names of different classes may not be compared.

Since:
GeoAPI 1.0
See Also:
Name

Method Summary
 LocalName asLocalName()
          Returns a view of this object as a local name.
 ScopedName asScopedName()
          Returns a view of this object as a scoped name, or null if this name has no scope.
 List<LocalName> getParsedNames()
          Returns the sequence of local names making this generic name.
 GenericName getScope()
          Returns the scope (name space) of this generic 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 interface Comparable
compareTo
 

Method Detail

getScope

@UML(identifier="scope",
     obligation=OPTIONAL,
     specification=ISO_19103)
GenericName getScope()
Returns the scope (name space) of this generic name. If this name has no scope (e.g. is the root), then this method returns null.


getParsedNames

@UML(identifier="parsedName",
     obligation=MANDATORY,
     specification=ISO_19103)
List<LocalName> getParsedNames()
Returns the sequence of local names making this generic name. Each element in this list is like a directory name in a file path name. The length of this sequence is the generic name depth.


asScopedName

ScopedName asScopedName()
Returns a view of this object as a scoped name, or null if this name has no scope.


asLocalName

LocalName asLocalName()
Returns a view of this object as a local name. The local name returned by this method will have the same scope than this generic name.


toString

String toString()
Returns a string representation of this generic name. This string representation is local-independant. It contains all elements listed by getParsedNames() separated by an arbitrary character (usually : or /). This rule implies that the toString() method for a scoped name will contains the scope, while the toString() method for the local version of the same name will not contains the scope.

Overrides:
toString in class Object

toInternationalString

InternationalString toInternationalString()
Returns a local-dependent string representation of this generic name. This string is similar to the one returned by toString() except that each element has been localized in the specified locale. If no international string is available, then this method should returns an implementation mapping to toString() for all locales.


GeoAPI 2.0
Build 2005-06-08

Symbols, terms and definitions
Copyright OpenGIS® Consortium