final class ContentHandlerAdaptor.AttributeListAdapter
extends java.lang.Object
implements org.xml.sax.Attributes
This class is in the Public Domain, and comes with NO WARRANTY of any kind.
This wrapper class is used only when Namespace support is disabled -- it provides pretty much a direct mapping from SAX1 to SAX2, except that names and types are interned whenever requested.
Modifier and Type | Field and Description |
---|---|
private org.xml.sax.AttributeList |
qAtts |
Constructor and Description |
---|
AttributeListAdapter()
Construct a new adapter.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex(java.lang.String qName)
Look up an attribute index by qualified (prefixed) name.
|
int |
getIndex(java.lang.String uri,
java.lang.String localName)
Look up an attribute index by Namespace name.
|
int |
getLength()
Return the length of the attribute list.
|
java.lang.String |
getLocalName(int i)
Return the local name of the specified attribute.
|
java.lang.String |
getQName(int i)
Return the qualified (prefixed) name of the specified attribute.
|
java.lang.String |
getType(int i)
Return the type of the specified attribute.
|
java.lang.String |
getType(java.lang.String qName)
Look up the type of an attribute by qualified (prefixed) name.
|
java.lang.String |
getType(java.lang.String uri,
java.lang.String localName)
Look up the type of an attribute by Namespace name.
|
java.lang.String |
getURI(int i)
Return the Namespace URI of the specified attribute.
|
java.lang.String |
getValue(int i)
Return the value of the specified attribute.
|
java.lang.String |
getValue(java.lang.String qName)
Look up the value of an attribute by qualified (prefixed) name.
|
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localName)
Look up the value of an attribute by Namespace name.
|
(package private) void |
setAttributeList(org.xml.sax.AttributeList qAtts)
Set the embedded AttributeList.
|
void setAttributeList(org.xml.sax.AttributeList qAtts)
This method must be invoked before any of the others can be used.
The
- SAX1 attribute list (with qnames).public int getLength()
getLength
in interface org.xml.sax.Attributes
Attributes.getLength()
public java.lang.String getURI(int i)
getURI
in interface org.xml.sax.Attributes
The
- attribute's index.Attributes.getURI(int)
public java.lang.String getLocalName(int i)
getLocalName
in interface org.xml.sax.Attributes
The
- attribute's index.Attributes.getLocalName(int)
public java.lang.String getQName(int i)
getQName
in interface org.xml.sax.Attributes
The
- attribute's index.public java.lang.String getType(int i)
getType
in interface org.xml.sax.Attributes
The
- attribute's index.public java.lang.String getValue(int i)
getValue
in interface org.xml.sax.Attributes
The
- attribute's index.public int getIndex(java.lang.String uri, java.lang.String localName)
getIndex
in interface org.xml.sax.Attributes
uri
- The Namespace URI or the empty string.localName
- The local name.Attributes.getIndex(java.lang.String,java.lang.String)
public int getIndex(java.lang.String qName)
getIndex
in interface org.xml.sax.Attributes
qName
- The qualified name.Attributes.getIndex(java.lang.String)
public java.lang.String getType(java.lang.String uri, java.lang.String localName)
getType
in interface org.xml.sax.Attributes
uri
- The Namespace URIlocalName
- The local name.public java.lang.String getType(java.lang.String qName)
getType
in interface org.xml.sax.Attributes
qName
- The qualified name.public java.lang.String getValue(java.lang.String uri, java.lang.String localName)
getValue
in interface org.xml.sax.Attributes
uri
- The Namespace URIlocalName
- The local name.public java.lang.String getValue(java.lang.String qName)
getValue
in interface org.xml.sax.Attributes
qName
- The qualified name.