public class ExtractorFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CORE_DOCUMENT_REL |
| Constructor and Description |
|---|
ExtractorFactory() |
| Modifier and Type | Method and Description |
|---|---|
static POITextExtractor |
createExtractor(DirectoryNode poifsDir) |
static POITextExtractor |
createExtractor(DirectoryNode poifsDir,
POIFSFileSystem fs)
Deprecated.
Use
createExtractor(DirectoryNode) instead |
static POITextExtractor |
createExtractor(File f) |
static POITextExtractor |
createExtractor(InputStream inp) |
static POIXMLTextExtractor |
createExtractor(OPCPackage pkg) |
static POIOLE2TextExtractor |
createExtractor(POIFSFileSystem fs) |
static Boolean |
getAllThreadsPreferEventExtractors()
Should all threads prefer event based over usermodel based extractors?
(usermodel extractors tend to be more accurate, but use more memory)
Default is to use the thread level setting, which defaults to false.
|
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).
|
protected static boolean |
getPreferEventExtractor()
Should this thread use event based extractors is available?
Checks the all-threads one first, then thread specific.
|
static boolean |
getThreadPrefersEventExtractors()
Should this thread prefer event based over usermodel based extractors?
(usermodel extractors tend to be more accurate, but use more memory)
Default is false.
|
static void |
setAllThreadsPreferEventExtractors(Boolean preferEventExtractors)
Should all threads prefer event based over usermodel based extractors?
If set, will take preference over the Thread level setting.
|
static void |
setThreadPrefersEventExtractors(boolean preferEventExtractors)
Should this thread prefer event based over usermodel based extractors?
Will only be used if the All Threads setting is null.
|
public static final String CORE_DOCUMENT_REL
public static boolean getThreadPrefersEventExtractors()
public static Boolean getAllThreadsPreferEventExtractors()
public static void setThreadPrefersEventExtractors(boolean preferEventExtractors)
public static void setAllThreadsPreferEventExtractors(Boolean preferEventExtractors)
protected static boolean getPreferEventExtractor()
public static POITextExtractor createExtractor(File f) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
IOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POITextExtractor createExtractor(InputStream inp) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
IOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POIXMLTextExtractor createExtractor(OPCPackage pkg) throws IOException, OpenXML4JException, org.apache.xmlbeans.XmlException
IOExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POIOLE2TextExtractor createExtractor(POIFSFileSystem fs) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
IOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlException@Deprecated public static POITextExtractor createExtractor(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
createExtractor(DirectoryNode) insteadIOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POITextExtractor createExtractor(DirectoryNode poifsDir) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
IOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext) throws IOException, InvalidFormatException, OpenXML4JException, org.apache.xmlbeans.XmlException
POITextExtractor for each embeded file.IOExceptionInvalidFormatExceptionOpenXML4JExceptionorg.apache.xmlbeans.XmlExceptionpublic static POITextExtractor[] getEmbededDocsTextExtractors(POIXMLTextExtractor ext)
POITextExtractor for each embeded file.Copyright © 2020. All rights reserved.