Class ContentHandlerAdaptor.AttributeListAdapter
java.lang.Object
com.sun.msv.writer.ContentHandlerAdaptor.AttributeListAdapter
- All Implemented Interfaces:
Attributes
- Enclosing class:
ContentHandlerAdaptor
Adapt a SAX1 AttributeList as a SAX2 Attributes object.
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintLook up an attribute index by qualified (prefixed) name.intLook up an attribute index by Namespace name.intReturn the length of the attribute list.getLocalName(int i) Return the local name of the specified attribute.getQName(int i) Return the qualified (prefixed) name of the specified attribute.getType(int i) Return the type of the specified attribute.Look up the type of an attribute by qualified (prefixed) name.Look up the type of an attribute by Namespace name.getURI(int i) Return the Namespace URI of the specified attribute.getValue(int i) Return the value of the specified attribute.Look up the value of an attribute by qualified (prefixed) name.Look up the value of an attribute by Namespace name.(package private) voidsetAttributeList(AttributeList qAtts) Set the embedded AttributeList.
-
Field Details
-
qAtts
-
-
Constructor Details
-
AttributeListAdapter
AttributeListAdapter()Construct a new adapter.
-
-
Method Details
-
setAttributeList
Set the embedded AttributeList.This method must be invoked before any of the others can be used.
- Parameters:
The- SAX1 attribute list (with qnames).
-
getLength
public int getLength()Return the length of the attribute list.- Specified by:
getLengthin interfaceAttributes- Returns:
- The number of attributes in the list.
- See Also:
-
getURI
Return the Namespace URI of the specified attribute.- Specified by:
getURIin interfaceAttributes- Parameters:
The- attribute's index.- Returns:
- Always the empty string.
- See Also:
-
getLocalName
Return the local name of the specified attribute.- Specified by:
getLocalNamein interfaceAttributes- Parameters:
The- attribute's index.- Returns:
- Always the empty string.
- See Also:
-
getQName
Return the qualified (prefixed) name of the specified attribute.- Specified by:
getQNamein interfaceAttributes- Parameters:
The- attribute's index.- Returns:
- The attribute's qualified name, internalized.
-
getType
Return the type of the specified attribute.- Specified by:
getTypein interfaceAttributes- Parameters:
The- attribute's index.- Returns:
- The attribute's type as an internalized string.
-
getValue
Return the value of the specified attribute.- Specified by:
getValuein interfaceAttributes- Parameters:
The- attribute's index.- Returns:
- The attribute's value.
-
getIndex
Look up an attribute index by Namespace name.- Specified by:
getIndexin interfaceAttributes- Parameters:
uri- The Namespace URI or the empty string.localName- The local name.- Returns:
- The attributes index, or -1 if none was found.
- See Also:
-
getIndex
Look up an attribute index by qualified (prefixed) name.- Specified by:
getIndexin interfaceAttributes- Parameters:
qName- The qualified name.- Returns:
- The attributes index, or -1 if none was found.
- See Also:
-
getType
Look up the type of an attribute by Namespace name.- Specified by:
getTypein interfaceAttributes- Parameters:
uri- The Namespace URIlocalName- The local name.- Returns:
- The attribute's type as an internalized string.
-
getType
Look up the type of an attribute by qualified (prefixed) name.- Specified by:
getTypein interfaceAttributes- Parameters:
qName- The qualified name.- Returns:
- The attribute's type as an internalized string.
-
getValue
Look up the value of an attribute by Namespace name.- Specified by:
getValuein interfaceAttributes- Parameters:
uri- The Namespace URIlocalName- The local name.- Returns:
- The attribute's value.
-
getValue
Look up the value of an attribute by qualified (prefixed) name.- Specified by:
getValuein interfaceAttributes- Parameters:
qName- The qualified name.- Returns:
- The attribute's value.
-