| org.jfree.xml.FrontendDefaultHandler org.jfree.xml.Parser
Parser | abstract public class Parser extends FrontendDefaultHandler (Code) | | The Parser handles the SAXEvents and forwards the event call to the currently
active ElementDefinitionHandler. Contains methods to manage and
configure the parsing process.
An initial report definition handler must be set before the parser can be used.
author: Thomas Morgner |
Constructor Summary | |
public | Parser() Creates a new parser. |
Method Summary | |
public void | characters(char[] ch, int start, int length) Receive notification of character data inside an element.
By default, do nothing. | public void | endDocument() Receive notification of the end of the document.
By default, do nothing. | public void | endElement(String uri, String localName, String qName) Receive notification of the end of an element.
By default, do nothing. | public String[] | getComments() Returns the currently collected comments. | public Object | getHelperObject(String key) Returns a helper object.
Parameters: key - the key. | public ElementDefinitionHandler | getInitialFactory() Returns the initial handler. | abstract public Parser | getInstance() Returns a new instance of the parser. | abstract public Object | getResult() Returns the parsed result object after the parsing is complete. | final public FrontendDefaultHandler | newInstance() | public ElementDefinitionHandler | peekFactory() Reads a handler off the stack without removing it. | public ElementDefinitionHandler | popFactory() Pops a handler from the stack. | public void | pushFactory(ElementDefinitionHandler factory) Pushes a handler onto the stack. | public void | setHelperObject(String key, Object value) Sets a helper object. | public void | setInitialFactory(ElementDefinitionHandler factory) Sets the initial handler. | public void | startDocument() Receive notification of the beginning of the document.
By default, do nothing. | public void | startElement(String uri, String localName, String qName, Attributes attributes) Receive notification of the start of an element.
By default, do nothing. |
CONTENTBASE_KEY | final public static String CONTENTBASE_KEY(Code) | | A key for the content base.
|
Parser | public Parser()(Code) | | Creates a new parser.
|
characters | public void characters(char[] ch, int start, int length) throws SAXException(Code) | | Receive notification of character data inside an element.
By default, do nothing. Application writers may override this
method to take specific actions for each chunk of character data
(such as adding the data to a node or buffer, or printing it to
a file).
Parameters: ch - the characters. Parameters: start - the start position in the character array. Parameters: length - the number of characters to use from the character array. exception: SAXException - Any SAX exception, possibly wrapping another exception. See Also: org.xml.sax.ContentHandler.characters |
endDocument | public void endDocument() throws SAXException(Code) | | Receive notification of the end of the document.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the end
of a document (such as finalising a tree or closing an output
file).
exception: SAXException - Any SAX exception, possibly wrapping another exception. See Also: org.xml.sax.ContentHandler.endDocument |
endElement | public void endElement(String uri, String localName, String qName) throws SAXException(Code) | | Receive notification of the end of an element.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the end of
each element (such as finalising a tree node or writing
output to a file).
Parameters: uri - the URI. Parameters: localName - the element type name. Parameters: qName - the name. exception: SAXException - Any SAX exception, possiblywrapping another exception. See Also: org.xml.sax.ContentHandler.endElement |
getComments | public String[] getComments()(Code) | | Returns the currently collected comments.
the comments. |
getHelperObject | public Object getHelperObject(String key)(Code) | | Returns a helper object.
Parameters: key - the key. The object. |
getInstance | abstract public Parser getInstance()(Code) | | Returns a new instance of the parser.
a new instance of the parser. |
getResult | abstract public Object getResult()(Code) | | Returns the parsed result object after the parsing is complete. Calling
this function during the parsing is undefined and may result in an
IllegalStateException.
the parsed result. |
setHelperObject | public void setHelperObject(String key, Object value)(Code) | | Sets a helper object.
Parameters: key - the key. Parameters: value - the value. |
setInitialFactory | public void setInitialFactory(ElementDefinitionHandler factory)(Code) | | Sets the initial handler.
Parameters: factory - the initial handler. |
startDocument | public void startDocument() throws SAXException(Code) | | Receive notification of the beginning of the document.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the beginning
of a document (such as allocating the root node of a tree or
creating an output file).
exception: SAXException - Any SAX exception, possibly wrapping another exception. See Also: org.xml.sax.ContentHandler.startDocument |
startElement | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code) | | Receive notification of the start of an element.
By default, do nothing. Application writers may override this
method in a subclass to take specific actions at the start of
each element (such as allocating a new tree node or writing
output to a file).
Parameters: uri - the URI. Parameters: localName - the element type name. Parameters: qName - the name. Parameters: attributes - the specified or defaulted attributes. exception: SAXException - Any SAX exception, possiblywrapping another exception. See Also: org.xml.sax.ContentHandler.startElement |
Fields inherited from org.jfree.xml.FrontendDefaultHandler | final public static String CONTENTBASE_KEY(Code)(Java Doc)
|
|
|