public class CmsExtractionResult extends java.lang.Object implements I_CmsExtractionResult, java.io.Serializable
This data structure contains the extracted text as well as (optional) meta information extracted from the document.
ITEM_AUTHOR, ITEM_CATEGORY, ITEM_COMMENTS, ITEM_COMPANY, ITEM_CONTENT, ITEM_CREATOR, ITEM_KEYWORDS, ITEM_MANAGER, ITEM_PRODUCER, ITEM_RAW, ITEM_SUBJECT, ITEM_TITLE| 构造器和说明 |
|---|
CmsExtractionResult(java.lang.String content)
Creates a new extraction 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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
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 itemspublic static final CmsExtractionResult fromBytes(byte[] bytes)
bytes - the serialized version of the extraction resultpublic byte[] getBytes()
I_CmsExtractionResultgetBytes 在接口中 I_CmsExtractionResultI_CmsExtractionResult.getBytes()public java.lang.String getContent()
I_CmsExtractionResultgetContent 在接口中 I_CmsExtractionResultI_CmsExtractionResult.getContent()public java.util.Map<java.lang.String,java.lang.String> getContentItems()
I_CmsExtractionResultThe 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 在接口中 I_CmsExtractionResultI_CmsExtractionResult.getContentItems()public void release()
I_CmsExtractionResultrelease 在接口中 I_CmsExtractionResultI_CmsExtractionResult.release()