|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.mirae.j2me.xml.sax.AttributesImpl
This is an implementation of org.xml.sax.Attributes
Constructor Summary | |
AttributesImpl(java.util.Hashtable namespaces,
java.util.Hashtable defaultValues,
java.util.Hashtable typeDefinitions)
The concrete constructor for Attributes |
Method Summary | |
void |
add(java.lang.String key,
java.lang.String type,
java.lang.String value)
|
int |
getIndex(java.lang.String qName)
Look up the index of an attribute by XML 1.0 qualified name. |
int |
getIndex(java.lang.String uri,
java.lang.String localName)
Look up the index of an attribute by Namespace name. |
int |
getLength()
Return the number of attributes in the list. |
java.lang.String |
getLocalName(int index)
Look up an attribute's local name by index. |
java.lang.String |
getQName(int index)
Look up an attribute's XML 1.0 qualified name by index. |
java.lang.String |
getType(int index)
Look up an attribute's type by index. |
java.lang.String |
getType(java.lang.String qName)
Look up an attribute's type by XML 1.0 qualified name. |
java.lang.String |
getType(java.lang.String uri,
java.lang.String localName)
Look up an attribute's type by Namespace name. |
java.lang.String |
getTypeFromDeclaration(java.lang.String key)
|
java.lang.String |
getURI(int index)
Look up an attribute's Namespace URI by index. |
java.lang.String |
getValue(int index)
Look up an attribute's value by index. |
java.lang.String |
getValue(java.lang.String qName)
Look up an attribute's value by XML 1.0 qualified name. |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localName)
Look up an attribute's value by Namespace name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AttributesImpl(java.util.Hashtable namespaces, java.util.Hashtable defaultValues, java.util.Hashtable typeDefinitions)
namespaces
- defaultValues
- typeDefinitions
- Method Detail |
public java.lang.String getTypeFromDeclaration(java.lang.String key)
public void add(java.lang.String key, java.lang.String type, java.lang.String value)
public int getLength()
Attributes
Once you know the number of attributes, you can iterate through the list.
getLength
in interface Attributes
Attributes.getLength()
public java.lang.String getURI(int index)
Attributes
getURI
in interface Attributes
index
- The attribute index (zero-based).
Attributes.getURI(int)
public java.lang.String getLocalName(int index)
Attributes
getLocalName
in interface Attributes
index
- The attribute index (zero-based).
Attributes.getLocalName(int)
public java.lang.String getQName(int index)
Attributes
getQName
in interface Attributes
index
- The attribute index (zero-based).
Attributes.getQName(int)
public java.lang.String getType(int index)
Attributes
The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).
If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").
For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".
getType
in interface Attributes
index
- The attribute index (zero-based).
Attributes.getType(int)
public java.lang.String getValue(int index)
Attributes
If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string with each token separated by a single space.
getValue
in interface Attributes
index
- The attribute index (zero-based).
Attributes.getValue(int)
public int getIndex(java.lang.String uri, java.lang.String localName)
Attributes
getIndex
in interface Attributes
uri
- The Namespace URI, or the empty string if
the name has no Namespace URI.localName
- The attribute's local name.
Attributes.getIndex(java.lang.String, java.lang.String)
public int getIndex(java.lang.String qName)
Attributes
getIndex
in interface Attributes
qName
- The qualified (prefixed) name.
Attributes.getIndex(java.lang.String)
public java.lang.String getType(java.lang.String uri, java.lang.String localName)
Attributes
See getType(int)
for a description
of the possible types.
getType
in interface Attributes
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
Attributes.getType(java.lang.String, java.lang.String)
public java.lang.String getType(java.lang.String qName)
Attributes
See getType(int)
for a description
of the possible types.
getType
in interface Attributes
qName
- The XML 1.0 qualified name.
Attributes.getType(java.lang.String)
public java.lang.String getValue(java.lang.String uri, java.lang.String localName)
Attributes
See getValue(int)
for a description
of the possible values.
getValue
in interface Attributes
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
Attributes.getValue(java.lang.String, java.lang.String)
public java.lang.String getValue(java.lang.String qName)
Attributes
See getValue(int)
for a description
of the possible values.
getValue
in interface Attributes
qName
- The XML 1.0 qualified name.
Attributes.getValue(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |