org.sapia.util.xml
Class Attribute

java.lang.Object
  |
  +--org.sapia.util.xml.Attribute
All Implemented Interfaces:
Serializable

public class Attribute
extends Object
implements Serializable

The Attribute class is a simple object representation of an XML attribute. It contains three attributes: a name, a value and a namespace prefix.

Author:
Jean-Cedric Desrochers
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Serialized Form

Constructor Summary
Attribute()
          Creates a new Attribute instance.
Attribute(String aName, String aValue)
          Creates a new Attribute instance.
Attribute(String aNamespacePrefix, String aName, String aValue)
          Creates a new Attribute instance.
 
Method Summary
 String getName()
          Returns the name of this attribute.
 String getNamespacePrefix()
          Returns the namespace prefix of this attribute.
 String getValue()
          Returns the value of this attribute.
 void setName(String aName)
          Changes the name of this attribute.
 void setNamespacePrefix(String aNamespacePrefix)
          Changes the namespace prefix of this attribute.
 void setValue(String aValue)
          Changes the value of this attribute.
 String toString()
          Returns a string representation of this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute()
Creates a new Attribute instance.


Attribute

public Attribute(String aName,
                 String aValue)
Creates a new Attribute instance.


Attribute

public Attribute(String aNamespacePrefix,
                 String aName,
                 String aValue)
Creates a new Attribute instance.

Method Detail

getNamespacePrefix

public String getNamespacePrefix()
Returns the namespace prefix of this attribute.

Returns:
The namespace prefix of this attribute.

getName

public String getName()
Returns the name of this attribute.

Returns:
The name of this attribute.

getValue

public String getValue()
Returns the value of this attribute.

Returns:
The value of this attribute.

setNamespacePrefix

public void setNamespacePrefix(String aNamespacePrefix)
Changes the namespace prefix of this attribute.

Parameters:
aNamespacePrefix - The new namespace prefix.

setName

public void setName(String aName)
Changes the name of this attribute.

Parameters:
aName - The new name.

setValue

public void setValue(String aValue)
Changes the value of this attribute.

Parameters:
aValue - The new value.

toString

public String toString()
Returns a string representation of this attribute.

Overrides:
toString in class Object
Returns:
A string representation of this attribute.


Copyright © 2002 Sapia Open Source Software. All Rights Reserved.