Javolution 6.0.0 java
|
Classes | |
class | AttributeImpl |
Public Member Functions | |
AttributesImpl (NamespacesImpl namespaces) | |
void | addAttribute (CharArray localName, CharArray prefix, CharArray qName, CharArray value) |
int | getIndex (CharSequence qName) |
int | getIndex (CharSequence uri, CharSequence localName) |
int | getLength () |
CharArray | getLocalName (int index) |
CharArray | getPrefix (int index) |
CharArray | getQName (int index) |
CharArray | getType (CharSequence qName) |
CharArray | getType (CharSequence uri, CharSequence localName) |
CharArray | getType (int index) |
CharArray | getURI (int index) |
CharArray | getValue (CharSequence qName) |
CharArray | getValue (CharSequence uri, CharSequence localName) |
CharArray | getValue (int index) |
void | reset () |
Private Attributes | |
final FastTable< AttributeImpl > | attributes = new FastTable<AttributeImpl>() |
int | length |
final NamespacesImpl | namespaces |
Static Private Attributes | |
static final CharArray | CDATA = new CharArray("CDATA") |
static final CharArray | EMPTY = new CharArray() |
This class provides the implementation of the Attributes interface for the StAX parser.
Definition at line 11 of file AttributesImpl.java.
javolution.xml.internal.stream.AttributesImpl.AttributesImpl | ( | NamespacesImpl | namespaces | ) |
Creates a list of attribute using the specified namespace stack.
Definition at line 48 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.namespaces.
void javolution.xml.internal.stream.AttributesImpl.addAttribute | ( | CharArray | localName, |
CharArray | prefix, | ||
CharArray | qName, | ||
CharArray | value | ||
) |
Adds an attribute to the end of the attribute list.
localName | the local name. |
prefix | the prefix or null if none. |
qName | the qualified (prefixed) name. |
value | the attribute value. |
Definition at line 60 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, javolution.xml.internal.stream.AttributesImpl.length, javolution.xml.internal.stream.AttributesImpl.AttributeImpl.localName, javolution.xml.internal.stream.AttributesImpl.AttributeImpl.prefix, javolution.xml.internal.stream.AttributesImpl.AttributeImpl.qName, and javolution.xml.internal.stream.AttributesImpl.AttributeImpl.value.
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.processAttribute().
int javolution.xml.internal.stream.AttributesImpl.getIndex | ( | CharSequence | qName | ) |
Looks up the index of an attribute by XML 1.0 qualified name (convenience method). This method returns the index of the attribute whose name has the same character content as the specified qName.
qName | the qualified (prefixed) name. |
-1
if it does not appear in the list. Implements javolution.xml.sax.Attributes.
Definition at line 77 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.length.
Referenced by javolution.xml.internal.stream.AttributesImpl.getType(), and javolution.xml.internal.stream.AttributesImpl.getValue().
int javolution.xml.internal.stream.AttributesImpl.getIndex | ( | CharSequence | uri, |
CharSequence | localName | ||
) |
Looks up the index of an attribute by namespace name (convenience method). This method returns the index of the attribute whose uri/localName have the same character content as the specified uri/localName.
uri | the Namespace URI, or an empty character sequence if the name has no Namespace URI. |
localName | the attribute's local name. |
-1
if it does not appear in the list. Implements javolution.xml.sax.Attributes.
Definition at line 86 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, javolution.xml.internal.stream.NamespacesImpl.getNamespaceURI(), javolution.xml.internal.stream.AttributesImpl.length, javolution.xml.internal.stream.AttributesImpl.AttributeImpl.localName, javolution.xml.internal.stream.AttributesImpl.namespaces, and javolution.xml.internal.stream.AttributesImpl.AttributeImpl.prefix.
int javolution.xml.internal.stream.AttributesImpl.getLength | ( | ) |
Returns the number of attributes in this list of attributes.
Implements javolution.xml.sax.Attributes.
Definition at line 103 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.length.
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeCount().
CharArray javolution.xml.internal.stream.AttributesImpl.getLocalName | ( | int | index | ) |
Looks up an attribute's local name by index.
index | the attribute index (zero-based). |
null
if the index is out of range. Implements javolution.xml.sax.Attributes.
Definition at line 108 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.length.
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeLocalName().
CharArray javolution.xml.internal.stream.AttributesImpl.getPrefix | ( | int | index | ) |
Definition at line 113 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.length.
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeNamespace(), and javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributePrefix().
CharArray javolution.xml.internal.stream.AttributesImpl.getQName | ( | int | index | ) |
Looks up an attribute's XML 1.0 qualified name by index.
index | the attribute index (zero-based). |
null
if the index is out of range. Implements javolution.xml.sax.Attributes.
Definition at line 119 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.length.
CharArray javolution.xml.internal.stream.AttributesImpl.getType | ( | CharSequence | qName | ) |
Looks up an attribute's type by XML 1.0 qualified name. This method returns the type of the attribute whose qName has the same character content as the specified qName.
qName | The XML 1.0 qualified name. |
Implements javolution.xml.sax.Attributes.
Definition at line 125 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.CDATA, and javolution.xml.internal.stream.AttributesImpl.getIndex().
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeType().
CharArray javolution.xml.internal.stream.AttributesImpl.getType | ( | CharSequence | uri, |
CharSequence | localName | ||
) |
Looks up an attribute's type by Namespace name (convenience method). This method returns the type of the attribute whose uri/localName have the same character content as the specified uri/localName.
uri | the Namespace URI, or an empty string if the name has no Namespace URI. |
localName | the local name of the attribute. |
Implements javolution.xml.sax.Attributes.
Definition at line 130 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.CDATA, and javolution.xml.internal.stream.AttributesImpl.getIndex().
CharArray javolution.xml.internal.stream.AttributesImpl.getType | ( | int | index | ) |
Looks 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 Recommentation (clause 3.3.3, "Attribute-TextBuilder Normalization").
For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".
index | the attribute index (zero-based). |
Implements javolution.xml.sax.Attributes.
Definition at line 135 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.CDATA, and javolution.xml.internal.stream.AttributesImpl.length.
CharArray javolution.xml.internal.stream.AttributesImpl.getURI | ( | int | index | ) |
Looks up an attribute's Namespace URI by index.
index | the attribute index (zero-based). |
null
if the index is out of range. Implements javolution.xml.sax.Attributes.
Definition at line 140 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, javolution.xml.internal.stream.AttributesImpl.EMPTY, javolution.xml.internal.stream.NamespacesImpl.getNamespaceURI(), javolution.xml.internal.stream.AttributesImpl.length, and javolution.xml.internal.stream.AttributesImpl.namespaces.
CharArray javolution.xml.internal.stream.AttributesImpl.getValue | ( | CharSequence | qName | ) |
Looks up an attribute's value by XML 1.0 qualified name (convenience method). This method returns the value of the attribute whose qName has the same character content as the specified qName.
qName | The XML 1.0 qualified name. |
null
if the attribute is not in the list or if qualified names are not available. Implements javolution.xml.sax.Attributes.
Definition at line 147 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.getIndex().
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.getAttributeValue(), and javolution.xml.internal.stream.XMLStreamReaderImpl.isAttributeSpecified().
CharArray javolution.xml.internal.stream.AttributesImpl.getValue | ( | CharSequence | uri, |
CharSequence | localName | ||
) |
Looks up an attribute's value by Namespace name (convenience method). This method returns the value of the attribute whose uri/localName have the same character content as the specified uri/localName.
uri | the Namespace URI, or the empty string if the name has no Namespace URI. |
localName | the local name of the attribute. |
null
if the attribute is not in the list. Implements javolution.xml.sax.Attributes.
Definition at line 153 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.getIndex().
CharArray javolution.xml.internal.stream.AttributesImpl.getValue | ( | int | index | ) |
Looks 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.
index | the attribute index (zero-based). |
null
if the index is out of range. Implements javolution.xml.sax.Attributes.
Definition at line 159 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.attributes, and javolution.xml.internal.stream.AttributesImpl.length.
void javolution.xml.internal.stream.AttributesImpl.reset | ( | ) |
Clear the attribute list for reuse.
Definition at line 167 of file AttributesImpl.java.
References javolution.xml.internal.stream.AttributesImpl.length.
Referenced by javolution.xml.internal.stream.XMLStreamReaderImpl.next(), and javolution.xml.internal.stream.XMLStreamReaderImpl.reset().
|
private |
Holds the attributes.
Definition at line 33 of file AttributesImpl.java.
Referenced by javolution.xml.internal.stream.AttributesImpl.addAttribute(), javolution.xml.internal.stream.AttributesImpl.getIndex(), javolution.xml.internal.stream.AttributesImpl.getLocalName(), javolution.xml.internal.stream.AttributesImpl.getPrefix(), javolution.xml.internal.stream.AttributesImpl.getQName(), javolution.xml.internal.stream.AttributesImpl.getURI(), and javolution.xml.internal.stream.AttributesImpl.getValue().
|
staticprivate |
Definition at line 26 of file AttributesImpl.java.
Referenced by javolution.xml.internal.stream.AttributesImpl.getType().
Definition at line 28 of file AttributesImpl.java.
Referenced by javolution.xml.internal.stream.AttributesImpl.getURI().
|
private |
Holds the current number of attributes set.
Definition at line 38 of file AttributesImpl.java.
Referenced by javolution.xml.internal.stream.AttributesImpl.addAttribute(), javolution.xml.internal.stream.AttributesImpl.getIndex(), javolution.xml.internal.stream.AttributesImpl.getLength(), javolution.xml.internal.stream.AttributesImpl.getLocalName(), javolution.xml.internal.stream.AttributesImpl.getPrefix(), javolution.xml.internal.stream.AttributesImpl.getQName(), javolution.xml.internal.stream.AttributesImpl.getType(), javolution.xml.internal.stream.AttributesImpl.getURI(), javolution.xml.internal.stream.AttributesImpl.getValue(), and javolution.xml.internal.stream.AttributesImpl.reset().
|
private |
Holds the namespace stack.
Definition at line 43 of file AttributesImpl.java.
Referenced by javolution.xml.internal.stream.AttributesImpl.AttributesImpl(), javolution.xml.internal.stream.AttributesImpl.getIndex(), and javolution.xml.internal.stream.AttributesImpl.getURI().