org.opencms.search.documents
Class CmsDocumentGeneric
java.lang.Object
org.opencms.search.documents.A_CmsVfsDocument
org.opencms.search.documents.CmsDocumentGeneric
- All Implemented Interfaces:
- I_CmsDocumentFactory, I_CmsSearchExtractor
- public class CmsDocumentGeneric
- extends A_CmsVfsDocument
Lucene document factory class for indexing data from a generic CmsResource
.
Since the document type is generic, no content extraction is performed for the resource.
However, meta data from the properties and attributes of the resource are indexed.
The class is useful for example to have images appear in the search result if the title of the image
matched the search query. It's also used if no specific extraction method is available for a binary document type.
- Since:
- 6.0.0
- Version:
- $Revision: 1.7 $
- Author:
- Alexander Kandzior
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 |
CmsDocumentGeneric(java.lang.String name)
Creates a new instance of this lucene document factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CmsDocumentGeneric
public CmsDocumentGeneric(java.lang.String name)
- Creates a new instance of this lucene document factory.
- Parameters:
name
- name of the documenttype
extractContent
public I_CmsExtractionResult extractContent(CmsObject cms,
A_CmsIndexResource resource,
java.lang.String language)
throws CmsIndexException
- Just returns an empty extraction result since the content can't be extracted form a generic resource.
- Parameters:
cms
- the cms objectresource
- a cms resourcelanguage
- the requested language
- Returns:
- the extracted content of the resource
- Throws:
CmsIndexException
- See Also:
I_CmsSearchExtractor.extractContent(org.opencms.file.CmsObject, org.opencms.search.A_CmsIndexResource, java.lang.String)