org.apache.tika.parser
Class ParserPostProcessor

java.lang.Object
  extended by org.apache.tika.parser.ParserDecorator
      extended by org.apache.tika.parser.ParserPostProcessor
All Implemented Interfaces:
Parser

public class ParserPostProcessor
extends ParserDecorator

Parser decorator that post-processes the results from a decorated parser. The post-processing takes care of filling in any "fulltext", "summary", and regexp Content objects with the full text content returned by the decorated parser. The post-processing also catches and logs any exceptions thrown by the decorated parser.


Constructor Summary
ParserPostProcessor(Parser parser)
          Creates a post-processing decorator for the given parser.
 
Method Summary
 void parse(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata)
          Forwards the call to the delegated parser and post-processes the results as described above.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserPostProcessor

public ParserPostProcessor(Parser parser)
Creates a post-processing decorator for the given parser.

Parameters:
parser - the parser to be decorated
Method Detail

parse

public void parse(java.io.InputStream stream,
                  org.xml.sax.ContentHandler handler,
                  Metadata metadata)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  TikaException
Forwards the call to the delegated parser and post-processes the results as described above.

Specified by:
parse in interface Parser
Overrides:
parse in class ParserDecorator
Parameters:
stream - the document stream (input)
handler - handler for the XHTML SAX events (output)
metadata - document metadata (input and output)
Throws:
java.io.IOException - if the document stream could not be read
org.xml.sax.SAXException - if the SAX events could not be processed
TikaException - if the document could not be parsed


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.