org.apache.tika.config
Class TikaConfig

java.lang.Object
  extended by org.apache.tika.config.TikaConfig

public class TikaConfig
extends java.lang.Object

Parse xml config file.


Field Summary
static java.lang.String DEFAULT_CONFIG_LOCATION
           
 
Constructor Summary
TikaConfig(org.w3c.dom.Document document)
           
TikaConfig(org.w3c.dom.Document document, Parser delegate)
          Deprecated. This method will be removed in Apache Tika 1.0
TikaConfig(org.w3c.dom.Element element)
           
TikaConfig(org.w3c.dom.Element element, Parser delegate)
          Deprecated. This method will be removed in Apache Tika 1.0
TikaConfig(java.io.File file)
           
TikaConfig(java.io.InputStream stream)
           
TikaConfig(java.io.InputStream stream, Parser delegate)
          Deprecated. This method will be removed in Apache Tika 1.0
TikaConfig(java.lang.String file)
           
TikaConfig(java.net.URL url)
           
 
Method Summary
static TikaConfig getDefaultConfig()
          Provides a default configuration (TikaConfig).
static TikaConfig getDefaultConfig(Parser delegate)
          Deprecated. This method will be removed in Apache Tika 1.0
 MimeTypes getMimeRepository()
           
 Parser getParser(java.lang.String mimeType)
          Returns the parser instance configured for the given MIME type.
 java.util.Map<java.lang.String,Parser> getParsers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIG_LOCATION

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

TikaConfig

public TikaConfig(java.lang.String file)
           throws TikaException,
                  java.io.IOException,
                  org.xml.sax.SAXException
Throws:
TikaException
java.io.IOException
org.xml.sax.SAXException

TikaConfig

public TikaConfig(java.io.File file)
           throws TikaException,
                  java.io.IOException,
                  org.xml.sax.SAXException
Throws:
TikaException
java.io.IOException
org.xml.sax.SAXException

TikaConfig

public TikaConfig(java.net.URL url)
           throws TikaException,
                  java.io.IOException,
                  org.xml.sax.SAXException
Throws:
TikaException
java.io.IOException
org.xml.sax.SAXException

TikaConfig

public TikaConfig(java.io.InputStream stream)
           throws TikaException,
                  java.io.IOException,
                  org.xml.sax.SAXException
Throws:
TikaException
java.io.IOException
org.xml.sax.SAXException

TikaConfig

public TikaConfig(java.io.InputStream stream,
                  Parser delegate)
           throws TikaException,
                  java.io.IOException,
                  org.xml.sax.SAXException
Deprecated. This method will be removed in Apache Tika 1.0

Throws:
TikaException
java.io.IOException
org.xml.sax.SAXException
See Also:
TIKA-275

TikaConfig

public TikaConfig(org.w3c.dom.Document document)
           throws TikaException,
                  java.io.IOException
Throws:
TikaException
java.io.IOException

TikaConfig

public TikaConfig(org.w3c.dom.Document document,
                  Parser delegate)
           throws TikaException,
                  java.io.IOException
Deprecated. This method will be removed in Apache Tika 1.0

Throws:
TikaException
java.io.IOException
See Also:
TIKA-275

TikaConfig

public TikaConfig(org.w3c.dom.Element element)
           throws TikaException,
                  java.io.IOException
Throws:
TikaException
java.io.IOException

TikaConfig

public TikaConfig(org.w3c.dom.Element element,
                  Parser delegate)
           throws TikaException,
                  java.io.IOException
Deprecated. This method will be removed in Apache Tika 1.0

Throws:
TikaException
java.io.IOException
See Also:
TIKA-275
Method Detail

getParser

public Parser getParser(java.lang.String mimeType)
Returns the parser instance configured for the given MIME type. Returns null if the given MIME type is unknown.

Parameters:
mimeType - MIME type
Returns:
configured Parser instance, or null

getParsers

public java.util.Map<java.lang.String,Parser> getParsers()

getMimeRepository

public MimeTypes getMimeRepository()

getDefaultConfig

public static TikaConfig getDefaultConfig()
Provides a default configuration (TikaConfig). Currently creates a new instance each time it's called; we may be able to have it return a shared instance once it is completely immutable.

Returns:
default configuration

getDefaultConfig

public static TikaConfig getDefaultConfig(Parser delegate)
                                   throws TikaException
Deprecated. This method will be removed in Apache Tika 1.0

Throws:
TikaException
See Also:
TIKA-275


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.