|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.objectweb.cjdbc.controller.xml.ControllerParser
Allows to parse an XML content containing the description of the controller confirming to C-JDBC-controller.dtd.
| Field Summary | |
private ControllerFactory |
config
C-JDBC controller to setup. |
private Controller |
controller
|
(package private) java.lang.String |
controllerIP
|
(package private) static Trace |
logger
Logger instance. |
private ReportManager |
manager
|
private boolean |
parseAccept
|
private org.xml.sax.XMLReader |
parser
XML parser. |
private ControllerSecurityManager |
security
|
private SSLConfiguration |
ssl
|
| Constructor Summary | |
ControllerParser(ControllerFactory configure)
Creates a new ControllerParser instance. |
|
| Method Summary | |
void |
endDocument()
Finalizes parsing of a document. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
DatabasesParser for end of element. |
void |
error(org.xml.sax.SAXParseException e)
Handles notification of a recoverable parser error. |
void |
fatalError(org.xml.sax.SAXParseException e)
Handles notification of a non-recoverable parser error. |
void |
readXML(java.io.FileReader fileReader,
boolean validateBeforeParsing)
Parses an XML formatted file according to C-JDBC-controller DTD. |
void |
readXML(java.lang.String xml)
Parses an XML content according to C-JDBC-controller DTD. |
void |
readXML(java.lang.String xml,
boolean validateBeforeParsing)
Parses an XML formatted string according to C-JDBC-controller DTD. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Allows to parse the document with a local copy of the DTD whatever the original DOCTYPE found. |
void |
startDocument()
Initializes parsing of a document. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
Analyzes an element first line. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static Trace logger
private org.xml.sax.XMLReader parser
private ControllerFactory config
private ControllerSecurityManager security
private Controller controller
private boolean parseAccept
private SSLConfiguration ssl
java.lang.String controllerIP
private ReportManager manager
| Constructor Detail |
public ControllerParser(ControllerFactory configure)
throws java.lang.Exception
ControllerParser instance. This method
Instanciates also a new ControllerHandler.
configure - a ControllerFactory object that contains
the configuration to update with values from xml parsing
java.lang.Exception - if an error occurs| Method Detail |
public void readXML(java.lang.String xml)
throws java.io.IOException,
org.xml.sax.SAXException
xml - a String containing the XML content to parse
org.xml.sax.SAXException - if an error occurs
java.io.IOException - if an error occurs
public void readXML(java.lang.String xml,
boolean validateBeforeParsing)
throws java.io.IOException,
org.xml.sax.SAXException
xml - a String reference to the xml to parsevalidateBeforeParsing - if validation should be checked before parsing
org.xml.sax.SAXException - if an error occurs
java.io.IOException - if an error occurs
public void readXML(java.io.FileReader fileReader,
boolean validateBeforeParsing)
throws java.io.IOException,
org.xml.sax.SAXException
fileReader - a FileReader reference to the xml to parsevalidateBeforeParsing - if validation should be checked before parsing
org.xml.sax.SAXException - if an error occurs
java.io.IOException - if an error occurs
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
e - the warning information encoded as an exception.
org.xml.sax.SAXException - any SAX exception, possibly wrapping another
exception.
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
e - the warning information encoded as an exception.
org.xml.sax.SAXException - any SAX exception, possibly wrapping another
exception
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
DOCTYPE found. Warning, this method is called only
if the XML document contains a DOCTYPE.
org.xml.sax.SAXExceptionEntityResolver.resolveEntity(java.lang.String,
java.lang.String)
public void startDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - unspecialized error
public void endDocument()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - unspecialized error
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
uri - name space URIlocalName - local namename - element raw nameatts - element attributes
org.xml.sax.SAXException - if an error occurs
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
throws org.xml.sax.SAXException
uri - name space URIlocalName - local namename - element raw name
org.xml.sax.SAXException - if an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||