fr.fluxmedia.transmorpher.parser
Class FMParser
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--fr.fluxmedia.transmorpher.parser.FMParser
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- Direct Known Subclasses:
- ProcessParser, QueryParser, RuleSetParser
- public class FMParser
- extends org.xml.sax.helpers.DefaultHandler
Define a parser for XML Document
Field Summary |
protected int |
debugMode
the mode validating or not |
protected java.util.Stack |
iContext
The current context of the parsing |
protected java.io.PrintWriter |
output
The output for a servlet |
protected javax.xml.parsers.SAXParser |
parser
XML Parser |
Constructor Summary |
FMParser(int debugMode)
The constructor, build the XML Parser but not parse the document |
Method Summary |
void |
error(org.xml.sax.SAXParseException exception)
This method is called when an error occurs during the parsing.
|
void |
fatalError(org.xml.sax.SAXParseException exception)
This method is called when an fatal error occurs during the parsing.
|
Transmorpher |
newParse(java.lang.String uri)
Parse the document corresponding to the URI given in parameter |
void |
warning(org.xml.sax.SAXParseException exception)
This method is called when a warnig occurs during the parsing.
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
parser
protected javax.xml.parsers.SAXParser parser
- XML Parser
iContext
protected java.util.Stack iContext
- The current context of the parsing
output
protected java.io.PrintWriter output
- The output for a servlet
debugMode
protected int debugMode
- the mode validating or not
FMParser
public FMParser(int debugMode)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- The constructor, build the XML Parser but not parse the document
- Parameters:
debugMode
- value of the debug mode- Throws:
javax.xml.parsers.ParserConfigurationException
- Description of the Exceptionorg.xml.sax.SAXException
- Description of the Exception
newParse
public Transmorpher newParse(java.lang.String uri)
throws org.xml.sax.SAXException,
java.io.IOException
- Parse the document corresponding to the URI given in parameter
- Parameters:
uri
- the URI of the document to parse- Returns:
- a graph structure
- Throws:
org.xml.sax.SAXException
- java.io.IOException
- sends when an IO errors occurs
warning
public void warning(org.xml.sax.SAXParseException exception)
- This method is called when a warnig occurs during the parsing.
A message with informations on the warning is printed on sdterr
- Overrides:
warning
in class org.xml.sax.helpers.DefaultHandler
- Parameters:
exception
- Description of the Parameter
error
public void error(org.xml.sax.SAXParseException exception)
- This method is called when an error occurs during the parsing.
A message with informations on the error is printed on sdterr
- Overrides:
error
in class org.xml.sax.helpers.DefaultHandler
- Parameters:
exception
- Description of the Parameter
fatalError
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- This method is called when an fatal error occurs during the parsing.
A message with informations on the fatal error is printed on sdterr
Transmorpher is stopped when this kind of errors occurs.
- Overrides:
fatalError
in class org.xml.sax.helpers.DefaultHandler
- Parameters:
exception
- Description of the Parameter- Throws:
org.xml.sax.SAXException
- Description of the Exception
..no bottom yet...