org.opengis.example.util
Class SimpleName.Local

Object
  extended by SimpleName
      extended by SimpleName.Local
All Implemented Interfaces:
Serializable, Comparable<GenericName>, GenericName, LocalName
Direct Known Subclasses:
SimpleName.Member, SimpleName.Type
Enclosing class:
SimpleName

public static class SimpleName.Local
extends SimpleName
implements LocalName

A LocalName specialization of SimpleName. The JNDI name wrapped by this class shall contain exactly one component. In such case the head, the tip and the parsed names are simply this instance.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class SimpleName
SimpleName.Local, SimpleName.Member, SimpleName.Scoped, SimpleName.Type
 
Field Summary
 
Fields inherited from class SimpleName
name
 
Constructor Summary
SimpleName.Local(SimpleNameSpace scope, Name name)
          Creates a new instance backed by the given JNDI name.
 
Method Summary
 List<LocalName> getParsedNames()
          Since this object is itself a locale name, returns a singleton list containing only this.
 LocalName head()
          Returns this since this object is already a local name.
 LocalName tip()
          Returns this since this object is already a local name.
 
Methods inherited from class SimpleName
compareTo, depth, equals, hashCode, jndiName, push, scope, toFullyQualifiedName, toInternationalString, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface LocalName
depth, toString
 
Methods inherited from interface GenericName
push, scope, toFullyQualifiedName, toInternationalString
 
Methods inherited from interface Comparable
compareTo
 

Constructor Detail

SimpleName.Local

public SimpleName.Local(SimpleNameSpace scope,
                        Name name)
                 throws IllegalArgumentException
Creates a new instance backed by the given JNDI name. This constructor does not clone the given JNDI name. While this implementation is robust to change in the wrapped object, it is a better practice to keep the JNDI name unmodified after SimpleName construction.

Parameters:
scope - The scope (name space) in which the given name is local.
name - The JNDI name wrapped by this SimpleName (not cloned).
Throws:
IllegalArgumentException - If the given name does not have exactly 1 component.
Method Detail

getParsedNames

public List<LocalName> getParsedNames()
Since this object is itself a locale name, returns a singleton list containing only this.

Specified by:
getParsedNames in interface GenericName
Specified by:
getParsedNames in interface LocalName
Overrides:
getParsedNames in class SimpleName
See Also:
Name.getAll()

head

public LocalName head()
Returns this since this object is already a local name.

Specified by:
head in interface GenericName
Specified by:
head in interface LocalName
Overrides:
head in class SimpleName
See Also:
Name.get(int)

tip

public LocalName tip()
Returns this since this object is already a local name.

Specified by:
tip in interface GenericName
Specified by:
tip in interface LocalName
Overrides:
tip in class SimpleName
See Also:
Name.get(int)


Copyright © 1994–2014 Open Geospatial Consortium. All rights reserved.