org.apache.tika.parser
Class ParseContext
java.lang.Object
org.apache.tika.parser.ParseContext
- All Implemented Interfaces:
- java.io.Serializable
public class ParseContext
- extends java.lang.Object
- implements java.io.Serializable
Parse context. Used to pass context information to Tika parsers.
- Since:
- Apache Tika 0.5
- See Also:
- TIKA-275,
Serialized Form
Method Summary |
|
get(java.lang.Class<T> key)
|
|
get(java.lang.Class<T> key,
T defaultValue)
|
javax.xml.parsers.SAXParser |
getSAXParser()
Returns the SAX parser specified in this parsing context. |
javax.xml.parsers.SAXParserFactory |
getSAXParserFactory()
Returns the SAX parser factory specified in this parsing context. |
|
set(java.lang.Class<T> key,
T value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseContext
public ParseContext()
set
public <T> void set(java.lang.Class<T> key,
T value)
get
public <T> T get(java.lang.Class<T> key)
get
public <T> T get(java.lang.Class<T> key,
T defaultValue)
getSAXParser
public javax.xml.parsers.SAXParser getSAXParser()
throws TikaException
- Returns the SAX parser specified in this parsing context. If a parser
is not explicitly specified, then one is created using the specified
or the default SAX parser factory.
- Returns:
- SAX parser
- Throws:
TikaException
- if a SAX parser could not be created- Since:
- Apache Tika 0.8
- See Also:
getSAXParserFactory()
getSAXParserFactory
public javax.xml.parsers.SAXParserFactory getSAXParserFactory()
- Returns the SAX parser factory specified in this parsing context.
If a factory is not explicitly specified, then a default factory
instance is created and returned. The default factory instance is
configured to be namespace-aware and to use
secure XML processing
.
- Returns:
- SAX parser factory
- Since:
- Apache Tika 0.8
Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.