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:
- Wrapper elements These elements wrap the result.
- Root filters These specify the conditions for retrieving
data from the root table(s).
- Result set info Specifies the class table to which the result
set corresponds.
- Table filters Specifies the conditions used to retrieve data
from the child tables of a class table.
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
-
FilterCompiler(XMLReader)
- Construct a new FilterCompiler and set the XMLReader (parser).
-
characters(char[], int, int)
- For internal use only.
-
compile(XMLDBMSMap, InputSource)
- Compile a filter document into a FilterSet object.
-
endDocument()
- For internal use only.
-
endElement(String, String, String)
- For internal use only.
-
endPrefixMapping(String)
- For internal use only.
-
ignorableWhitespace(char[], int, int)
- For internal use only.
-
processingInstruction(String, String)
- For internal use only.
-
setDocumentLocator(Locator)
- For internal use only.
-
skippedEntity(String)
- For internal use only.
-
startDocument()
- For internal use only.
-
startElement(String, String, String, Attributes)
- For internal use only.
-
startPrefixMapping(String, String)
- For internal use only.
FilterCompiler
public FilterCompiler(XMLReader xmlReader) throws SAXException
- Construct a new FilterCompiler and set the XMLReader (parser).
- Parameters:
- xmlReader - The XMLReader
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.
startDocument
public void startDocument() throws SAXException
- For internal use only.
endDocument
public void endDocument() throws SAXException
- For internal use only.
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attrs) throws SAXException
- For internal use only.
endElement
public void endElement(String uri,
String localName,
String qName) throws SAXException
- For internal use only.
characters
public void characters(char ch[],
int start,
int length) throws SAXException
- For internal use only.
ignorableWhitespace
public void ignorableWhitespace(char ch[],
int start,
int length) throws SAXException
- For internal use only.
processingInstruction
public void processingInstruction(String target,
String data) throws SAXException
- For internal use only.
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri) throws SAXException
- For internal use only.
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- For internal use only.
setDocumentLocator
public void setDocumentLocator(Locator locator)
- For internal use only.
skippedEntity
public void skippedEntity(String name) throws SAXException
- For internal use only.
All Packages Class Hierarchy This Package Previous Next Index