Package il.co.iter.dbdom

This package provides JDBC wrappers to a DBDOM database. DBDOM is an implementation of W3C DOM in SQL on top of a relational database. For more information on DBDOM, see http://www.iter.co.il.

See:
          Description

Class Summary
DBAttr The Attr interface represents an attribute in an Element object.
DBAttrNodeMap Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
DBCDATASection CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
DBCharacterData The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM.
DBChildNodeList The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
DBComment This interface inherits from CharacterData and represents the content of a comment, i.e., all the characters between the starting ' <!--' and ending '-->'.
DBDocument The Document interface represents the entire HTML or XML document.
DBDocumentNodeMap Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name.
DBDocumentType Each Document has a doctype attribute whose value is either null or a DocumentType object.
DBDOMImplementation The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
DBElement The Element interface represents an element in an HTML or XML document.
DBNode The Node interface is the primary datatype for the entire Document Object Model.
DBProcessingInstruction The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to keep processor-specific information in the text of the document.
DBText The Text interface inherits from CharacterData and represents the textual content (termed character data in XML) of an Element or Attr.
StoredProcedure Represents a stored procedure with a known result set signature in the underlying databas. This class is not currently used. Some of the comments in the class are still highly relevant.
 

Exception Summary
DBDOMException DOMException is a generic exception thrown by DBDOM objects
DBDOMSpException DOMSpException is thrown if a stored procedure does not return a result set that is specified in DBDOM.
DBDOMSqlException DOMSqlException is thrown when an error occures in a JDBC connection other than a DOMException.
 

Package il.co.iter.dbdom Description

This package provides JDBC wrappers to a DBDOM database. DBDOM is an implementation of W3C DOM in SQL on top of a relational database. For more information on DBDOM, see http://www.iter.co.il.

This package provides classes that implement interfaces in package org.w3c.dom for the convenience of Java developers who use DBDOM.

Classes in this package can be used as a drop-in replacement in any application that expects a DOM object.

To use this package, open a JDBC Connection to a DBDOM database and pass it to the constructor of DBDOMImplementation.

Design Notes:

Many objeccts are kept in DBDOMImplementation as dynamic private members, where one might expect static members in other classes. This is because diffrent instances of DBDOMImplementation may hold connections to different databases - with different Connection objects and possibly different versions of DBDOM and possibly different RDBMSs altogether.

Implementation notes:

The current JDBC wrappers take a simplistic approach to caching and locking. They are just that - wrappers. All 'real' work occures in the database, in its stored procedures.

In particular,

Throwing DOMException.INVALID_STATE_ERR is not implemented yet.

Error checking:

In genreal, the database is responsible for error checking. Java wrappers pass their arguments 'as is' to stored procedures that are expected to perform all relevant validation. This is consistent with the concept of wrappers.

However, certain issues are beyond the database's control. For instance, the database cannot know if a node that the client refers to is from the same databes or a different one. Consider two DBDOM databases that both have Document nodes with id 123. If one receives a request to appendChild() where both parent and cild nodes' ownerDocument's id is 123 but the nodes are from different databases, it will honor the request, since it has no way to check for this. The wrapper is, therefore, expected to compare two Nodes' connectionStrings and throw DOMException.WRONG_DOCUMENT_ERR if necessary before invoking stored procedures. The wrapper also checks that a Node's Implementation is DBDOMImolementation. This is accomplished rather trivially, through catching ClassCastException: if a Node cannot be cast to DBNode, there is no id to go by.

Note that apart from casting exceptions, DOMException.WRONG_DOCUMENT_ERR cheking is not currently implemented in the wrappers or, only in the database.