| java.lang.Object org.geotools.util.GenericName org.geotools.util.ScopedName
ScopedName | public class ScopedName extends org.geotools.util.GenericName implements org.opengis.util.ScopedName(Code) | | Fully qualified identifier for an object.
A
ScopedName contains a
LocalName as
and a
,
which may be a
LocalName or an other
org.opengis.util.ScopedName ,
as
.
since: 2.1 version: $Id: ScopedName.java 22443 2006-10-27 20:47:22Z desruisseaux $ author: Martin Desruisseaux See Also: NameFactory |
Constructor Summary | |
public | ScopedName(GenericName scope, CharSequence name) Constructs a scoped name from the specified international string.
If the specified name is an
InternationalString , then the
(null)
method will be used in order to fetch an unlocalized name. | public | ScopedName(GenericName scope, char separator, CharSequence name) Constructs a scoped name from the specified international string.
If the specified name is an
InternationalString , then the
(null)
method will be used in order to fetch an unlocalized name. |
Method Summary | |
public LocalName | asLocalName() Returns a view of this object as a local name. | public org.opengis.util.ScopedName | asScopedName() Returns a view of this object as a scoped name. | public int | depth() Returns the depth of this name within the namespace hierarchy. | public boolean | equals(Object object) Compares this scoped name with the specified object for equality. | public List | getParsedNames() Returns the sequence of local name for this
. | public GenericName | getScope() Returns the scope of this name. | public char | getSeparator() Returns the separator character. | public int | hashCode() Returns a hash code value for this generic name. | public LocalName | head() Returns the head of this scoped name. | public LocalName | name() Returns the last element in the sequence of
. | public GenericName | path() Returns a name which contains every element of the
except for the last element. | public org.opengis.util.ScopedName | push(GenericName scope) Returns this name expanded with the specified scope. | public NameSpace | scope() Returns the scope (name space) in which this name is local. | public GenericName | tail() Returns the tail of this scoped name. | public GenericName | toFullyQualifiedName() Returns a view of this name as a fully-qualified name. |
ScopedName | public ScopedName(GenericName scope, CharSequence name)(Code) | | Constructs a scoped name from the specified international string.
If the specified name is an
InternationalString , then the
(null)
method will be used in order to fetch an unlocalized name. Otherwise, the
() method will be used.
Parameters: scope - The scope (or "tail") of the variable. Parameters: name - The head (never null ). |
ScopedName | public ScopedName(GenericName scope, char separator, CharSequence name)(Code) | | Constructs a scoped name from the specified international string.
If the specified name is an
InternationalString , then the
(null)
method will be used in order to fetch an unlocalized name. Otherwise, the
() method will be used.
Parameters: scope - The scope (or "tail") of the variable. Parameters: separator - The separator character (usually ':' or '/' ). Parameters: name - The head (never null ). |
asLocalName | public LocalName asLocalName()(Code) | | Returns a view of this object as a local name. This is the last element in the
sequence of
. The local name returned
by this method will still have the same
than this scoped name. Note however that the string returned by
LocalName.toString will differs.
ScopedName.name |
asScopedName | public org.opengis.util.ScopedName asScopedName()(Code) | | Returns a view of this object as a scoped name. Since this object is already
a scoped name, this method always returns
this .
ScopedName.toFullyQualifiedName |
depth | public int depth()(Code) | | Returns the depth of this name within the namespace hierarchy. This indicates the number
of levels specified by this name. For any
LocalName , it is always one. For a
ScopedName it is some number greater than or equal to 2.
The depth is the length of the list returned by the
ScopedName.getParsedNames method.
As such it is a derived parameter.
since: 2.3 |
equals | public boolean equals(Object object)(Code) | | Compares this scoped name with the specified object for equality.
|
getParsedNames | public List getParsedNames()(Code) | | Returns the sequence of local name for this
.
|
getSeparator | public char getSeparator()(Code) | | Returns the separator character.
|
hashCode | public int hashCode()(Code) | | Returns a hash code value for this generic name.
|
head | public LocalName head()(Code) | | Returns the head of this scoped name. This is the first elements in the sequence of
. The head element must exists in the same
than this scoped name. In other words, the following
relationship must holds:
since: 2.3 |
push | public org.opengis.util.ScopedName push(GenericName scope)(Code) | | Returns this name expanded with the specified scope. One may represent this operation
as a concatenation of the specified
name with
this . In pseudo-code,
the following relationships must hold:
push(name).getParsedList() ==
name.getParsedList().addAll(
)
push(name).scope() == name.
push(
).
== this
Note: Those conditions can be understood in terms of the Java
Object.equals equals method instead of the Java identity comparator
== .
since: 2.3 |
scope | public NameSpace scope()(Code) | | Returns the scope (name space) in which this name is local. The scope is set on creation
and is not modifiable. The scope of a name determines where a name "starts". For instance,
if a name has a
of two (
"util.GenericName" ) and is
associated with a
having the name
"org.opengis" ,
then the fully qualified name would be
"org.opengis.util.GenericName" .
since: 2.3 |
tail | public GenericName tail()(Code) | | Returns the tail of this scoped name. The returned name contains every elements of the
except for the first one, which is the
. In other words, the following relationship must holds:
tail().getParsedNames() == this.
.sublist(1,end)
Note: This condition can be understood in terms of the Java
java.util.List.equals equals method instead of the Java identity
comparator
== .
since: 2.3 |
toFullyQualifiedName | public GenericName toFullyQualifiedName()(Code) | | Returns a view of this name as a fully-qualified name. The
of a fully qualified name must be
. This method
never returns
null .
since: 2.3 |
Fields inherited from org.geotools.util.GenericName | final public static char DEFAULT_SEPARATOR(Code)(Java Doc)
|
|
|