|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.CharacterRepresentation
org.restlet.representation.WriterRepresentation
org.restlet.ext.xml.XmlRepresentation
org.restlet.ext.xml.SaxRepresentation
org.restlet.ext.lucene.TikaRepresentation
public class TikaRepresentation
Representation that parses another wrapped representation using Lucene Tika metadata extraction engine. Tika can be configured to indicates a specific parser to used, otherwise a special auto-detect parser is used. Tike metadata can also be customized if wanted.
| Field Summary |
|---|
| Fields inherited from class org.restlet.representation.Representation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
TikaRepresentation(Representation representation)
Constructor. |
|
TikaRepresentation(Representation representation,
TikaConfig tikaConfig)
Constructor. |
|
TikaRepresentation(Representation representation,
TikaConfig tikaConfig,
Parser tikaParser)
Constructor. |
|
| Method Summary | |
|---|---|
Metadata |
getMetadata()
Returns the Tika metadata used for both input and output. |
TikaConfig |
getTikaConfig()
Returns the optional Tika configuration. |
Parser |
getTikaParser()
Returns the optional Tika parser. |
void |
parse(ContentHandler contentHandler)
Parsed the wrapped representation with Tika to extract the useful metadata and produce structural SAX events (in XHTML format) and send them to the given SAX content handler. |
void |
setMetadata(Metadata metadata)
The Tika metadata used for both input and output. |
void |
setTikaConfig(TikaConfig tikaConfig)
Sets the optional Tika configuration. |
void |
setTikaParser(Parser tikaParser)
Sets the optional Tika parser. |
| Methods inherited from class org.restlet.ext.xml.SaxRepresentation |
|---|
getInputSource, getSaxSource, isSecureProcessing, release, setSaxSource, setSecureProcessing, write, write |
| Methods inherited from class org.restlet.representation.WriterRepresentation |
|---|
getReader |
| Methods inherited from class org.restlet.representation.CharacterRepresentation |
|---|
getChannel, getStream, write, write |
| Methods inherited from class org.restlet.representation.Representation |
|---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient |
| Methods inherited from class org.restlet.representation.RepresentationInfo |
|---|
getModificationDate, getTag, setModificationDate, setTag |
| Methods inherited from class org.restlet.representation.Variant |
|---|
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TikaRepresentation(Representation representation)
representation - The wrapped representation to analyze.
public TikaRepresentation(Representation representation,
TikaConfig tikaConfig)
representation - The wrapped representation to analyze.tikaConfig - The optional Tika configuration.
public TikaRepresentation(Representation representation,
TikaConfig tikaConfig,
Parser tikaParser)
representation - The wrapped representation to analyze.tikaConfig - The optional Tika configuration.tikaParser - The optional Tika parser.| Method Detail |
|---|
public Metadata getMetadata()
public TikaConfig getTikaConfig()
public Parser getTikaParser()
public void parse(ContentHandler contentHandler)
throws IOException
parse in class SaxRepresentationcontentHandler - The target SAX handler.
IOExceptionpublic void setMetadata(Metadata metadata)
metadata - The Tika metadata.public void setTikaConfig(TikaConfig tikaConfig)
tikaConfig - The Tika configuration.public void setTikaParser(Parser tikaParser)
tikaParser - The Tika parser.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||