org.ephman.abra.tools
Class SAXXmlProcessor

java.lang.Object
  |
  +--org.ephman.abra.tools.SAXXmlProcessor

public abstract class SAXXmlProcessor
extends java.lang.Object


Field Summary
protected  javax.xml.parsers.DocumentBuilder domBuilder
           
 
Constructor Summary
SAXXmlProcessor()
           
 
Method Summary
protected abstract  void applyRules(org.w3c.dom.Element thisNode, java.lang.String mapFile)
           
 org.w3c.dom.Element mapXMLFile(java.io.Reader reader)
           
 org.w3c.dom.Element mapXMLFile(java.io.Reader reader, boolean validate)
           
 org.w3c.dom.Element mapXMLFile(java.lang.String schemaFname)
          maps XML schema to a map file for unmarshalling
 org.w3c.dom.Element mapXMLFile(java.lang.String schemaFname, boolean validate)
           
protected  void recurseOnChildList(org.w3c.dom.NodeList children, java.lang.String mapFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domBuilder

protected javax.xml.parsers.DocumentBuilder domBuilder
Constructor Detail

SAXXmlProcessor

public SAXXmlProcessor()
Method Detail

mapXMLFile

public org.w3c.dom.Element mapXMLFile(java.lang.String schemaFname)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      java.io.FileNotFoundException,
                                      java.io.IOException,
                                      org.xml.sax.SAXException
maps XML schema to a map file for unmarshalling

Throws:
org.xml.sax.SAXParseException - - parse error - see the content of exception for detailed info.
javax.xml.parsers.ParserConfigurationException - - can't create DOM builder
java.io.IOException - - cannot read the input file
SAXEXecption - - some other parsing problem
java.io.FileNotFoundException
org.xml.sax.SAXException

mapXMLFile

public org.w3c.dom.Element mapXMLFile(java.lang.String schemaFname,
                                      boolean validate)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      java.io.FileNotFoundException,
                                      java.io.IOException,
                                      org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException

mapXMLFile

public org.w3c.dom.Element mapXMLFile(java.io.Reader reader)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      java.io.FileNotFoundException,
                                      java.io.IOException,
                                      org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException

mapXMLFile

public org.w3c.dom.Element mapXMLFile(java.io.Reader reader,
                                      boolean validate)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      java.io.FileNotFoundException,
                                      java.io.IOException,
                                      org.xml.sax.SAXException
Parameters:
reader - input XML is read from here
validate - whether or not to validate..
Throws:
org.xml.sax.SAXParseException - - parse error - see the content of exception for detailed info.
javax.xml.parsers.ParserConfigurationException - - can't create DOM builder
java.io.IOException - - cannot read the input file
SAXEXecption - - some other parsing problem
java.io.FileNotFoundException
org.xml.sax.SAXException

applyRules

protected abstract void applyRules(org.w3c.dom.Element thisNode,
                                   java.lang.String mapFile)
                            throws javax.xml.parsers.ParserConfigurationException,
                                   java.io.FileNotFoundException,
                                   java.io.IOException,
                                   org.xml.sax.SAXException,
                                   SchemaException
javax.xml.parsers.ParserConfigurationException
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException
SchemaException

recurseOnChildList

protected void recurseOnChildList(org.w3c.dom.NodeList children,
                                  java.lang.String mapFile)
                           throws javax.xml.parsers.ParserConfigurationException,
                                  java.io.FileNotFoundException,
                                  java.io.IOException,
                                  org.xml.sax.SAXException,
                                  SchemaException
javax.xml.parsers.ParserConfigurationException
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException
SchemaException