org.geotools.util
Class ScopedName

java.lang.Object
  extended byorg.geotools.util.GenericName
      extended byorg.geotools.util.ScopedName
All Implemented Interfaces:
java.lang.Comparable, org.opengis.util.GenericName, org.opengis.util.ScopedName, java.io.Serializable

public class ScopedName
extends GenericName
implements org.opengis.util.ScopedName

Fully qualified identifier for an object. A contains a LocalName as head and a GenericName, which may be a LocalName or an other ScopedName, as tail.

Since:
2.1
Version:
$Id: ScopedName.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
NameFactory, Serialized Form

Field Summary
 
Fields inherited from class org.geotools.util.GenericName
DEFAULT_SEPARATOR
 
Constructor Summary
ScopedName(org.opengis.util.GenericName scope, char separator, java.lang.CharSequence name)
          Constructs a scoped name from the specified international string.
ScopedName(org.opengis.util.GenericName scope, java.lang.CharSequence name)
          Constructs a scoped name from the specified international string.
 
Method Summary
 org.opengis.util.LocalName asLocalName()
          Returns a view of this object as a local name.
 org.opengis.util.ScopedName asScopedName()
          Returns a view of this object as a scoped name.
 boolean equals(java.lang.Object object)
          Compares this scoped name with the specified object for equality.
 java.util.List getParsedNames()
          Returns the sequence of local name for this generic name.
 org.opengis.util.GenericName getScope()
          Returns the scope of this name.
 char getSeparator()
          Returns the separator character.
 int hashCode()
          Returns a hash code value for this generic name.
 
Methods inherited from class org.geotools.util.GenericName
compareTo, toInternationalString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.util.ScopedName
toString
 
Methods inherited from interface org.opengis.util.GenericName
toInternationalString
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ScopedName

public ScopedName(org.opengis.util.GenericName scope,
                  java.lang.CharSequence name)
Constructs a scoped name from the specified international string. If the specified name is an InternationalString, then the toString(null) method will be used in order to fetch an unlocalized name. Otherwise, the toString() method will be used.

Parameters:
scope - The scope (or "tail") of the variable.
name - The head (never ).

ScopedName

public ScopedName(org.opengis.util.GenericName scope,
                  char separator,
                  java.lang.CharSequence name)
Constructs a scoped name from the specified international string. If the specified name is an InternationalString, then the toString(null) method will be used in order to fetch an unlocalized name. Otherwise, the toString() method will be used.

Parameters:
scope - The scope (or "tail") of the variable.
separator - The separator character (usually ':' or '/').
name - The head (never ).
Method Detail

getScope

public org.opengis.util.GenericName getScope()
Returns the scope of this name.

Specified by:
getScope in interface org.opengis.util.ScopedName
Specified by:
getScope in class GenericName

getSeparator

public char getSeparator()
Returns the separator character.


asScopedName

public org.opengis.util.ScopedName asScopedName()
Returns a view of this object as a scoped name. Since this object is already a scoped name, this method always returns .

Specified by:
asScopedName in interface org.opengis.util.GenericName

asLocalName

public org.opengis.util.LocalName asLocalName()
Returns a view of this object as a local name. This is the last element in the sequence of parsed names. The local name returned by this method will still have the same scope than this scoped name. Note however that the string returned by LocalName.toString() will differs.

Specified by:
asLocalName in interface org.opengis.util.ScopedName

getParsedNames

public java.util.List getParsedNames()
Returns the sequence of local name for this generic name.

Specified by:
getParsedNames in interface org.opengis.util.GenericName
Specified by:
getParsedNames in class GenericName

equals

public boolean equals(java.lang.Object object)
Compares this scoped name with the specified object for equality.

Overrides:
equals in class GenericName

hashCode

public int hashCode()
Returns a hash code value for this generic name.

Overrides:
hashCode in class GenericName


Copyright © GeoTools. All Rights Reserved.