org.opencms.search.extractors
Class CmsExtractionResult

java.lang.Object
  extended byorg.opencms.search.extractors.CmsExtractionResult
All Implemented Interfaces:
I_CmsExtractionResult, java.io.Serializable

public class CmsExtractionResult
extends java.lang.Object
implements I_CmsExtractionResult, java.io.Serializable

The result of a document text extraction.

This data structure contains the extracted text as well as (optional) meta information extracted from the document.

Since:
6.0.0
Version:
$Revision: 1.8 $
Author:
Alexander Kandzior
See Also:
Serialized Form

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 contentItems)
          Creates a new extration result.
 
Method Summary
 java.lang.String getContent()
          Returns the extracted content combined as a String.
 java.util.Map 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

CmsExtractionResult

public CmsExtractionResult(java.lang.String content)
Creates a new extration result without meta information and without additional fields.

Parameters:
content - the extracted content

CmsExtractionResult

public CmsExtractionResult(java.lang.String content,
                           java.util.Map contentItems)
Creates a new extration result.

Parameters:
content - the extracted content
contentItems - the individual extracted content items
Method Detail

getContent

public java.lang.String getContent()
Description copied from interface: I_CmsExtractionResult
Returns the extracted content combined as a String.

Specified by:
getContent in interface I_CmsExtractionResult
Returns:
the extracted content combined as a String
See Also:
I_CmsExtractionResult.getContent()

getContentItems

public java.util.Map getContentItems()
Description copied from interface: I_CmsExtractionResult
Returns the extracted content as individual items.

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:

Specified by:
getContentItems in interface I_CmsExtractionResult
Returns:
the extracted content as individual items
See Also:
I_CmsExtractionResult.getContentItems()

release

public void release()
Description copied from interface: I_CmsExtractionResult
Releases the information stored in this extraction result, to free up the memory used.

Specified by:
release in interface I_CmsExtractionResult
See Also:
I_CmsExtractionResult.release()