org.opencms.search.documents
Class CmsDocumentXmlContent

java.lang.Object
  extended byorg.opencms.search.documents.A_CmsVfsDocument
      extended byorg.opencms.search.documents.CmsDocumentXmlContent
All Implemented Interfaces:
I_CmsDocumentFactory, I_CmsSearchExtractor

public class CmsDocumentXmlContent
extends A_CmsVfsDocument

Lucene document factory class to extract index data from a cms resource of type CmsResourceTypeXmlContent.

Since:
6.0.0
Version:
$Revision: 1.8 $
Author:
Carsten Weinholz

Field Summary
 
Fields inherited from class org.opencms.search.documents.A_CmsVfsDocument
m_name, VFS_DOCUMENT_KEY_PREFIX
 
Fields inherited from interface org.opencms.search.documents.I_CmsDocumentFactory
DOC_CATEGORY, DOC_CONTENT, DOC_DATE_CREATED, DOC_DATE_LASTMODIFIED, DOC_DESCRIPTION, DOC_KEYWORDS, DOC_META, DOC_PATH, DOC_PRIORITY, DOC_ROOT, DOC_TITLE_INDEXED, DOC_TITLE_KEY, DOC_TYPE, SEARCH_PRIORITY_HIGH_VALUE, SEARCH_PRIORITY_LOW_VALUE, SEARCH_PRIORITY_MAX_VALUE, SEARCH_PRIORITY_NORMAL_VALUE
 
Constructor Summary
CmsDocumentXmlContent(java.lang.String name)
          Creates a new instance of this lucene document factory.
 
Method Summary
 I_CmsExtractionResult extractContent(CmsObject cms, A_CmsIndexResource indexResource, java.lang.String language)
          Returns the raw text content of a given vfs resource of type CmsResourceTypeXmlContent.
 java.util.List getDocumentKeys(java.util.List resourceTypes, java.util.List mimeTypes)
          Returns a list of document keys for the documenttype.
 
Methods inherited from class org.opencms.search.documents.A_CmsVfsDocument
getDocumentKey, getName, mergeMetaInfo, newInstance, readFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsDocumentXmlContent

public CmsDocumentXmlContent(java.lang.String name)
Creates a new instance of this lucene document factory.

Parameters:
name - name of the documenttype
Method Detail

extractContent

public I_CmsExtractionResult extractContent(CmsObject cms,
                                            A_CmsIndexResource indexResource,
                                            java.lang.String language)
                                     throws CmsException
Returns the raw text content of a given vfs resource of type CmsResourceTypeXmlContent.

Parameters:
cms - the cms object
indexResource - a cms resource
language - the requested language
Returns:
the extracted content of the resource
Throws:
CmsException - if somethin goes wrong
See Also:
I_CmsSearchExtractor.extractContent(org.opencms.file.CmsObject, org.opencms.search.A_CmsIndexResource, java.lang.String)

getDocumentKeys

public java.util.List getDocumentKeys(java.util.List resourceTypes,
                                      java.util.List mimeTypes)
                               throws CmsException
Description copied from interface: I_CmsDocumentFactory
Returns a list of document keys for the documenttype.

The list of accepted resource types may contain a catch-all entry "*"; in this case, a list for all possible resource types is returned, calculated by a logic depending on the document handler class.

Specified by:
getDocumentKeys in interface I_CmsDocumentFactory
Overrides:
getDocumentKeys in class A_CmsVfsDocument
Throws:
CmsException
See Also:
I_CmsDocumentFactory.getDocumentKeys(java.util.List, java.util.List)