public class AttributesHolder extends java.lang.Object implements EncodingAlgorithmAttributes
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
_algorithmData |
private int[] |
_algorithmIds |
private java.lang.String[] |
_algorithmURIs |
private int |
_attributeCount |
private QualifiedName[] |
_names |
private java.util.Map |
_registeredEncodingAlgorithms |
private java.lang.String[] |
_values |
private static int |
DEFAULT_CAPACITY |
Constructor and Description |
---|
AttributesHolder() |
AttributesHolder(java.util.Map registeredEncodingAlgorithms) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(QualifiedName name,
java.lang.String value) |
void |
addAttributeWithAlgorithmData(QualifiedName name,
java.lang.String URI,
int id,
java.lang.Object data) |
void |
clear() |
private java.lang.StringBuffer |
convertEncodingAlgorithmDataToString(int identifier,
java.lang.String URI,
java.lang.Object data) |
java.lang.Object |
getAlgorithmData(int index)
Return the data of the encoding algorithm.
|
int |
getAlgorithmIndex(int index)
Return the index of the encoding algorithm.
|
java.lang.String |
getAlgorithmURI(int index)
Return the URI of the encoding algorithm.
|
java.lang.String |
getAlpababet(int index)
Return the alphabet associated with the attribute value.
|
int |
getIndex(java.lang.String qName) |
int |
getIndex(java.lang.String uri,
java.lang.String localName) |
int |
getLength() |
java.lang.String |
getLocalName(int index) |
java.lang.String |
getPrefix(int index) |
java.lang.String |
getQName(int index) |
QualifiedName |
getQualifiedName(int index) |
boolean |
getToIndex(int index)
Return the whether the attribute value should be indexed or not.
|
java.lang.String |
getType(int index) |
java.lang.String |
getType(java.lang.String qName) |
java.lang.String |
getType(java.lang.String uri,
java.lang.String localName) |
java.lang.String |
getURI(int index) |
java.lang.String |
getValue(int index) |
java.lang.String |
getValue(java.lang.String qName) |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localName) |
private void |
resize() |
private static final int DEFAULT_CAPACITY
private java.util.Map _registeredEncodingAlgorithms
private int _attributeCount
private QualifiedName[] _names
private java.lang.String[] _values
private java.lang.String[] _algorithmURIs
private int[] _algorithmIds
private java.lang.Object[] _algorithmData
public AttributesHolder()
public AttributesHolder(java.util.Map registeredEncodingAlgorithms)
public final int getLength()
getLength
in interface org.xml.sax.Attributes
public final java.lang.String getLocalName(int index)
getLocalName
in interface org.xml.sax.Attributes
public final java.lang.String getQName(int index)
getQName
in interface org.xml.sax.Attributes
public final java.lang.String getType(int index)
getType
in interface org.xml.sax.Attributes
public final java.lang.String getURI(int index)
getURI
in interface org.xml.sax.Attributes
public final java.lang.String getValue(int index)
getValue
in interface org.xml.sax.Attributes
public final int getIndex(java.lang.String qName)
getIndex
in interface org.xml.sax.Attributes
public final java.lang.String getType(java.lang.String qName)
getType
in interface org.xml.sax.Attributes
public final java.lang.String getValue(java.lang.String qName)
getValue
in interface org.xml.sax.Attributes
public final int getIndex(java.lang.String uri, java.lang.String localName)
getIndex
in interface org.xml.sax.Attributes
public final java.lang.String getType(java.lang.String uri, java.lang.String localName)
getType
in interface org.xml.sax.Attributes
public final java.lang.String getValue(java.lang.String uri, java.lang.String localName)
getValue
in interface org.xml.sax.Attributes
public final void clear()
public final java.lang.String getAlgorithmURI(int index)
EncodingAlgorithmAttributes
If the algorithm data corresponds to a built-in encoding algorithm then the null is returned.
If the algorithm data corresponds to an application-defined encoding algorithm then the URI of the algorithm is returned.
If EncodingAlgorithmAttributes.getAlgorithmData(int)
returns null then the result of
this method is undefined.
getAlgorithmURI
in interface EncodingAlgorithmAttributes
index
- The attribute index (zero-based).public final int getAlgorithmIndex(int index)
EncodingAlgorithmAttributes
If EncodingAlgorithmAttributes.getAlgorithmData(int)
returns null then the result of
this method is undefined.
getAlgorithmIndex
in interface EncodingAlgorithmAttributes
index
- The attribute index (zero-based).EncodingAlgorithmIndexes
public final java.lang.Object getAlgorithmData(int index)
EncodingAlgorithmAttributes
If the algorithm data corresponds to a built-in encoding algorithm then an Object corresponding to the Java primitive type is returned.
If the algorithm data corresponds to an application-defined encoding
algorithm then an Object that is an instance of byte[]
is returned if there is no EncodingAlgorithm registered for the
application-defined encoding algorithm URI. Otherwise, an Object produced
from the registeredEncodingAlgorithm is returned.
If there no encoding algorithm data associated an attribute then
null
is returned.
getAlgorithmData
in interface EncodingAlgorithmAttributes
index
- The attribute index (zero-based).public java.lang.String getAlpababet(int index)
EncodingAlgorithmAttributes
getAlpababet
in interface EncodingAlgorithmAttributes
index
- The attribute index (zero-based).public boolean getToIndex(int index)
EncodingAlgorithmAttributes
getToIndex
in interface EncodingAlgorithmAttributes
index
- The attribute index (zero-based).public final void addAttribute(QualifiedName name, java.lang.String value)
public final void addAttributeWithAlgorithmData(QualifiedName name, java.lang.String URI, int id, java.lang.Object data)
public final QualifiedName getQualifiedName(int index)
public final java.lang.String getPrefix(int index)
private final void resize()
private final java.lang.StringBuffer convertEncodingAlgorithmDataToString(int identifier, java.lang.String URI, java.lang.Object data) throws FastInfosetException, java.io.IOException
FastInfosetException
java.io.IOException