|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.search.extractors.CmsExtractionResult
public class CmsExtractionResult
The result of a document text extraction.
This data structure contains the extracted text as well as (optional) meta information extracted from the document.
Field Summary |
---|
Fields inherited from interface org.opencms.search.extractors.I_CmsExtractionResult |
---|
ITEM_AUTHOR, ITEM_CATEGORY, ITEM_COMMENTS, ITEM_COMPANY, ITEM_CONTENT, ITEM_CREATOR, ITEM_KEYWORDS, ITEM_MANAGER, ITEM_PRODUCER, ITEM_RAW, ITEM_SUBJECT, ITEM_TITLE |
Constructor Summary | |
---|---|
CmsExtractionResult(java.lang.String content)
Creates a new extration result without meta information and without additional fields. |
|
CmsExtractionResult(java.lang.String content,
java.util.Map<java.lang.String,java.lang.String> contentItems)
Creates a new extraction result. |
Method Summary | |
---|---|
static CmsExtractionResult |
fromBytes(byte[] bytes)
Creates an extraction result from a serialized byte array. |
byte[] |
getBytes()
Returns this extraction result serialized as a byte array. |
java.lang.String |
getContent()
Returns the extracted content combined as a String. |
java.util.Map<java.lang.String,java.lang.String> |
getContentItems()
Returns the extracted content as individual items. |
void |
release()
Releases the information stored in this extraction result, to free up the memory used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsExtractionResult(java.lang.String content)
content
- the extracted contentpublic CmsExtractionResult(java.lang.String content, java.util.Map<java.lang.String,java.lang.String> contentItems)
content
- the extracted contentcontentItems
- the individual extracted content itemsMethod Detail |
---|
public static final CmsExtractionResult fromBytes(byte[] bytes)
bytes
- the serialized version of the extraction result
public byte[] getBytes()
I_CmsExtractionResult
getBytes
in interface I_CmsExtractionResult
I_CmsExtractionResult.getBytes()
public java.lang.String getContent()
I_CmsExtractionResult
getContent
in interface I_CmsExtractionResult
I_CmsExtractionResult.getContent()
public java.util.Map<java.lang.String,java.lang.String> getContentItems()
I_CmsExtractionResult
The result Map contains all content items extracted by the extractor. The key is always a String, and contains the name of the item. The value is also a String and contains the extracted text.
The detailed form will depend on the resource type indexed:
xmlpage
, the key will be the element name, and the value
will be the text of the element.
xmlcontent
, the key will be the xpath of the XML node,
and the value will be the text of that XML node.
I_CmsExtractionResult.ITEM_CONTENT
,
which will contain the value of the complete content.
getContentItems
in interface I_CmsExtractionResult
I_CmsExtractionResult.getContentItems()
public void release()
I_CmsExtractionResult
release
in interface I_CmsExtractionResult
I_CmsExtractionResult.release()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |