Apigen

edu.uci.isr.apigen
Class QName

java.lang.Object
  extended byedu.uci.isr.apigen.QName

public class QName
extends Object

Qualified name (NamespaceURI + Local Name) for use in describing a DOM element.

Author:
Eric M. Dashofy (edashofy@ics.uci.edu)

Field Summary
protected  String name
          Local name of this QName
protected  String namespaceURI
          Namespace URI of this QName
 
Constructor Summary
QName(String name)
          Create a qualified name with no namespace URI and the given local name.
QName(String namespaceURI, String name)
          Create a qualified name with the given namespace URI local name.
 
Method Summary
 boolean equals(Object o)
          Determines if two QNames are equal.
 String getName()
          Get the local name of this qualified name.
 String getNamespaceURI()
          Get the namespace URI of this qualified name.
static QName getNodeQName(Node n)
          Gets the qualified name of a given DOM node.
 int hashCode()
          Gets the hash code for this QName.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

namespaceURI

protected String namespaceURI
Namespace URI of this QName


name

protected String name
Local name of this QName

Constructor Detail

QName

public QName(String name)
Create a qualified name with no namespace URI and the given local name.

Parameters:
name - Local name.

QName

public QName(String namespaceURI,
             String name)
Create a qualified name with the given namespace URI local name.

Parameters:
namespaceURI - Namespace URI.
name - Local name.
Method Detail

getNamespaceURI

public String getNamespaceURI()
Get the namespace URI of this qualified name.

Returns:
Namespace URI of this QName.

getName

public String getName()
Get the local name of this qualified name.

Returns:
local name of this QName.

equals

public boolean equals(Object o)
Determines if two QNames are equal.

Parameters:
o - Object to compare with this QName
Returns:
true if they are equal, false otherwise.

hashCode

public int hashCode()
Gets the hash code for this QName.

Returns:
hash code.

getNodeQName

public static QName getNodeQName(Node n)
Gets the qualified name of a given DOM node.

Parameters:
n - DOM node to inspect.
Returns:
Qualified name of the given node.

toString

public String toString()

Apigen