org.apache.tika.parser
Class ExternalParser

java.lang.Object
  extended by org.apache.tika.parser.AbstractParser
      extended by org.apache.tika.parser.ExternalParser
All Implemented Interfaces:
java.io.Serializable, Parser

Deprecated. Use the more advanced ExternalParser instead

@Deprecated
public class ExternalParser
extends AbstractParser

Very basic parser that uses an external program (like catdoc or pdf2txt) to extract text content from a given document.

See Also:
Serialized Form

Constructor Summary
ExternalParser()
          Deprecated.  
 
Method Summary
 java.lang.String getCommand()
          Deprecated.  
 java.util.Set<MediaType> getSupportedTypes()
          Deprecated.  
 java.util.Set<MediaType> getSupportedTypes(ParseContext context)
          Deprecated. Returns the set of media types supported by this parser when used with the given parse context.
 void parse(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context)
          Deprecated. Executes the configured external command and passes the given document stream as a simple XHTML document to the given SAX content handler.
 void setCommand(java.lang.String command)
          Deprecated.  
 void setSupportedTypes(java.util.Set<MediaType> supportedTypes)
          Deprecated.  
 
Methods inherited from class org.apache.tika.parser.AbstractParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalParser

public ExternalParser()
Deprecated. 
Method Detail

getSupportedTypes

public java.util.Set<MediaType> getSupportedTypes(ParseContext context)
Deprecated. 
Description copied from interface: Parser
Returns the set of media types supported by this parser when used with the given parse context.

Parameters:
context - parse context
Returns:
immutable set of media types

getSupportedTypes

public java.util.Set<MediaType> getSupportedTypes()
Deprecated. 

setSupportedTypes

public void setSupportedTypes(java.util.Set<MediaType> supportedTypes)
Deprecated. 

getCommand

public java.lang.String getCommand()
Deprecated. 

setCommand

public void setCommand(java.lang.String command)
Deprecated. 

parse

public void parse(java.io.InputStream stream,
                  org.xml.sax.ContentHandler handler,
                  Metadata metadata,
                  ParseContext context)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  TikaException
Deprecated. 
Executes the configured external command and passes the given document stream as a simple XHTML document to the given SAX content handler. No metadata is extracted.

Parameters:
stream - the document stream (input)
handler - handler for the XHTML SAX events (output)
metadata - document metadata (input and output)
context - parse context
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 © 2007-2011 The Apache Software Foundation. All Rights Reserved.