All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmldbms.maps.factories.MapCompiler

java.lang.Object
   |
   +----org.xmlmiddleware.xmldbms.maps.factories.MapCompiler

public class MapCompiler
extends Object
implements ContentHandler
Compile a map document into an XMLDBMSMap object.

MapCompiler assumes that the mapping 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 map compiler.

For example, the following code creates a map from the sales.map mapping document.

    // Instantiate a new map compiler and set the XMLReader.
    compiler = new MapCompiler(xmlReader);
// Compile sales.map into an XMLDBMSMap object. map = compiler.compile(new InputSource(new FileReader("sales.map")));

Version:
2.0
Author:
Ronald Bourret, 1998-9, 2001

Constructor Index

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

Method Index

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

Methods

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

Parameters:
src - A SAX InputSource for the mapping document.
Returns:
The XMLDBMSMap object
Throws: XMLMiddlewareException
Thrown if the mapping 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