org.exolab.castor.xml.util
Class AttributeSetImpl
java.lang.Object
org.exolab.castor.xml.util.AttributeSetImpl
- AttributeSet
public class AttributeSetImpl
extends java.lang.Object
The default implementation of AttributeSet used by
the Marshalling Framework.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:47 $
static String | XMLNS - The XML namespace declaration prefix.
|
void | clear() - Removes all Attributes in this AttributeSetImpl
|
int | getIndex(String name, String namespace) - Returns the index of the attribute associated with the given name
and namespace.
|
String | getName(int index) - Returns the name of the attribute located at the given index.
|
String | getNamespace(int index) - Returns the namespace of the attribute located at the given index.
|
int | getSize() - Returns the number of Attributes within this AttributeSet.
|
String | getValue(String name) - Returns the value of the attribute associated with the given name.
|
String | getValue(String name, String namespace) - Returns the value of the attribute associated with the given name.
|
String | getValue(int index) - Returns the value of the attribute located at the given index
within this AttributeSet.
|
void | setAttribute(String name, String value) - Adds or replaces the attribute with the given name.
|
void | setAttribute(String name, String value, String namespace) - Adds or replaces the attribute with the given name.
|
XMLNS
public static final String XMLNS
The XML namespace declaration prefix.
It is an error for an attribute name to be equal to this value.
AttributeSetImpl
public AttributeSetImpl()
Creates a new AttributeSetImpl
AttributeSetImpl
public AttributeSetImpl(int size)
Creates a new AttributeSetImpl
size
- the default size for this AttributeSetImpl
clear
public void clear()
Removes all Attributes in this AttributeSetImpl
getIndex
public int getIndex(String name,
String namespace)
Returns the index of the attribute associated with the given name
and namespace.
- getIndex in interface AttributeSet
name
- the name of the attribute whose value should be returned.namespace
- the namespace of the attribute
- the index of the attribute, or -1 if not found.
getName
public String getName(int index)
Returns the name of the attribute located at the given index.
- getName in interface AttributeSet
index
- the index of the attribute whose name should be returned.
- the name of the attribute located at the given index.
getNamespace
public String getNamespace(int index)
Returns the namespace of the attribute located at the given index.
- getNamespace in interface AttributeSet
- the namespace of the attribute located at the given index.
getSize
public int getSize()
Returns the number of Attributes within this AttributeSet.
- getSize in interface AttributeSet
- the number of Attributes within this AttributeSet.
getValue
public String getValue(String name)
Returns the value of the attribute associated with the given name.
This method is equivalent to call #getValue(name, null);
- getValue in interface AttributeSet
name
- the name of the attribute whose value should be returned.
getValue
public String getValue(String name,
String namespace)
Returns the value of the attribute associated with the given name.
This method is equivalent to call #getValue(name, null);
- getValue in interface AttributeSet
name
- the name of the attribute whose value should be returned.namespace
- the namespace of the attribute
getValue
public String getValue(int index)
Returns the value of the attribute located at the given index
within this AttributeSet.
- getValue in interface AttributeSet
index
- the index of the attribute whose value should be returned.
setAttribute
public void setAttribute(String name,
String value)
Adds or replaces the attribute with the given name.
No namespace is associated with the attribute.
name
- the name of the attributevalue
- the attribute value.
setAttribute
public void setAttribute(String name,
String value,
String namespace)
Adds or replaces the attribute with the given name.
No namespace is associated with the attribute.
name
- the name of the attributevalue
- the attribute value.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com