Package org.opengis.example.util
Class SimpleNameSpace
- Object
-
- SimpleNameSpace
-
- All Implemented Interfaces:
Serializable,NameSpace
public class SimpleNameSpace extends Object implements NameSpace, Serializable
ANameSpacedefining the scope ofSimpleNameinstances.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SimpleNameFactoryfactoryThe 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 booleanequals(Object other)Compares the given object to this namespace for equality.inthashCode()Returns a hash code value for this namespace.booleanisGlobal()Indicates whether this namespace is a "top level" namespace.GenericNamename()Represents the identifier of this namespace.StringtoString()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, unlessparentisnullin which case the default factory will be used.- Parameters:
parent- the parent of the new namespace, ornullif 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, unlessparentisnullin which case the default factory will be used.- Parameters:
parent- the parent of the new namespace, ornullif 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.
-
-