|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.aq.textextraction.TextExtractorRegistry
public class TextExtractorRegistry
A register that provides instances of TextExtractor
for supported
MediaType
's. Implementations of TextExtractor
can register for
the MIME type they support. The register can have only one associated
converter per MIME type.
Constructor Summary | |
---|---|
TextExtractorRegistry()
|
Method Summary | |
---|---|
static boolean |
contains(java.lang.String mimeType)
Checks if some TextExtractor for the given mimeType has been
registered. |
static TextExtractor |
get(java.io.File file)
Returns an instance of TextExtractor that supports the conversion
of the given file. |
static TextExtractor |
get(org.apache.tika.mime.MediaType mimeType)
Returns an instance of TextExtractor that supports the given
mimeType. |
static TextExtractor |
get(java.lang.String mimeType)
Returns an instance of TextExtractor that supports the given
mimeType. |
static void |
register(TextExtractor converter)
Registers a concrete TextExtractor for the MIME type it supports. |
static void |
unregister(TextExtractor converter)
Unregisters the instance of TextExtractor . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextExtractorRegistry()
Method Detail |
---|
public static final TextExtractor get(java.lang.String mimeType)
TextExtractor
that supports the given
mimeType.
mimeType
- The string of the MIME type to get a converter for
public static final TextExtractor get(org.apache.tika.mime.MediaType mimeType)
TextExtractor
that supports the given
mimeType.
mimeType
- The MIME type to get a converter for
public static final TextExtractor get(java.io.File file)
TextExtractor
that supports the conversion
of the given file. The MIME type of this file is detected
automatically with best attempt.
file
- A file to get the responsible converter for
public static final boolean contains(java.lang.String mimeType)
TextExtractor
for the given mimeType has been
registered.
mimeType
- The string of the MIME type to check
public static final void register(TextExtractor converter)
TextExtractor
for the MIME type it supports.
converter
- The converter instance to registerpublic static final void unregister(TextExtractor converter)
TextExtractor
.
converter
- The converter instance to remove from the register
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |