org.opencms.search.extractors
Class CmsExtractionResult

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

public class CmsExtractionResult
extends java.lang.Object
implements I_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.

Since:
6.0.0
Version:
$Revision: 1.5 $
Author:
Alexander Kandzior

Field Summary
 
Fields inherited from interface org.opencms.search.extractors.I_CmsExtractionResult
META_AUTHOR, META_CATEGORY, META_COMMENTS, META_COMPANY, META_CREATOR, META_DATE_CREATED, META_DATE_LASTMODIFIED, META_KEYWORDS, META_MANAGER, META_PRODUCER, META_SUBJECT, META_TITLE
 
Constructor Summary
CmsExtractionResult(java.lang.String content)
          Creates a new extration result without meta information.
CmsExtractionResult(java.lang.String content, java.util.Map metaInfo)
          Creates a new extration result.
 
Method Summary
 java.lang.String getContent()
          Returns the extracted content as a String.
 java.util.Map getMetaInfo()
          Returns the extracted meta information.
 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.

Parameters:
content - the extracted content

CmsExtractionResult

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

Parameters:
content - the extracted content
metaInfo - the extracted documnet meta information
Method Detail

getContent

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

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

getMetaInfo

public java.util.Map getMetaInfo()
Description copied from interface: I_CmsExtractionResult
Returns the extracted meta information.

The result Map contains all meta information extracted by the extractor. The key is always a String, and should be one of the constants defined in the I_CmsExtractionResult interface. For example I_CmsExtractionResult.META_TITLE will contain the document title as a String.

Specified by:
getMetaInfo in interface I_CmsExtractionResult
Returns:
the extracted meta information
See Also:
I_CmsExtractionResult.getMetaInfo()

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()