Package 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
-
-
Field Summary
-
Fields inherited from class org.opencms.search.documents.A_CmsVfsDocument
DEFAULT_ALL_TYPES, DEFAULT_ALL_UNCONFIGURED_TYPES, m_name
-
-
Constructor Summary
Constructors Constructor Description CmsDocumentGeneric(java.lang.String name)
Creates a new instance of this lucene document factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I_CmsExtractionResult
extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index)
Just returns an empty extraction result since the content can't be extracted form a generic resource.boolean
isLocaleDependend()
Returnstrue
if this document factory is locale depended.boolean
isUsingCache()
Returnstrue
if result caching is supported for this factory.-
Methods inherited from class org.opencms.search.documents.A_CmsVfsDocument
createDocument, getCache, getDocumentKey, getDocumentKeys, getName, logContentExtraction, readFile, setCache
-
-
-
-
Constructor Detail
-
CmsDocumentGeneric
public CmsDocumentGeneric(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, CmsResource resource, I_CmsSearchIndex index) throws CmsIndexException
Just returns an empty extraction result since the content can't be extracted form a generic resource.- Parameters:
cms
- the cms objectresource
- the resource to extract the content fromindex
- the index to extract the content for- Returns:
- the extracted content of the resource
- Throws:
CmsIndexException
- See Also:
I_CmsSearchExtractor.extractContent(CmsObject, CmsResource, I_CmsSearchIndex)
-
isLocaleDependend
public boolean isLocaleDependend()
Description copied from interface:I_CmsDocumentFactory
Returnstrue
if this document factory is locale depended.- Returns:
true
if this document factory is locale depended- See Also:
I_CmsDocumentFactory.isLocaleDependend()
-
isUsingCache
public boolean isUsingCache()
Description copied from interface:I_CmsDocumentFactory
Returnstrue
if result caching is supported for this factory.- Returns:
true
if result caching is supported for this factory- See Also:
I_CmsDocumentFactory.isUsingCache()
-
-