Package org.opengis.example.util
Class SimpleNameSpace
- Object
-
- SimpleNameSpace
-
- All Implemented Interfaces:
Serializable
,NameSpace
public class SimpleNameSpace extends Object implements NameSpace, Serializable
ANameSpace
defining the scope ofSimpleName
instances.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SimpleNameFactory
factory
The factory to use for creating name instances in this namespace.
-
Constructor Summary
Constructors Constructor Description SimpleNameSpace(SimpleNameSpace parent, String name)
Creates a new instance for the given parent namespace and name.SimpleNameSpace(SimpleNameSpace parent, Name name)
Creates a new instance for the given parent namespace and name.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object other)
Compares the given object to this namespace for equality.int
hashCode()
Returns a hash code value for this namespace.boolean
isGlobal()
Indicates whether this namespace is a "top level" namespace.GenericName
name()
Represents the identifier of this namespace.String
toString()
Returns a string representation of this namespace.
-
-
-
Field Detail
-
factory
protected final SimpleNameFactory factory
The factory to use for creating name instances in this namespace.
-
-
Constructor Detail
-
SimpleNameSpace
public SimpleNameSpace(SimpleNameSpace parent, String name) throws InvalidNameException
Creates a new instance for the given parent namespace and name. The new instance will share the factory instance from its parent, unlessparent
isnull
in which case the default factory will be used.- Parameters:
parent
- the parent of the new namespace, ornull
if none.name
- the identifier of this namespace.- Throws:
InvalidNameException
- if the given name violates the JNDI syntax.
-
SimpleNameSpace
public SimpleNameSpace(SimpleNameSpace parent, Name name) throws InvalidNameException
Creates a new instance for the given parent namespace and name. The new instance will share the factory instance from its parent, unlessparent
isnull
in which case the default factory will be used.- Parameters:
parent
- the parent of the new namespace, ornull
if none.name
- the identifier of this namespace.- Throws:
InvalidNameException
- if the given name violates the JNDI syntax.
-
-
Method Detail
-
isGlobal
public boolean isGlobal()
Indicates whether this namespace is a "top level" namespace. Global, or top-level namespaces are not contained within another namespace. The global namespace has no parent.
-
name
public GenericName name()
Represents the identifier of this namespace. Namespace identifiers shall be fully-qualified names where:name.scope().isGlobal() == true
-
toString
public String toString()
Returns a string representation of this namespace.
-
equals
public boolean equals(Object other)
Compares the given object to this namespace for equality.
-
-