com.simonstl.common
Interface NamingI

All Known Subinterfaces:
NamedComponentI, StackableComponentI
All Known Implementing Classes:
Name, NamedComponent, NSDecl, StackableComponent

public interface NamingI

The NamingI interface defines the bare minimum of functionality needed to work with XML names (compounds of URI, local name, and prefix).

The original version of this was written for use with Markup Object Events (MOE). This version removes Cloneable.

version 0.02 is the initial common release.

Version:
0.02 10 December 2002
Author:
Simon St.Laurent

Method Summary
 boolean equals(java.lang.Object _name)
          The equals method only compares Namespace URI and Local Name to determine equality.
 java.lang.String getLocalName()
          Returns the local name for the component
 java.lang.String getPrefix()
          Returns the prefix used to represent the namespace URI reference for this component.
 java.lang.String getQName()
          Returns the Qualified Name (QName) for the component.
 java.lang.String getUri()
          Returns the URI reference value for the namespace.
 int hashCode()
          Returns a key which can be used as a unique identifier for this component.
 void setLocalName(java.lang.String newLocalName)
          Accepts a string which will serve as the local name for this component.
 void setPrefix(java.lang.String newPrefix)
          Accepts a string which serves as the prefix for this component.
 void setQName(java.lang.String QName)
          Sets the Qualified Name (QName) for the component.
 void setUri(java.lang.String newNsURI)
          Accepts a URI reference value which is used as the namespace for the component.
 

Method Detail

hashCode

public int hashCode()
Returns a key which can be used as a unique identifier for this component.

Overrides:
hashCode in class java.lang.Object

setUri

public void setUri(java.lang.String newNsURI)
Accepts a URI reference value which is used as the namespace for the component.


getUri

public java.lang.String getUri()
Returns the URI reference value for the namespace.


setLocalName

public void setLocalName(java.lang.String newLocalName)
Accepts a string which will serve as the local name for this component.


getLocalName

public java.lang.String getLocalName()
Returns the local name for the component


setPrefix

public void setPrefix(java.lang.String newPrefix)
Accepts a string which serves as the prefix for this component.


getPrefix

public java.lang.String getPrefix()
Returns the prefix used to represent the namespace URI reference for this component.


getQName

public java.lang.String getQName()
Returns the Qualified Name (QName) for the component.


setQName

public void setQName(java.lang.String QName)
Sets the Qualified Name (QName) for the component. Overrides current local name and prefix, if any. Doesn't make any changes to the namespace URI!


equals

public boolean equals(java.lang.Object _name)
The equals method only compares Namespace URI and Local Name to determine equality. This is not not necessarily transitive.

Overrides:
equals in class java.lang.Object