public class CmsDocumentGeneric extends A_CmsVfsDocument
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.
m_name
构造器和说明 |
---|
CmsDocumentGeneric(java.lang.String name)
Creates a new instance of this lucene document factory.
|
限定符和类型 | 方法和说明 |
---|---|
I_CmsExtractionResult |
extractContent(CmsObject cms,
CmsResource resource,
CmsSearchIndex index)
Just returns an empty extraction result since the content can't be extracted form a generic resource.
|
boolean |
isLocaleDependend()
Returns
true if this document factory is locale depended. |
boolean |
isUsingCache()
Returns
true if result caching is supported for this factory. |
createDocument, getCache, getDocumentKey, getDocumentKeys, getName, logContentExtraction, readFile, setCache
public CmsDocumentGeneric(java.lang.String name)
name
- name of the documenttypepublic I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsIndexException
cms
- the cms objectresource
- the resource to extract the content fromindex
- the index to extract the content forCmsIndexException
I_CmsSearchExtractor.extractContent(CmsObject, CmsResource, CmsSearchIndex)
public boolean isLocaleDependend()
I_CmsDocumentFactory
true
if this document factory is locale depended.true
if this document factory is locale dependedI_CmsDocumentFactory.isLocaleDependend()
public boolean isUsingCache()
I_CmsDocumentFactory
true
if result caching is supported for this factory.true
if result caching is supported for this factoryI_CmsDocumentFactory.isUsingCache()