public class TikaConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected static AtomicInteger |
TIMES_INSTANTIATED |
Constructor and Description |
---|
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(Document document,
ServiceLoader loader) |
TikaConfig(Element element) |
TikaConfig(Element element,
ClassLoader loader) |
TikaConfig(File file) |
TikaConfig(File file,
ServiceLoader loader) |
TikaConfig(InputStream stream) |
TikaConfig(Path path) |
TikaConfig(Path path,
ServiceLoader loader) |
TikaConfig(String file) |
TikaConfig(URL url) |
TikaConfig(URL url,
ClassLoader loader) |
TikaConfig(URL url,
ServiceLoader loader) |
protected static final AtomicInteger TIMES_INSTANTIATED
public TikaConfig(String file) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(Path path) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(Path path, ServiceLoader loader) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(File file) throws TikaException, IOException, SAXException
TikaException
IOException
SAXException
public TikaConfig(File file, ServiceLoader loader) 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(URL url, ServiceLoader 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(Document document, ServiceLoader loader) 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 parsersMimeTypeException
- if the built-in media type rules are brokenIOException
- 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 readTikaException
- if problem with MimeTypes or parsing XML configprotected static CompositeDetector getDefaultDetector(MimeTypes types, ServiceLoader loader)
protected static CompositeEncodingDetector getDefaultEncodingDetector(ServiceLoader loader)
protected static CompositeRenderer getDefaultRenderer(ServiceLoader loader)
public static TikaConfig getDefaultConfig()
public static void mustNotBeEmpty(String paramName, String paramValue) throws TikaConfigException
TikaConfigException
public static void mustNotBeEmpty(String paramName, Path paramValue) throws TikaConfigException
TikaConfigException
public Parser getParser(MediaType mimeType)
getParser()
method insteadpublic Parser getParser()
public Detector getDetector()
public EncodingDetector getEncodingDetector()
public Translator getTranslator()
public ExecutorService getExecutorService()
public MimeTypes getMimeRepository()
public MediaTypeRegistry getMediaTypeRegistry()
public ServiceLoader getServiceLoader()
public MetadataFilter getMetadataFilter()
public AutoDetectParserConfig getAutoDetectParserConfig()
Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.