Top Fields Constructors Methods
com.sun.xml.fastinfoset.sax

public Class AttributesHolder

extends Object
implements EncodingAlgorithmAttributes
Class Inheritance
All Implemented Interfaces
org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes, org.xml.sax.Attributes
Imports
com.sun.xml.fastinfoset.EncodingConstants, .QualifiedName, .CommonResourceBundle, com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory, java.io.IOException, java.util.Map, org.jvnet.fastinfoset.EncodingAlgorithm, .EncodingAlgorithmException, .EncodingAlgorithmIndexes, .FastInfosetException, org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes

Field Summary

Modifier and TypeField and Description
private Object[]
private int[]
private String[]
private int
private QualifiedName[]
private Map<String, EncodingAlgorithm>
private String[]
private static final int

Constructor Summary

AccessConstructor and Description
public
public
AttributesHolder(Map<String, EncodingAlgorithm> registeredEncodingAlgorithms)

Method Summary

Modifier and TypeMethod and Description
public final void
public final void
public final void
private StringBuilder
public final Object
getAlgorithmData(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmData.

Return the data of the encoding algorithm.

public final int
getAlgorithmIndex(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmIndex.

Return the index of the encoding algorithm.

public final String
getAlgorithmURI(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmURI.

Return the URI of the encoding algorithm.

public String
getAlpababet(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlpababet.

Return the alphabet associated with the attribute value.

public final int
getIndex(String qName)

Implements org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by XML qualified (prefixed) name.

public final int
getIndex(String uri, String localName)

Implements org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by Namespace name.

public final int
getLength()

Implements org.xml.sax.Attributes.getLength.

Return the number of attributes in the list.

public final String
getLocalName(int index)

Implements org.xml.sax.Attributes.getLocalName.

Look up an attribute's local name by index.

public final String
getPrefix(int index)

public final String
getQName(int index)

Implements org.xml.sax.Attributes.getQName.

Look up an attribute's XML qualified (prefixed) name by index.

public final QualifiedName
getQualifiedName(int index)

public boolean
getToIndex(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getToIndex.

Return the whether the attribute value should be indexed or not.

public final String
getType(int index)

Implements org.xml.sax.Attributes.getType.

Look up an attribute's type by index.

public final String
getType(String qName)

Implements org.xml.sax.Attributes.getType.

Look up an attribute's type by XML qualified (prefixed) name.

public final String
getType(String uri, String localName)

Implements org.xml.sax.Attributes.getType.

Look up an attribute's type by Namespace name.

public final String
getURI(int index)

Implements org.xml.sax.Attributes.getURI.

Look up an attribute's Namespace URI by index.

public final String
getValue(int index)

Implements org.xml.sax.Attributes.getValue.

Look up an attribute's value by index.

public final String
getValue(String qName)

Implements org.xml.sax.Attributes.getValue.

Look up an attribute's value by XML qualified (prefixed) name.

public final String
getValue(String uri, String localName)

Implements org.xml.sax.Attributes.getValue.

Look up an attribute's value by Namespace name.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_algorithmDataback to summary
private Object[] _algorithmData
_algorithmIdsback to summary
private int[] _algorithmIds
_algorithmURIsback to summary
private String[] _algorithmURIs
_attributeCountback to summary
private int _attributeCount
_namesback to summary
private QualifiedName[] _names
_registeredEncodingAlgorithmsback to summary
private Map<String, EncodingAlgorithm> _registeredEncodingAlgorithms
_valuesback to summary
private String[] _values
DEFAULT_CAPACITYback to summary
private static final int DEFAULT_CAPACITY

Constructor Detail

AttributesHolderback to summary
public AttributesHolder()
AttributesHolderback to summary
public AttributesHolder(Map<String, EncodingAlgorithm> registeredEncodingAlgorithms)

Method Detail

addAttributeback to summary
public final void addAttribute(QualifiedName name, String value)
addAttributeWithAlgorithmDataback to summary
public final void addAttributeWithAlgorithmData(QualifiedName name, String URI, int id, Object data)
clearback to summary
public final void clear()
convertEncodingAlgorithmDataToStringback to summary
private StringBuilder convertEncodingAlgorithmDataToString(int identifier, String URI, Object data) throws FastInfosetException, IOException
getAlgorithmDataback to summary
public final Object getAlgorithmData(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmData.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmData.

Return the data of the encoding algorithm.

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.

Annotations
@Override
getAlgorithmIndexback to summary
public final int getAlgorithmIndex(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmIndex.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmIndex.

Return the index of the encoding algorithm.

If getAlgorithmData(int) returns null then the result of this method is undefined.

Annotations
@Override
getAlgorithmURIback to summary
public final String getAlgorithmURI(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmURI.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlgorithmURI.

Return the URI of the encoding algorithm.

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 getAlgorithmData(int) returns null then the result of this method is undefined.

Annotations
@Override
getAlpababetback to summary
public String getAlpababet(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlpababet.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getAlpababet.

Return the alphabet associated with the attribute value.

Annotations
@Override
getIndexback to summary
public final int getIndex(String qName)

Implements org.xml.sax.Attributes.getIndex.

Doc from org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by XML qualified (prefixed) name.

Annotations
@Override
getIndexback to summary
public final int getIndex(String uri, String localName)

Implements org.xml.sax.Attributes.getIndex.

Doc from org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by Namespace name.

Annotations
@Override
getLengthback to summary
public final int getLength()

Implements org.xml.sax.Attributes.getLength.

Doc from org.xml.sax.Attributes.getLength.

Return the number of attributes in the list.

Once you know the number of attributes, you can iterate through the list.

Annotations
@Override
getLocalNameback to summary
public final String getLocalName(int index)

Implements org.xml.sax.Attributes.getLocalName.

Doc from org.xml.sax.Attributes.getLocalName.

Look up an attribute's local name by index.

Annotations
@Override
getPrefixback to summary
public final String getPrefix(int index)
getQNameback to summary
public final String getQName(int index)

Implements org.xml.sax.Attributes.getQName.

Doc from org.xml.sax.Attributes.getQName.

Look up an attribute's XML qualified (prefixed) name by index.

Annotations
@Override
getQualifiedNameback to summary
public final QualifiedName getQualifiedName(int index)
getToIndexback to summary
public boolean getToIndex(int index)

Implements org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getToIndex.

Doc from org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes.getToIndex.

Return the whether the attribute value should be indexed or not.

Annotations
@Override
getTypeback to summary
public final String getType(int index)

Implements org.xml.sax.Attributes.getType.

Doc from org.xml.sax.Attributes.getType.

Look up an attribute's type by index.

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 Recommendation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

Annotations
@Override
getTypeback to summary
public final String getType(String qName)

Implements org.xml.sax.Attributes.getType.

Doc from org.xml.sax.Attributes.getType.

Look up an attribute's type by XML qualified (prefixed) name.

See getType(int) for a description of the possible types.

Annotations
@Override
getTypeback to summary
public final String getType(String uri, String localName)

Implements org.xml.sax.Attributes.getType.

Doc from org.xml.sax.Attributes.getType.

Look up an attribute's type by Namespace name.

See getType(int) for a description of the possible types.

Annotations
@Override
getURIback to summary
public final String getURI(int index)

Implements org.xml.sax.Attributes.getURI.

Doc from org.xml.sax.Attributes.getURI.

Look up an attribute's Namespace URI by index.

Annotations
@Override
getValueback to summary
public final String getValue(int index)

Implements org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.Attributes.getValue.

Look up an attribute's value by index.

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.

Annotations
@Override
getValueback to summary
public final String getValue(String qName)

Implements org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.Attributes.getValue.

Look up an attribute's value by XML qualified (prefixed) name.

See getValue(int) for a description of the possible values.

Annotations
@Override
getValueback to summary
public final String getValue(String uri, String localName)

Implements org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.Attributes.getValue.

Look up an attribute's value by Namespace name.

See getValue(int) for a description of the possible values.

Annotations
@Override
resizeback to summary
private void resize()