org.apache.poi.extractor
Class ExtractorFactory

java.lang.Object
  extended by org.apache.poi.extractor.ExtractorFactory

public class ExtractorFactory
extends java.lang.Object

Figures out the correct POITextExtractor for your supplied document, and returns it.


Field Summary
static java.lang.String CORE_DOCUMENT_REL
           
 
Constructor Summary
ExtractorFactory()
           
 
Method Summary
static POIOLE2TextExtractor createExtractor(DirectoryNode poifsDir, POIFSFileSystem fs)
           
static POITextExtractor createExtractor(java.io.File f)
           
static POITextExtractor createExtractor(java.io.InputStream inp)
           
static POIXMLTextExtractor createExtractor(OPCPackage pkg)
           
static POIOLE2TextExtractor createExtractor(POIFSFileSystem fs)
           
static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext)
          Returns an array of text extractors, one for each of the embeded documents in the file (if there are any).
static POITextExtractor[] getEmbededDocsTextExtractors(POIXMLTextExtractor ext)
          Returns an array of text extractors, one for each of the embeded documents in the file (if there are any).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CORE_DOCUMENT_REL

public static final java.lang.String CORE_DOCUMENT_REL
See Also:
Constant Field Values
Constructor Detail

ExtractorFactory

public ExtractorFactory()
Method Detail

createExtractor

public static POITextExtractor createExtractor(java.io.File f)
                                        throws java.io.IOException,
                                               InvalidFormatException,
                                               OpenXML4JException,
                                               XmlException
Throws:
java.io.IOException
InvalidFormatException
OpenXML4JException
XmlException

createExtractor

public static POITextExtractor createExtractor(java.io.InputStream inp)
                                        throws java.io.IOException,
                                               InvalidFormatException,
                                               OpenXML4JException,
                                               XmlException
Throws:
java.io.IOException
InvalidFormatException
OpenXML4JException
XmlException

createExtractor

public static POIXMLTextExtractor createExtractor(OPCPackage pkg)
                                           throws java.io.IOException,
                                                  OpenXML4JException,
                                                  XmlException
Throws:
java.io.IOException
OpenXML4JException
XmlException

createExtractor

public static POIOLE2TextExtractor createExtractor(POIFSFileSystem fs)
                                            throws java.io.IOException
Throws:
java.io.IOException

createExtractor

public static POIOLE2TextExtractor createExtractor(DirectoryNode poifsDir,
                                                   POIFSFileSystem fs)
                                            throws java.io.IOException
Throws:
java.io.IOException

getEmbededDocsTextExtractors

public static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext)
                                                       throws java.io.IOException
Returns an array of text extractors, one for each of the embeded documents in the file (if there are any). If there are no embeded documents, you'll get back an empty array. Otherwise, you'll get one open POITextExtractor for each embeded file.

Throws:
java.io.IOException

getEmbededDocsTextExtractors

public static POITextExtractor[] getEmbededDocsTextExtractors(POIXMLTextExtractor ext)
Returns an array of text extractors, one for each of the embeded documents in the file (if there are any). If there are no embeded documents, you'll get back an empty array. Otherwise, you'll get one open POITextExtractor for each embeded file.



Copyright 2011 The Apache Software Foundation or its licensors, as applicable.