WebRowSet object. The
parser sends strings to this XmlReaderContentHandler and then uses
these strings as arguments for the XmlReaderContentHandler methods
it invokes. The final goal of the SAX parser working with an
XmlReaderContentHandler object is to read an XML document that represents
a RowSet object.
A rowset consists of its properties, metadata, and data values. An XML document representing a rowset includes the values in these three categories along with appropriate XML tags to identify them. It also includes a top-level XML tag for the rowset and three section tags identifying the three categories of values.
The tags in an XML document are hierarchical.
This means that the top-level tag, RowSet, is
followed by the three sections with appropriate tags, which are in turn each
followed by their constituent elements. For example, the properties
element will be followed by an element for each of the properties listed in
in this XmlReaderContentHandler object's properties
field. The content of the other two fields, colDef, which lists
the rowset's metadata elements, and data, which lists the rowset's data
elements, are handled similarly .
This implementation of XmlReaderContentHandler provides the means for the
parser to determine which elements need to have a value set and then to set
those values. The methods in this class are all called by the parser; an
application programmer never calls them directly.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | AutoIncrementTag
A constant representing the tag for auto-increment. |
| private static final int | CaseSensitiveTag
A constant representing the tag for case-sensitive. |
| private static final int | CatalogNameTag
A constant representing the tag for catalog-name. |
| private String[] | colDef
A listing of the kinds of metadata information available about
the columns in a |
| private HashMap | |
| private static final int | |
| private static final int | ColumnCountTag
A constant representing the tag for column-count. |
| private static final int | ColumnDefinitionTag
A constant representing the tag for column-definition. |
| private static final int | ColumnDisplaySizeTag
A constant representing the tag for column-display-size. |
| private static final int | ColumnIndexTag
A constant representing the tag for column-index. |
| private static final int | ColumnLabelTag
A constant representing the tag for column-label. |
| private static final int | ColumnNameTag
A constant representing the tag for column-name. |
| private static final int | ColumnPrecisionTag
A constant representing the tag for column-precision. |
| private static final int | ColumnScaleTag
A constant representing the tag for column-scale. |
| private static final int | ColumnTypeNameTag
A constant representing the tag for column-type-name. |
| private static final int | ColumnTypeTag
A constant representing the tag for column-type. |
| private String | |
| private static final int | CommandTag
A constant representing the tag for the command property. |
| private static final int | ConcurrencyTag
A constant representing the tag for the concurrency property. |
| private static final int | CurrencyTag
A constant representing the tag for currency. |
| private String[] | |
| private static final int | DATA
A constant indicating the state in which this |
| private HashMap | |
| private static final int | DataSourceLock
A constant representing the tag for the data source lock. |
| private static final int | DatasourceTag
A constant representing the tag for the datasource property. |
| private static final int | |
| private static final int | |
| private boolean | |
| private static final int | EscapeProcessingTag
A constant representing the tag for the escape-processing property. |
| private static final int | FetchDirectionTag
A constant representing the tag for the fetch-direction property. |
| private static final int | FetchSizeTag
A constant representing the tag for the fetch-size property. |
| private int | |
| private static final int | INITIAL
A constant indicating the state of this |
| private static final int | |
| private static final int | |
| private static final int | IsolationLevelTag
A constant representing the tag for the isolation-level property |
| private String | |
| private Vector | |
| private static final int | KeycolsTag
A constant representing the tag for the key-columns property. |
| private String | |
| private static final int | MapTag
A constant representing the tag for the map property. |
| private static final int | MaxFieldSizeTag
A constant representing the tag for the max-field-size property. |
| private static final int | MaxRowsTag
A constant representing the tag for the max-rows property. |
| private RowSetMetaData | |
| private static final int | METADATA
A constant indicating the state in which this |
| private String | |
| private static final int | MetaNullTag
A constant representing the tag for null. |
| private static final int | MetaTableNameTag
A constant representing the tag for table-name. |
| private static final int | NullableTag
A constant representing the tag for nullable. |
| private static final int | |
| private boolean | |
| private static final int | PropClassTag
A constant representing the tag for the class property. |
| private static final int | PropColumnTag
A constant representing the tag for the column property. |
| private String[] | properties
A list of the properties for a rowset. |
| private static final int | PROPERTIES
A constant indicating the state in which this |
| private String | |
| private HashMap | |
| private static final int | PropNullTag
A constant representing the tag for the null property. |
| private static final int | PropTypeTag
A constant representing the tag for the type property. |
| private static final int | QueryTimeoutTag
A constant representing the tag for the query-timeout property. |
| private static final int | ReadOnlyTag
A constant representing the tag for the read-only property. |
| private JdbcRowSetResourceBundle | |
| private static final int | RowsetTypeTag
A constant representing the tag for the rowset-type property. |
| private static final int | |
| private WebRowSetImpl | |
| private static final int | SchemaNameTag
A constant representing the tag for schema-name. |
| private static final int | SearchableTag
A constant representing the tag for searchable. |
| private static final int | ShowDeletedTag
A constant representing the tag for the show-deleted property. |
| private static final int | SignedTag
A constant representing the tag for signed. |
| private int | |
| private static final int | SyncProviderGradeTag
A constant representing the tag for the sync-provider grade tag. |
| private static final int | SyncProviderNameTag
A constant representing the tag for the sync-provider name |
| private static final int | SyncProviderTag
A constant representing the tag for the sync-provider. |
| private static final int | SyncProviderVendorTag
A constant representing the tag for the sync-provider vendor tag. |
| private static final int | SyncProviderVersionTag
A constant representing the tag for the sync-provider version tag. |
| private static final int | TableNameTag
A constant representing the tag for the table-name property. |
| private int | |
| private String | |
| private String | |
| private String | |
| private HashMap | |
| private Object[] | |
| private Vector | |
| private static final int | |
| private static final int | UrlTag
A constant representing the tag for the URL property. |
| private String |
| Access | Constructor and Description |
|---|---|
| public | XmlReaderContentHandler(RowSet
the r)RowSet object in XML format that will be readConstructs a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | characters(char[]
an array of characters supplied by the SAX parser, all or part of
which will be used to set a value ch, int the position in the given array at which to start start, int the number of consecutive characters to use length)Overrides org. Implements org. Sets a property, metadata, or data value with the characters in
the given array of characters, starting with the array element
indicated by |
| public void | endDocument()
Overrides org. Implements org. Receive notification of the end of the document. |
| public void | endElement(String uri, String
the name of the element; either (1) one of the array
elements in the fields lName, String qName)properties,
colDef, or data or
(2) one of the RowSet elements
"properties", "metadata", or
"data"Overrides org. Implements org. Sets the value for the given element if |
| public void | error(SAXParseException
the e)SAXParseException object to throwOverrides org. Implements org. Throws the given |
| private BigDecimal | |
| private byte[] | |
| private boolean | |
| private byte | |
| private Date | |
| private double | |
| private boolean | |
| private float | |
| private int | |
| private long | |
| private boolean | |
| private Row | Returns: theRow object on which the RowSet
implementation objects's cursor is positionedReturns the current row of this |
| private short | |
| private int | Returns: one of the following constants:XmlReaderContentHandler.PROPERTIES
XmlReaderContentHandler.METADATA
XmlReaderContentHandler.DATA
XmlReaderContentHandler.INITIALRetrieves the current state of this |
| private String | |
| private int | |
| private Timestamp | |
| private Time | |
| private void | initMaps()
Creates and initializes three new |
| private void | |
| public void | notationDecl(String name, String publicId, String systemId)
Overrides org. Implements org. Receive notification of a notation declaration. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | startDocument()
Overrides org. Implements org. Receive notification of the beginning of the document. |
| public void | startElement(String uri, String
the name of the element; either (1) one of the array
elements in the fields lName, String qName, Attributes properties,
colDef, or data or
(2) one of the RowSet elements
"properties", "metadata", or
"data"org.xml.sax.AttributeList objects that are
attributes of the named section element; may be null
if there are no attributes, which is the case for
WebRowSet objectsOverrides org. Implements org. Sets this |
| public void | unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
Overrides org. Implements org. Receive notification of an unparsed entity declaration. |
| public void | warning(SAXParseException
a warning generated by the SAX parser err)Overrides org. Implements org. Prints a warning message to |
| AutoIncrementTag | back to summary |
|---|---|
| private static final int AutoIncrementTag A constant representing the tag for auto-increment. | |
| CaseSensitiveTag | back to summary |
|---|---|
| private static final int CaseSensitiveTag A constant representing the tag for case-sensitive. | |
| CatalogNameTag | back to summary |
|---|---|
| private static final int CatalogNameTag A constant representing the tag for catalog-name. | |
| colDef | back to summary |
|---|---|
| private String[] colDef A listing of the kinds of metadata information available about
the columns in a | |
| colDefMap | back to summary |
|---|---|
| private HashMap<String, Integer> colDefMap | |
| ColTag | back to summary |
|---|---|
| private static final int ColTag | |
| ColumnCountTag | back to summary |
|---|---|
| private static final int ColumnCountTag A constant representing the tag for column-count. | |
| ColumnDefinitionTag | back to summary |
|---|---|
| private static final int ColumnDefinitionTag A constant representing the tag for column-definition. | |
| ColumnDisplaySizeTag | back to summary |
|---|---|
| private static final int ColumnDisplaySizeTag A constant representing the tag for column-display-size. | |
| ColumnIndexTag | back to summary |
|---|---|
| private static final int ColumnIndexTag A constant representing the tag for column-index. | |
| ColumnLabelTag | back to summary |
|---|---|
| private static final int ColumnLabelTag A constant representing the tag for column-label. | |
| ColumnNameTag | back to summary |
|---|---|
| private static final int ColumnNameTag A constant representing the tag for column-name. | |
| ColumnPrecisionTag | back to summary |
|---|---|
| private static final int ColumnPrecisionTag A constant representing the tag for column-precision. | |
| ColumnScaleTag | back to summary |
|---|---|
| private static final int ColumnScaleTag A constant representing the tag for column-scale. | |
| ColumnTypeNameTag | back to summary |
|---|---|
| private static final int ColumnTypeNameTag A constant representing the tag for column-type-name. | |
| ColumnTypeTag | back to summary |
|---|---|
| private static final int ColumnTypeTag A constant representing the tag for column-type. | |
| columnValue | back to summary |
|---|---|
| private String columnValue | |
| CommandTag | back to summary |
|---|---|
| private static final int CommandTag A constant representing the tag for the command property. | |
| ConcurrencyTag | back to summary |
|---|---|
| private static final int ConcurrencyTag A constant representing the tag for the concurrency property. | |
| CurrencyTag | back to summary |
|---|---|
| private static final int CurrencyTag A constant representing the tag for currency. | |
| data | back to summary |
|---|---|
| private String[] data | |
| DATA | back to summary |
|---|---|
| private static final int DATA A constant indicating the state in which this | |
| dataMap | back to summary |
|---|---|
| private HashMap<String, Integer> dataMap | |
| DataSourceLock | back to summary |
|---|---|
| private static final int DataSourceLock A constant representing the tag for the data source lock. | |
| DatasourceTag | back to summary |
|---|---|
| private static final int DatasourceTag A constant representing the tag for the datasource property. | |
| DelTag | back to summary |
|---|---|
| private static final int DelTag | |
| EmptyStringTag | back to summary |
|---|---|
| private static final int EmptyStringTag | |
| emptyStringVal | back to summary |
|---|---|
| private boolean emptyStringVal | |
| EscapeProcessingTag | back to summary |
|---|---|
| private static final int EscapeProcessingTag A constant representing the tag for the escape-processing property. | |
| FetchDirectionTag | back to summary |
|---|---|
| private static final int FetchDirectionTag A constant representing the tag for the fetch-direction property. | |
| FetchSizeTag | back to summary |
|---|---|
| private static final int FetchSizeTag A constant representing the tag for the fetch-size property. | |
| idx | back to summary |
|---|---|
| private int idx | |
| INITIAL | back to summary |
|---|---|
| private static final int INITIAL A constant indicating the state of this
The state is set to | |
| InsDelTag | back to summary |
|---|---|
| private static final int InsDelTag | |
| InsTag | back to summary |
|---|---|
| private static final int InsTag | |
| IsolationLevelTag | back to summary |
|---|---|
| private static final int IsolationLevelTag A constant representing the tag for the isolation-level property | |
| Key_map | back to summary |
|---|---|
| private String Key_map | |
| keyCols | back to summary |
|---|---|
| private Vector<String> keyCols | |
| KeycolsTag | back to summary |
|---|---|
| private static final int KeycolsTag A constant representing the tag for the key-columns property. | |
| lastval | back to summary |
|---|---|
| private String lastval | |
| MapTag | back to summary |
|---|---|
| private static final int MapTag A constant representing the tag for the map property. This map is the type map that specifies the custom mapping for an SQL user-defined type. | |
| MaxFieldSizeTag | back to summary |
|---|---|
| private static final int MaxFieldSizeTag A constant representing the tag for the max-field-size property. | |
| MaxRowsTag | back to summary |
|---|---|
| private static final int MaxRowsTag A constant representing the tag for the max-rows property. | |
| md | back to summary |
|---|---|
| private RowSetMetaData md | |
| METADATA | back to summary |
|---|---|
| private static final int METADATA A constant indicating the state in which this | |
| metaDataValue | back to summary |
|---|---|
| private String metaDataValue | |
| MetaNullTag | back to summary |
|---|---|
| private static final int MetaNullTag A constant representing the tag for null. | |
| MetaTableNameTag | back to summary |
|---|---|
| private static final int MetaTableNameTag A constant representing the tag for table-name. | |
| NullableTag | back to summary |
|---|---|
| private static final int NullableTag A constant representing the tag for nullable. | |
| NullTag | back to summary |
|---|---|
| private static final int NullTag | |
| nullVal | back to summary |
|---|---|
| private boolean nullVal | |
| PropClassTag | back to summary |
|---|---|
| private static final int PropClassTag A constant representing the tag for the class property. | |
| PropColumnTag | back to summary |
|---|---|
| private static final int PropColumnTag A constant representing the tag for the column property. | |
| properties | back to summary |
|---|---|
| private String[] properties A list of the properties for a rowset. There is a constant defined to
correspond to each of these properties so that a | |
| PROPERTIES | back to summary |
|---|---|
| private static final int PROPERTIES A constant indicating the state in which this | |
| propertyValue | back to summary |
|---|---|
| private String propertyValue | |
| propMap | back to summary |
|---|---|
| private HashMap<String, Integer> propMap | |
| PropNullTag | back to summary |
|---|---|
| private static final int PropNullTag A constant representing the tag for the null property. | |
| PropTypeTag | back to summary |
|---|---|
| private static final int PropTypeTag A constant representing the tag for the type property. | |
| QueryTimeoutTag | back to summary |
|---|---|
| private static final int QueryTimeoutTag A constant representing the tag for the query-timeout property. | |
| ReadOnlyTag | back to summary |
|---|---|
| private static final int ReadOnlyTag A constant representing the tag for the read-only property. | |
| resBundle | back to summary |
|---|---|
| private JdbcRowSetResourceBundle resBundle | |
| RowsetTypeTag | back to summary |
|---|---|
| private static final int RowsetTypeTag A constant representing the tag for the rowset-type property. | |
| RowTag | back to summary |
|---|---|
| private static final int RowTag | |
| rs | back to summary |
|---|---|
| private WebRowSetImpl rs | |
| SchemaNameTag | back to summary |
|---|---|
| private static final int SchemaNameTag A constant representing the tag for schema-name. | |
| SearchableTag | back to summary |
|---|---|
| private static final int SearchableTag A constant representing the tag for searchable. | |
| ShowDeletedTag | back to summary |
|---|---|
| private static final int ShowDeletedTag A constant representing the tag for the show-deleted property. | |
| SignedTag | back to summary |
|---|---|
| private static final int SignedTag A constant representing the tag for signed. | |
| state | back to summary |
|---|---|
| private int state | |
| SyncProviderGradeTag | back to summary |
|---|---|
| private static final int SyncProviderGradeTag A constant representing the tag for the sync-provider grade tag. | |
| SyncProviderNameTag | back to summary |
|---|---|
| private static final int SyncProviderNameTag A constant representing the tag for the sync-provider name | |
| SyncProviderTag | back to summary |
|---|---|
| private static final int SyncProviderTag A constant representing the tag for the sync-provider. | |
| SyncProviderVendorTag | back to summary |
|---|---|
| private static final int SyncProviderVendorTag A constant representing the tag for the sync-provider vendor tag. | |
| SyncProviderVersionTag | back to summary |
|---|---|
| private static final int SyncProviderVersionTag A constant representing the tag for the sync-provider version tag. | |
| TableNameTag | back to summary |
|---|---|
| private static final int TableNameTag A constant representing the tag for the table-name property. | |
| tag | back to summary |
|---|---|
| private int tag | |
| tempCommand | back to summary |
|---|---|
| private String tempCommand | |
| tempStr | back to summary |
|---|---|
| private String tempStr | |
| tempUpdate | back to summary |
|---|---|
| private String tempUpdate | |
| typeMap | back to summary |
|---|---|
| private HashMap<String, Class<?>> typeMap | |
| upd | back to summary |
|---|---|
| private Object[] upd | |
| updates | back to summary |
|---|---|
| private Vector<Object[]> updates | |
| UpdTag | back to summary |
|---|---|
| private static final int UpdTag | |
| UrlTag | back to summary |
|---|---|
| private static final int UrlTag A constant representing the tag for the URL property. | |
| Value_map | back to summary |
|---|---|
| private String Value_map | |
| XmlReaderContentHandler | back to summary |
|---|---|
| public XmlReaderContentHandler(RowSet r) Constructs a new
| |
| applyUpdates | back to summary |
|---|---|
| private void applyUpdates() throws SAXException | |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int start, int length) throws SAXException Overrides org. Implements org. Sets a property, metadata, or data value with the characters in
the given array of characters, starting with the array element
indicated by The SAX parser invokes this method and supplies the character array, start position, and length parameter values it got from parsing the XML document. An application programmer never invokes this method directly.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Overrides org. Implements org. Doc from org. Receive notification of the end of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).
| |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String lName, String qName) throws SAXException Overrides org. Implements org. Sets the value for the given element if
If the state is
| |
| error | back to summary |
|---|---|
| public void error(SAXParseException e) throws SAXParseException Overrides org. Implements org. Throws the given
| |
| getBigDecimalValue | back to summary |
|---|---|
| private BigDecimal getBigDecimalValue(String s) | |
| getBinaryValue | back to summary |
|---|---|
| private byte[] getBinaryValue(String s) | |
| getBooleanValue | back to summary |
|---|---|
| private boolean getBooleanValue(String s) | |
| getByteValue | back to summary |
|---|---|
| private byte getByteValue(String s) | |
| getDateValue | back to summary |
|---|---|
| private Date getDateValue(String s) | |
| getDoubleValue | back to summary |
|---|---|
| private double getDoubleValue(String s) | |
| getEmptyStringValue | back to summary |
|---|---|
| private boolean getEmptyStringValue() | |
| getFloatValue | back to summary |
|---|---|
| private float getFloatValue(String s) | |
| getIntegerValue | back to summary |
|---|---|
| private int getIntegerValue(String s) | |
| getLongValue | back to summary |
|---|---|
| private long getLongValue(String s) | |
| getNullValue | back to summary |
|---|---|
| private boolean getNullValue() | |
| getPresentRow | back to summary |
|---|---|
| private Row getPresentRow(WebRowSetImpl rs) throws SQLException Returns the current row of this
| |
| getShortValue | back to summary |
|---|---|
| private short getShortValue(String s) | |
| getState | back to summary |
|---|---|
| private int getState() Retrieves the current state of this
| |
| getStringValue | back to summary |
|---|---|
| private String getStringValue(String s) | |
| getTag | back to summary |
|---|---|
| private int getTag() | |
| getTimestampValue | back to summary |
|---|---|
| private Timestamp getTimestampValue(String s) | |
| getTimeValue | back to summary |
|---|---|
| private Time getTimeValue(String s) | |
| initMaps | back to summary |
|---|---|
| private void initMaps() Creates and initializes three new
The purpose of the mapping is to make comparisons faster. Because comparing
numbers is more efficient than comparing strings, the strings returned
by the parser are mapped to integers, which can then be used in a
| |
| insertValue | back to summary |
|---|---|
| private void insertValue(String s) throws SQLException | |
| notationDecl | back to summary |
|---|---|
| public void notationDecl(String name, String publicId, String systemId) Overrides org. Implements org. Doc from org. Receive notification of a notation declaration. By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document. | |
| setDataValue | back to summary |
|---|---|
| private void setDataValue(char[] ch, int start, int len) throws SQLException | |
| setEmptyStringValue | back to summary |
|---|---|
| private void setEmptyStringValue(boolean e) | |
| setMetaDataValue | back to summary |
|---|---|
| private void setMetaDataValue(String s) throws SQLException | |
| setNullValue | back to summary |
|---|---|
| private void setNullValue(boolean n) | |
| setPropertyValue | back to summary |
|---|---|
| private void setPropertyValue(String s) throws SQLException | |
| setState | back to summary |
|---|---|
| private void setState(String s) throws SAXException | |
| setTag | back to summary |
|---|---|
| private void setTag(int t) | |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Overrides org. Implements org. Doc from org. Receive notification of the beginning of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).
| |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String lName, String qName, Attributes attributes) throws SAXException Overrides org. Implements org. Sets this
If the state is
| |
| unparsedEntityDecl | back to summary |
|---|---|
| public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) Overrides org. Implements org. Doc from org. Receive notification of an unparsed entity declaration. By default, do nothing. Application writers may override this method in a subclass to keep track of the unparsed entities declared in a document. | |
| warning | back to summary |
|---|---|
| public void warning(SAXParseException err) throws SAXParseException Overrides org. Implements org. Prints a warning message to
| |