All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.actions.ActionCompiler

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.actions.ActionCompiler

public class ActionCompiler
extends Object
implements ContentHandler
Compiles an action document into an Actions object.

Action documents specify a default action for a document, as well as per-class (per element type) actions. For more information, see actions.dtd.

ActionCompiler assumes that the action document is valid. If it is not, the class will either generate garbage or throw an exception. One way to guarantee that the document is valid is to pass a validating parser to the action compiler.

For example, the following code creates an Actions object from the sales.act action document.

    // Instantiate a new action compiler and set the XMLReader.
    compiler = new ActionCompiler(xmlReader);

// Compile sales.act into an Actions object. actions = compiler.compile(map, new InputSource(new FileReader("sales.act")));

Version:
2.0
Author:
Ronald Bourret, 2001

Constructor Index

 o ActionCompiler(XMLReader)
Construct a new ActionCompiler and set the XMLReader (parser).

Method Index

 o characters(char[], int, int)
For internal use only.
 o compile(XMLDBMSMap, InputSource)
Compile an action document into an Actions object.
 o endDocument()
For internal use only.
 o endElement(String, String, String)
For internal use only.
 o endPrefixMapping(String)
For internal use only.
 o ignorableWhitespace(char[], int, int)
For internal use only.
 o processingInstruction(String, String)
For internal use only.
 o setDocumentLocator(Locator)
For internal use only.
 o skippedEntity(String)
For internal use only.
 o startDocument()
For internal use only.
 o startElement(String, String, String, Attributes)
For internal use only.
 o startPrefixMapping(String, String)
For internal use only.

Constructors

 o ActionCompiler
 public ActionCompiler(XMLReader xmlReader) throws SAXException
Construct a new ActionCompiler and set the XMLReader (parser).

Parameters:
xmlReader - The XMLReader
Throws: SAXException
Thrown if the XMLReader doesn't support namespaces.

Methods

 o compile
 public Actions compile(XMLDBMSMap map,
                        InputSource src) throws XMLMiddlewareException
Compile an action document into an Actions object.

Parameters:
map - The map to which the actions apply.
src - A SAX InputSource for the action document.
Returns:
The Actions object
Throws: XMLMiddlewareException
Thrown if the action document contains an error.
 o startDocument
 public void startDocument() throws SAXException
For internal use only.

 o endDocument
 public void endDocument() throws SAXException
For internal use only.

 o startElement
 public void startElement(String uri,
                          String localName,
                          String qName,
                          Attributes attrs) throws SAXException
For internal use only.

 o endElement
 public void endElement(String uri,
                        String localName,
                        String qName) throws SAXException
For internal use only.

 o characters
 public void characters(char ch[],
                        int start,
                        int length) throws SAXException
For internal use only.

 o ignorableWhitespace
 public void ignorableWhitespace(char ch[],
                                 int start,
                                 int length) throws SAXException
For internal use only.

 o processingInstruction
 public void processingInstruction(String target,
                                   String data) throws SAXException
For internal use only.

 o startPrefixMapping
 public void startPrefixMapping(String prefix,
                                String uri) throws SAXException
For internal use only.

 o endPrefixMapping
 public void endPrefixMapping(String prefix) throws SAXException
For internal use only.

 o setDocumentLocator
 public void setDocumentLocator(Locator locator)
For internal use only.

 o skippedEntity
 public void skippedEntity(String name) throws SAXException
For internal use only.


All Packages  Class Hierarchy  This Package  Previous  Next  Index