|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tika.config.TikaConfig
public class TikaConfig
Parse xml config file.
Constructor Summary | |
---|---|
TikaConfig()
Creates a default Tika configuration. |
|
TikaConfig(ClassLoader loader)
Creates a Tika configuration from the built-in media type rules and all the Parser implementations available through the
service provider mechanism in the given
class loader. |
|
TikaConfig(Document document)
|
|
TikaConfig(Element element)
|
|
TikaConfig(Element element,
ClassLoader loader)
|
|
TikaConfig(File file)
|
|
TikaConfig(InputStream stream)
|
|
TikaConfig(String file)
|
|
TikaConfig(URL url)
|
|
TikaConfig(URL url,
ClassLoader loader)
|
Method Summary | |
---|---|
static TikaConfig |
getDefaultConfig()
Provides a default configuration (TikaConfig). |
Detector |
getDetector()
Returns the configured detector instance. |
MediaTypeRegistry |
getMediaTypeRegistry()
|
MimeTypes |
getMimeRepository()
|
Parser |
getParser()
Returns the configured parser instance. |
Parser |
getParser(MediaType mimeType)
Deprecated. Use the getParser() method instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TikaConfig(String file) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(File file) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(URL url) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(URL url, ClassLoader loader) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(InputStream stream) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(Document document) throws TikaException, IOException
TikaException
IOException
public TikaConfig(Element element) throws TikaException, IOException
TikaException
IOException
public TikaConfig(Element element, ClassLoader loader) throws TikaException, IOException
TikaException
IOException
public TikaConfig(ClassLoader loader) throws MimeTypeException, IOException
Parser
implementations available through the
service provider mechanism
in the given
class loader.
loader
- the class loader through which parser implementations
are loaded, or null
for no parsers
MimeTypeException
- if the built-in media type rules are broken
IOException
- if the built-in media type rules can not be readpublic TikaConfig() throws TikaException, IOException
If one of these have a value, try to resolve it relative to file system or classpath.
If XML config is not specified, initialize from the built-in media
type rules and all the Parser
implementations available through
the service provider mechanism
in the context
class loader of the current thread.
IOException
- if the configuration can not be read
TikaException
- if problem with MimeTypes or parsing XML configMethod Detail |
---|
public Parser getParser(MediaType mimeType)
getParser()
method instead
public Parser getParser()
public Detector getDetector()
public MimeTypes getMimeRepository()
public MediaTypeRegistry getMediaTypeRegistry()
public static TikaConfig getDefaultConfig()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |