Class AttributesHolder
- All Implemented Interfaces:
EncodingAlgorithmAttributes,Attributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddAttribute(QualifiedName name, String value) final voidaddAttributeWithAlgorithmData(QualifiedName name, String URI, int id, Object data) final voidclear()final ObjectgetAlgorithmData(int index) Return the data of the encoding algorithm.final intgetAlgorithmIndex(int index) Return the index of the encoding algorithm.final StringgetAlgorithmURI(int index) Return the URI of the encoding algorithm.getAlpababet(int index) Return the alphabet associated with the attribute value.final intfinal intfinal intfinal StringgetLocalName(int index) final StringgetPrefix(int index) final StringgetQName(int index) final QualifiedNamegetQualifiedName(int index) booleangetToIndex(int index) Return the whether the attribute value should be indexed or not.final StringgetType(int index) final Stringfinal Stringfinal StringgetURI(int index) final StringgetValue(int index) final Stringfinal String
-
Constructor Details
-
AttributesHolder
public AttributesHolder() -
AttributesHolder
-
-
Method Details
-
getLength
public final int getLength()- Specified by:
getLengthin interfaceAttributes
-
getLocalName
- Specified by:
getLocalNamein interfaceAttributes
-
getQName
- Specified by:
getQNamein interfaceAttributes
-
getType
- Specified by:
getTypein interfaceAttributes
-
getURI
- Specified by:
getURIin interfaceAttributes
-
getValue
- Specified by:
getValuein interfaceAttributes
-
getIndex
- Specified by:
getIndexin interfaceAttributes
-
getType
- Specified by:
getTypein interfaceAttributes
-
getValue
- Specified by:
getValuein interfaceAttributes
-
getIndex
- Specified by:
getIndexin interfaceAttributes
-
getType
- Specified by:
getTypein interfaceAttributes
-
getValue
- Specified by:
getValuein interfaceAttributes
-
clear
public final void clear() -
getAlgorithmURI
Description copied from interface:EncodingAlgorithmAttributesReturn 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
EncodingAlgorithmAttributes.getAlgorithmData(int)returns null then the result of this method is undefined.- Specified by:
getAlgorithmURIin interfaceEncodingAlgorithmAttributes- Parameters:
index- The attribute index (zero-based).- Returns:
- The URI. If the index is out of range then null is returned.
-
getAlgorithmIndex
public final int getAlgorithmIndex(int index) Description copied from interface:EncodingAlgorithmAttributesReturn the index of the encoding algorithm.If
EncodingAlgorithmAttributes.getAlgorithmData(int)returns null then the result of this method is undefined.- Specified by:
getAlgorithmIndexin interfaceEncodingAlgorithmAttributes- Parameters:
index- The attribute index (zero-based).- Returns:
- The algorithm index. If index is out of range then -1 is returned.
- See Also:
-
getAlgorithmData
Description copied from interface:EncodingAlgorithmAttributesReturn 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
nullis returned.- Specified by:
getAlgorithmDatain interfaceEncodingAlgorithmAttributes- Parameters:
index- The attribute index (zero-based).- Returns:
- The data. If the index is out of range then null is returned.
-
getAlpababet
Description copied from interface:EncodingAlgorithmAttributesReturn the alphabet associated with the attribute value.- Specified by:
getAlpababetin interfaceEncodingAlgorithmAttributes- Parameters:
index- The attribute index (zero-based).- Returns:
- The alphabet. If the index is out of range then null is returned. If there is is no alphabet then null is returned.
-
getToIndex
public boolean getToIndex(int index) Description copied from interface:EncodingAlgorithmAttributesReturn the whether the attribute value should be indexed or not.- Specified by:
getToIndexin interfaceEncodingAlgorithmAttributes- Parameters:
index- The attribute index (zero-based).- Returns:
- True if attribute value should be indexed, otherwise false.
-
addAttribute
-
addAttributeWithAlgorithmData
public final void addAttributeWithAlgorithmData(QualifiedName name, String URI, int id, Object data) -
getQualifiedName
-
getPrefix
-