eXchaNGeR

org.xngr
Class XElementType

java.lang.Object
  |
  +--org.xngr.XElementType

public class XElementType
extends Object

Represents an element-type in the system. An element-type is defined by an element's (local)name and a namespace.

Version:
$Revision: 1.2 $, $Date: 2002/08/19 20:08:09 $
Author:
Edwin Dankert

Constructor Summary
XElementType(String localname, String namespace)
          Constructs an element-type for the given name and namespace.
 
Method Summary
 boolean equals(Object object)
          Checks wether this element-type is equal to the object supplied.
 String getName()
          Returns the (local) name for this element-type.
 String getNamespace()
          Returns the namespace (URI) for this element-type.
 String getUniversalname()
          Returns the (universal) name for this element-type.
 int hashCode()
          Overrides Object.hashCode(), because it should be possible to use the XElementType as a key in a hashtable.
 String toString()
          Overrides Object.toString(), it returns the universal name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XElementType

public XElementType(String localname,
                    String namespace)
Constructs an element-type for the given name and namespace.
Parameters:
localname - the (local)name of the element-type.
namespace - the namespace (URI) of the element-type.
Method Detail

getNamespace

public String getNamespace()
Returns the namespace (URI) for this element-type.
Returns:
the namespace.

getName

public String getName()
Returns the (local) name for this element-type.
Returns:
the (local) name.

getUniversalname

public String getUniversalname()
Returns the (universal) name for this element-type. The name is in the form: {namespace}localname
Returns:
the (universal) name.

equals

public boolean equals(Object object)
Checks wether this element-type is equal to the object supplied.
Overrides:
equals in class Object
Parameters:
object - the ElementType to check.
Returns:
true when equal.

hashCode

public int hashCode()
Overrides Object.hashCode(), because it should be possible to use the XElementType as a key in a hashtable.
Overrides:
hashCode in class Object
Returns:
the code.

toString

public String toString()
Overrides Object.toString(), it returns the universal name.
Overrides:
toString in class Object
Returns:
the universal name.

eXchaNGeR

Copyright © 2002, Cladonia Ltd., All Rights Reserved