org.geotools.util
Class LocalName

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

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

Identifier within a name space for a local object. This could be the target object of the GenericName, or a pointer to another name space (with a new GenericName) one step closer to the target of the identifier.

Since:
2.1
Version:
$Id: LocalName.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
LocalName(java.lang.CharSequence name)
          Constructs a local name from the specified string with no scope.
 
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, or if this name has no scope.
 int compareTo(java.lang.Object object)
          Compares this name with the specified object for order.
 boolean equals(java.lang.Object object)
          Compares this local 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 (name space) of this generic name.
 int hashCode()
          Returns a hash code value for this local name.
 org.opengis.util.InternationalString toInternationalString()
          Returns a local-dependent string representation of this locale name.
 java.lang.String toString()
          Returns a locale-independant string representation of this local name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalName

public LocalName(java.lang.CharSequence name)
Constructs a local name from the specified string with no scope. 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:
name - The local name (never ).
Method Detail

getScope

public org.opengis.util.GenericName getScope()
Returns the scope (name space) of this generic name. This method returns the same value than the one returned by the scoped version of this name. In other words, the following relation shall be respected:
ScopedName.asLocalName() ScopedName
(a locale name)   (a scoped name)  

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

getParsedNames

public java.util.List getParsedNames()
Returns the sequence of local name for this generic name. Since this object is itself a locale name, this method always returns a singleton containing only .

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

asScopedName

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

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. Since this object is already a local name, this method always returns .

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

toString

public java.lang.String toString()
Returns a locale-independant string representation of this local name. This string do not includes the scope, which is consistent with the parsed names definition.

Specified by:
toString in interface org.opengis.util.LocalName
Overrides:
toString in class GenericName

toInternationalString

public org.opengis.util.InternationalString toInternationalString()
Returns a local-dependent string representation of this locale name.

Specified by:
toInternationalString in interface org.opengis.util.GenericName
Overrides:
toInternationalString in class GenericName

compareTo

public int compareTo(java.lang.Object object)
Compares this name with the specified object for order. Returns a negative integer, zero, or a positive integer as this name lexicographically precedes, is equals to, or follows the specified object. The comparaison is case-insensitive.

Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class GenericName

equals

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

Overrides:
equals in class GenericName

hashCode

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

Overrides:
hashCode in class GenericName


Copyright © GeoTools. All Rights Reserved.