All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.filters.FilterCompiler

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.filters.FilterCompiler

public class FilterCompiler
extends Object
implements ContentHandler
Compiles a filter document into a FilterSet object.

Filter documents specify the following items:

For more information, see filters.dtd.

FilterCompiler assumes that the filter 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 filter compiler.

For example, the following code creates a FilterSet object from the SalesFilter.ftr filter document.

    // Instantiate a new filter compiler and set the XMLReader.
    compiler = new FilterCompiler(xmlReader);
// Compile SalesFilter.ftr into a FilterSet object. filterSet = compiler.compile(new InputSource(new FileReader("SalesFilter.ftr")));

Version:
2.0
Author:
Ronald Bourret, 2001

Constructor Index

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

Method Index

 o characters(char[], int, int)
For internal use only.
 o compile(XMLDBMSMap, InputSource)
Compile a filter document into a FilterSet 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 FilterCompiler
 public FilterCompiler(XMLReader xmlReader) throws SAXException
Construct a new FilterCompiler and set the XMLReader (parser).

Parameters:
xmlReader - The XMLReader

Methods

 o compile
 public FilterSet compile(XMLDBMSMap map,
                          InputSource src) throws XMLMiddlewareException
Compile a filter document into a FilterSet object.

Parameters:
src - A SAX InputSource for the filter document.
map - The map to which the filters apply.
Returns:
The FilterSet object
Throws: XMLMiddlewareException
Thrown if the filter 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