Quadcap Embeddable Database

com.quadcap.text.sax.AttributeList Class Reference

Inheritance diagram for com.quadcap.text.sax.AttributeList:

List of all members.

Detailed Description

AttributeList implementation; uses arrays of Strings internally.

Author:
Stan Bailes

Definition at line 46 of file AttributeList.java.

Public Member Functions

final int getLength ()
 Return the number of attributes in this list.

final String getName (int i)
 Return the name of an attribute in this list (by position).

final String getType (int i)
 Return the type of an attribute in the list (by position).

final String getValue (int i)
 Return the value of an attribute in the list (by position).

final String getType (String name)
 Return the type of an attribute in the list (by name).

final String getValue (String n)
 Return the value of an attribute in the list (by name).

String toString ()

Static Public Member Functions

AttributeList copy (org.xml.sax.AttributeList a)
String toString (org.xml.sax.AttributeList attributes)

Package Functions

final int getAttribute (String n)
final String[] resize (String[] v, int len)
final void addAttribute (String n, String t, String v)
final void clear ()

Package Attributes

int length = 0
String[] name = new String[8]
String[] value = new String[8]
String[] type = new String[8]


Member Function Documentation

final void com.quadcap.text.sax.AttributeList.addAttribute String  n,
String  t,
String  v
[package]
 

Definition at line 193 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.addAttribute(), com.quadcap.text.sax.AttributeList.length, com.quadcap.text.sax.AttributeList.name, com.quadcap.text.sax.AttributeList.type, and com.quadcap.text.sax.AttributeList.value.

Referenced by com.quadcap.text.sax.AttributeList.addAttribute(), com.quadcap.text.sax.AttributeList.copy(), and com.quadcap.text.sax.Parser.step().

final void com.quadcap.text.sax.AttributeList.clear  )  [package]
 

Definition at line 205 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.length.

Referenced by com.quadcap.text.sax.Parser.startElement().

AttributeList com.quadcap.text.sax.AttributeList.copy org.xml.sax.AttributeList  a  )  [static]
 

Definition at line 209 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.addAttribute(), and com.quadcap.text.sax.AttributeList.copy().

Referenced by com.quadcap.text.sax.AttributeList.copy().

final int com.quadcap.text.sax.AttributeList.getAttribute String  n  )  [package]
 

Definition at line 180 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getAttribute(), com.quadcap.text.sax.AttributeList.length, and com.quadcap.text.sax.AttributeList.name.

Referenced by com.quadcap.text.sax.AttributeList.getAttribute(), com.quadcap.text.sax.AttributeList.getType(), and com.quadcap.text.sax.AttributeList.getValue().

final int com.quadcap.text.sax.AttributeList.getLength  )  [virtual]
 

Return the number of attributes in this list.

The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified. The number of attributes may be zero.

Returns:
The number of attributes in the list.

Definition at line 62 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.length.

final String com.quadcap.text.sax.AttributeList.getName int  i  )  [virtual]
 

Return the name of an attribute in this list (by position).

The names must be unique: the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list.

If the attribute name has a namespace prefix, the prefix will still be attached.

Parameters:
i The index of the attribute in the list (starting at 0).
Returns:
The name of the indexed attribute, or null if the index is out of range.
See also:
getLength

Definition at line 83 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getName(), and com.quadcap.text.sax.AttributeList.name.

Referenced by com.quadcap.text.sax.AttributeList.getName().

final String com.quadcap.text.sax.AttributeList.getType String  name  )  [virtual]
 

Return the type of an attribute in the list (by name).

The return value is the same as the return value for getType(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

Parameters:
name The name of the attribute.
Returns:
The attribute type as a string, or null if no such attribute exists.
See also:
getType(int)

Definition at line 158 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getAttribute().

final String com.quadcap.text.sax.AttributeList.getType int  i  )  [virtual]
 

Return the type of an attribute in the list (by position).

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-Value Normalization").

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

Parameters:
i The index of the attribute in the list (starting at 0).
Returns:
The attribute type as a string, or null if the index is out of range.
See also:
getLength

getType(java.lang.String)

Definition at line 113 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getType(), and com.quadcap.text.sax.AttributeList.type.

Referenced by com.quadcap.text.sax.AttributeList.getType().

final String com.quadcap.text.sax.AttributeList.getValue String  n  )  [virtual]
 

Return the value of an attribute in the list (by name).

The return value is the same as the return value for getValue(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

Parameters:
i The index of the attribute in the list.
Returns:
The attribute value as a string, or null if no such attribute exists.
See also:
getValue(int)

Definition at line 176 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getAttribute().

final String com.quadcap.text.sax.AttributeList.getValue int  i  )  [virtual]
 

Return the value of an attribute in the list (by position).

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.

Parameters:
i The index of the attribute in the list (starting at 0).
Returns:
The attribute value as a string, or null if the index is out of range.
See also:
getLength

getValue(java.lang.String)

Definition at line 134 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.getValue(), and com.quadcap.text.sax.AttributeList.value.

Referenced by com.quadcap.text.sax.AttributeList.getValue().

final String [] com.quadcap.text.sax.AttributeList.resize String[]  v,
int  len
[package]
 

Definition at line 187 of file AttributeList.java.

References com.quadcap.text.sax.AttributeList.resize().

Referenced by com.quadcap.text.sax.AttributeList.resize().

String com.quadcap.text.sax.AttributeList.toString  ) 
 

Definition at line 231 of file AttributeList.java.

String com.quadcap.text.sax.AttributeList.toString org.xml.sax.AttributeList  attributes  )  [static]
 

Definition at line 217 of file AttributeList.java.


Member Data Documentation

int com.quadcap.text.sax.AttributeList.length = 0 [package]
 

Definition at line 47 of file AttributeList.java.

Referenced by com.quadcap.text.sax.AttributeList.addAttribute(), com.quadcap.text.sax.AttributeList.clear(), com.quadcap.text.sax.AttributeList.getAttribute(), and com.quadcap.text.sax.AttributeList.getLength().

String [] com.quadcap.text.sax.AttributeList.name = new String[8] [package]
 

Definition at line 48 of file AttributeList.java.

Referenced by com.quadcap.text.sax.AttributeList.addAttribute(), com.quadcap.text.sax.AttributeList.getAttribute(), and com.quadcap.text.sax.AttributeList.getName().

String [] com.quadcap.text.sax.AttributeList.type = new String[8] [package]
 

Definition at line 50 of file AttributeList.java.

Referenced by com.quadcap.text.sax.AttributeList.addAttribute(), and com.quadcap.text.sax.AttributeList.getType().

String [] com.quadcap.text.sax.AttributeList.value = new String[8] [package]
 

Definition at line 49 of file AttributeList.java.

Referenced by com.quadcap.text.sax.AttributeList.addAttribute(), and com.quadcap.text.sax.AttributeList.getValue().