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