Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org.jfree.report.modules.gui » converter » parser » [javadoc | source]
org.jfree.report.modules.gui.converter.parser
public class: ConverterParser [javadoc | source]
java.lang.Object
   org.jfree.xml.Parser
      org.jfree.report.modules.gui.converter.parser.ConverterParser
The ConverterParser is a filtering proxy implementation that uses the mappings defined in this package to modify the parsed attribute values on the fly into the new values.
Constructor:
 public ConverterParser(Parser base) 
    Creates a new ConverterParser using the given parser as backend.
    Parameters:
    base - the backend parser that will do all the work.
Method from org.jfree.report.modules.gui.converter.parser.ConverterParser Summary:
characters,   endDocument,   endElement,   error,   fatalError,   getConfigProperty,   getConfigProperty,   getHelperObject,   getInitialFactory,   getInstance,   getLocator,   getResult,   notationDecl,   peekFactory,   popFactory,   pushFactory,   resolveEntity,   setConfigProperty,   setDocumentLocator,   setHelperObject,   setInitialFactory,   startDocument,   startElement,   unparsedEntityDecl,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.modules.gui.converter.parser.ConverterParser Detail:
 public  void characters(char[] chars,
    int start,
    int length) throws SAXException 
    Receive notification of character data inside an element. Forwards the event to the base parser implementation.
 public  void endDocument() throws SAXException 
    Receive notification of the end of the document. Forwards the event to the base parser implementation.
 public  void endElement(String uri,
    String localName,
    String qName) throws SAXException 
    Receive notification of the end of the document. Updates the context and forwards the event to the base parser.
 public  void error(SAXParseException exception) throws SAXException 
    Receive notification of a recoverable error.

    This corresponds to the definition of "error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a validating parser would use this callback to report the violation of a validity constraint. The default behaviour is to take no action.

    The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end. If the application cannot do so, then the parser should report a fatal error even if the XML 1.0 recommendation does not require it to do so.

    Filters may use this method to report other, non-XML errors as well.

 public  void fatalError(SAXParseException exception) throws SAXException 
    Receive notification of a non-recoverable error.

    This corresponds to the definition of "fatal error" in section 1.2 of the W3C XML 1.0 Recommendation. For example, a parser would use this callback to report the violation of a well-formedness constraint.

    The application must assume that the document is unusable after the parser has invoked this method, and should continue (if at all) only for the sake of collecting addition error messages: in fact, SAX parsers are free to stop reporting any other events once this method has been invoked.

 public String getConfigProperty(String key) 
    Returns the configuration property with the specified key.
 public String getConfigProperty(String key,
    String defaultValue) 
    Returns the configuration property with the specified key (or the specified default value if there is no such property).

    If the property is not defined in this configuration, the code will lookup the property in the parent configuration.

 public Object getHelperObject(String key) 
    Returns a helper object.
 public ElementDefinitionHandler getInitialFactory() 
    Returns the initial handler.
 public Parser getInstance() 
    Returns a new instance of the parser.
 public Locator getLocator() 
    Returns the current locator.
 public Object getResult() 
    Returns the parsed result object after the parsing is complete. Calling this function during the parsing is undefined and may result in an IllegalStateException.

    This is a proxy implementation. Forwards all calls to the base parser.

 public  void notationDecl(String name,
    String publicId,
    String systemId) throws SAXException 
    Receive notification of a notation declaration event.

    It is up to the application to record the notation for later reference, if necessary.

    At least one of publicId and systemId must be non-null. If a system identifier is present, and it is a URL, the SAX parser must resolve it fully before passing it to the application through this event.

    There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.

 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 elementDefinitionHandler) 
    Pushes a handler onto the stack.
 public InputSource resolveEntity(String publicId,
    String systemId) throws SAXException 
    Allow the application to resolve external entities.

    The Parser will call this method before opening any external entity except the top-level document entity (including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element): the application may request that the parser resolve the entity itself, that it use an alternative URI, or that it use an entirely different input source.

    If the system identifier is a URL, the SAX parser must resolve it fully before reporting it to the application.

    The official SAX implementation declares that it also throws an IOException, while the JDK1.4 SAX2 implementation doesn't. We catch all exceptions here and map them into the SAXException to resolve that issue.

 public  void setConfigProperty(String key,
    String value) 
    Sets a parser configuration value.
 public  void setDocumentLocator(Locator locator) 
    Receive an object for locating the origin of SAX document events. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.
 public  void setHelperObject(String key,
    Object value) 
    Sets a helper object.
 public  void setInitialFactory(ElementDefinitionHandler elementDefinitionHandler) 
    Sets the initial handler.
 public  void startDocument() throws SAXException 
    Receive notification of the beginning of the document. Forwards the event to the base parser implementation.
 public  void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException 
    Receive notification of the start of an element. Updates the context and forwards the event to the base parser.
 public  void unparsedEntityDecl(String name,
    String publicId,
    String systemId,
    String notationName) throws SAXException 
    Receive notification of an unparsed entity declaration event.

    Note that the notation name corresponds to a notation reported by the notationDecl event. It is up to the application to record the entity for later reference, if necessary.

    If the system identifier is a URL, the parser must resolve it fully before passing it to the application.

 public  void warning(SAXParseException exception) throws SAXException 
    Receive notification of a warning.

    SAX parsers will use this method to report conditions that are not errors or fatal errors as defined by the XML 1.0 recommendation. The default behaviour is to take no action.

    The SAX parser must continue to provide normal parsing events after invoking this method: it should still be possible for the application to process the document through to the end.

    Filters may use this method to report other, non-XML warnings as well.