public class DefaultScopedName extends AbstractName implements ScopedName
DefaultScopedName
can be instantiated by any of the following methods:
DefaultNameFactory.createGenericName(NameSpace, CharSequence[])
with an array of length 2 or more.DefaultNameFactory.parseGenericName(NameSpace, CharSequence)
with at least one occurrence of the separator in the path.Names
.NameSpace
and all CharSequence
elements in the arguments given to the constructor are also immutable. Subclasses shall make sure that any
overridden methods remain safe to call from multiple threads and do not change any public LocalName
state.DefaultNameSpace
,
DefaultLocalName
,
Serialized FormDefined in the sis-utility
module
Modifier | Constructor and Description |
---|---|
protected |
DefaultScopedName(GenericName path,
GenericName tail)
Constructs a scoped name as the concatenation of the given generic names.
|
protected |
DefaultScopedName(GenericName path,
String separator,
CharSequence tail)
Constructs a scoped name as the concatenation of the given generic name with a single character sequence.
|
protected |
DefaultScopedName(NameSpace scope,
List<? extends CharSequence> names)
Constructs a scoped name from the specified list of strings.
|
Modifier and Type | Method and Description |
---|---|
List<? extends LocalName> |
getParsedNames()
Returns the sequence of local name for this generic name.
|
GenericName |
path()
Returns every element in the sequence of parsed names
except for the tip.
|
NameSpace |
scope()
Returns the scope (name space) in which this name is local.
|
GenericName |
tail()
Returns every elements in the sequence of parsed names
except for the head.
|
castOrCopy, compareTo, depth, equals, hashCode, head, push, tip, toFullyQualifiedName, toInternationalString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
head, tip, toString
depth, push, toFullyQualifiedName, toInternationalString
compareTo
protected DefaultScopedName(NameSpace scope, List<? extends CharSequence> names)
InternationalString
, then its
toString(Locale.ROOT)
method will be invoked for fetching an unlocalized name.
Otherwise the CharSequence.toString()
method will be used.scope
- the scope of this name, or null
for the global scope.names
- the local names. This list must have at least two elements.protected DefaultScopedName(GenericName path, GenericName tail)
path
argument.path
- the first part to concatenate.tail
- the second part to concatenate.protected DefaultScopedName(GenericName path, String separator, CharSequence tail)
path
argument.
The tail is a local name created from the given character sequence.path
- the first part to concatenate.separator
- the separator between the head and the tail,
or null
for inheriting the same separator than the given path.tail
- the second part to concatenate.Names.createScopedName(GenericName, String, CharSequence)
public NameSpace scope()
"org.opengis.util.Record"
and if this instance is the "util.Record"
part, then its scope is
named "org.opengis"
.
Continuing with the above example, the full "org.opengis.util.Record"
name has
no scope. If this method is invoked on such name, then the SIS implementation returns a
global scope instance (i.e. an instance for which DefaultNameSpace.isGlobal()
returns true
) which is unique and named "global"
.
scope
in interface GenericName
scope
in class AbstractName
public GenericName tail()
tail
in interface ScopedName
public GenericName path()
path
in interface ScopedName
public List<? extends LocalName> getParsedNames()
getParsedNames
in interface GenericName
getParsedNames
in class AbstractName
null
neither empty.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.