org.base.apps.xml.elem
Class Tag

java.lang.Object
  extended by org.base.apps.xml.elem.Tag

public class Tag
extends Object

Represents an XML element tag, with local name, and optional namespace and prefix (like a mutable QName.

Author:
Kevan Simpson

Constructor Summary
Tag()
          Void constructor.
Tag(QName qname)
           
Tag(String lname)
           
Tag(String lname, String ns)
           
Tag(String lname, String ns, String prefix)
           
 
Method Summary
 boolean equals(Object obj)
          Compares object identity to determine equality.
 String getLocalName()
          Returns the unqualified element name.
 String getNamespace()
          Returns the element namespace.
 String getPrefix()
          Returns the element prefix.
 int hashCode()
          Guaranteed to return a unique hashCode for each distinct instance.
 Tag setLocalName(String lname)
          Sets the unqualified element name.
 Tag setNamespace(String ns)
          Sets the element namespace.
 Tag setPrefix(String prefix)
          Sets the element prefix.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag()
Void constructor.


Tag

public Tag(String lname)

Tag

public Tag(String lname,
           String ns)

Tag

public Tag(String lname,
           String ns,
           String prefix)

Tag

public Tag(QName qname)
Method Detail

hashCode

public final int hashCode()
Guaranteed to return a unique hashCode for each distinct instance.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public final boolean equals(Object obj)
Compares object identity to determine equality.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getLocalName

public String getLocalName()
Returns the unqualified element name.

Returns:
the unqualified element name.

getNamespace

public String getNamespace()
Returns the element namespace.

Returns:
the element namespace.

getPrefix

public String getPrefix()
Returns the element prefix.

Returns:
the element prefix.

setLocalName

public Tag setLocalName(String lname)
Sets the unqualified element name.

Parameters:
lname - The unqualified element name
Returns:
this Tag

setNamespace

public Tag setNamespace(String ns)
Sets the element namespace.

Parameters:
ns - The element namespace
Returns:
this Tag

setPrefix

public Tag setPrefix(String prefix)
Sets the element prefix.

Parameters:
prefix - The element prefix
Returns:
this Tag

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)