|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.chaperon.process.ParserProcessor
public class ParserProcessor
This class represents a simulation of a pushdown automata using the parser automaton class.
Field Summary | |
---|---|
static java.lang.String |
ERROR
|
static java.lang.String |
NS_OUTPUT
Namespace for the generated SAX events. |
static java.lang.String |
OUTPUT
|
Constructor Summary | |
---|---|
ParserProcessor()
Create a new parser processor. |
|
ParserProcessor(ParserAutomaton automaton,
org.apache.commons.logging.Log log)
Create a new parser processor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
void |
comment(char[] ch,
int start,
int len)
Report an XML comment anywhere in the document. |
void |
endCDATA()
Report the end of a CDATA section. |
void |
endDocument()
Receive notification of the end of a document. |
void |
endDTD()
Report the end of DTD declarations. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Receive notification of the end of an element. |
void |
endEntity(java.lang.String name)
Report the end of an entity. |
void |
endPrefixMapping(java.lang.String prefix)
End the scope of a prefix-URI mapping. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable whitespace in element content. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Receive notification of a processing instruction. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the ContentHandler that will receive XML data. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Receive an object for locating the origin of SAX document events. |
void |
setFailSafe(boolean failsafe)
|
void |
setFlatten(boolean flatten)
If the adapter should produce a more flatten XML hirachy, which means elements which the same name will be collapsed |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the LexicalHandler that will receive XML data. |
void |
setLocalizable(boolean localizable)
If true , the line and column number information are let in the XML output for
each token. |
void |
setLog(org.apache.commons.logging.Log log)
Provide processor with a log. |
void |
setParserAutomaton(ParserAutomaton automaton)
Set the parser automaton for the processor. |
void |
skippedEntity(java.lang.String name)
Receive notification of a skipped entity. |
void |
startCDATA()
Report the start of a CDATA section. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Report the start of DTD declarations, if any. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Receive notification of the beginning of an element. |
void |
startEntity(java.lang.String name)
Report the beginning of an entity. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Begin the scope of a prefix-URI Namespace mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NS_OUTPUT
public static final java.lang.String OUTPUT
public static final java.lang.String ERROR
Constructor Detail |
---|
public ParserProcessor()
public ParserProcessor(ParserAutomaton automaton, org.apache.commons.logging.Log log)
automaton
- Parser automaton, which the processor should ues.handler
- Handler, which should receives the parser events.log
- Log, which should used.Method Detail |
---|
public void setParserAutomaton(ParserAutomaton automaton)
automaton
- Parser automaton.public void setContentHandler(org.xml.sax.ContentHandler handler)
ContentHandler
that will receive XML data.
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
LexicalHandler
that will receive XML data.
public void setLog(org.apache.commons.logging.Log log)
log
- The log.public void setLocalizable(boolean localizable)
true
, the line and column number information are let in the XML output for
each token.
localizable
- If the XML may be localizable.public void setFlatten(boolean flatten)
flatten
- True, if a more flatten hirachy should be produced.public void setFailSafe(boolean failsafe)
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void comment(char[] ch, int start, int len) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |