|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGenericName
public abstract class GenericName
Base class for generic scoped and local name structure for type and attribute name in the context of name spaces.
Note: this class has a natural ordering that is inconsistent with equals
.
The natural ordering may be case-insensitive and ignores the character separator between name elements.
NameFactory
,
Serialized Form
Field Summary | |
---|---|
static char |
DEFAULT_SEPARATOR
The default separator character. |
Constructor Summary | |
---|---|
protected |
GenericName()
Creates a new instance of generic name. |
Method Summary | |
---|---|
LocalName |
asLocalName()
Deprecated. Renamed as name() . |
abstract ScopedName |
asScopedName()
Deprecated. Replaced by GenericName.toFullyQualifiedName() . |
int |
compareTo(GenericName that)
Compares this name with the specified object for order. |
int |
depth()
Returns the depth of this name within the namespace hierarchy. |
boolean |
equals(Object object)
Compares this generic name with the specified object for equality. |
abstract List<LocalName> |
getParsedNames()
Returns the sequence of local names making this generic name. |
abstract GenericName |
getScope()
Deprecated. Replaced by scope() . |
int |
hashCode()
Returns a hash code value for this generic name. |
LocalName |
head()
Returns the first element in the sequence of parsed names. |
abstract LocalName |
name()
Deprecated. Renamed as tip() . |
NameSpace |
scope()
Returns the scope (name space) in which this name is local. |
LocalName |
tip()
Returns the last element in the sequence of parsed names. |
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 class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface GenericName |
---|
push, toFullyQualifiedName |
Field Detail |
---|
public static final char DEFAULT_SEPARATOR
Constructor Detail |
---|
protected GenericName()
Method Detail |
---|
public NameSpace scope()
"util.GenericName"
) and is
associated with a name space having the name "org.opengis"
,
then the fully qualified name would be "org.opengis.util.GenericName"
.
scope
in interface GenericName
@Deprecated public abstract GenericName getScope()
scope()
.
null
.
getScope
in interface GenericName
public int depth()
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 getParsedNames()
method.
As such it is a derived parameter.
depth
in interface GenericName
public abstract List<LocalName> getParsedNames()
getParsedNames
in interface GenericName
@Deprecated public LocalName asLocalName()
name()
.
asLocalName
in interface GenericName
public abstract LocalName name()
tip()
.
LocalName
, this is always this
.
name
in interface GenericName
LocalName.name
,
ScopedName.name
public LocalName tip()
LocalName
, this is always this
.
public LocalName head()
@Deprecated public abstract ScopedName asScopedName()
GenericName.toFullyQualifiedName()
.
null
if none.
The scope of a fully qualified name must be
global.
If this name is a local name and the scope
is already global, returns null
since it is not
possible to derive a scoped name.
asScopedName
in interface GenericName
public String toString()
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.
toString
in interface GenericName
toString
in class Object
public InternationalString toInternationalString()
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.
toInternationalString
in interface GenericName
public int compareTo(GenericName that)
compareTo
in interface Comparable<GenericName>
that
- The name to compare with this name.
public boolean equals(Object object)
equals
in class Object
object
- The object to compare with this name.
true
if the given object is equals to this one.public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |