org.opencms.search.extractors
Class CmsExtractionResult

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

public class CmsExtractionResult
extends 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.4 $
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(String content)
          Creates a new extration result without meta information.
CmsExtractionResult(String content, Map metaInfo)
          Creates a new extration result.
 
Method Summary
 String getContent()
          Returns the extracted content as a String.
 Map getMetaInfo()
          Returns the extracted meta information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsExtractionResult

public CmsExtractionResult(String content)
Creates a new extration result without meta information.

Parameters:
content - the extracted content

CmsExtractionResult

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

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

getContent

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