|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.opencms.search.documents.A_CmsVfsDocument
public abstract class A_CmsVfsDocument
Base document factory class for a VFS ,
just requires a specialized implementation of
CmsResource
for text extraction from the binary document content.I_CmsSearchExtractor.extractContent(CmsObject, CmsResource, CmsSearchIndex)
| Field Summary | |
|---|---|
protected java.lang.String |
m_name
Name of the documenttype. |
static java.lang.String |
SEARCH_PRIORITY_HIGH_VALUE
Deprecated. use CmsSearchFieldConfiguration.SEARCH_PRIORITY_HIGH_VALUE instead |
static java.lang.String |
SEARCH_PRIORITY_LOW_VALUE
Deprecated. use CmsSearchFieldConfiguration.SEARCH_PRIORITY_LOW_VALUE instead |
static java.lang.String |
SEARCH_PRIORITY_MAX_VALUE
Deprecated. use CmsSearchFieldConfiguration.SEARCH_PRIORITY_MAX_VALUE instead |
static java.lang.String |
SEARCH_PRIORITY_NORMAL_VALUE
Deprecated. use CmsSearchFieldConfiguration.SEARCH_PRIORITY_NORMAL_VALUE instead |
static java.lang.String |
VFS_DOCUMENT_KEY_PREFIX
Deprecated. use CmsSearchFieldConfiguration.VFS_DOCUMENT_KEY_PREFIX instead |
| Constructor Summary | |
|---|---|
A_CmsVfsDocument(java.lang.String name)
Creates a new instance of this lucene document factory. |
|
| Method Summary | |
|---|---|
org.apache.lucene.document.Document |
createDocument(CmsObject cms,
CmsResource resource,
CmsSearchIndex index)
Generates a new lucene document instance from contents of the given resource for the provided index. |
CmsExtractionResultCache |
getCache()
Returns the disk based cache used to store the raw extraction results. |
static java.lang.String |
getDocumentKey(java.lang.String type,
java.lang.String mimeType)
Creates a document factory lookup key for the given resource type name / MIME type configuration. |
java.util.List<java.lang.String> |
getDocumentKeys(java.util.List<java.lang.String> resourceTypes,
java.util.List<java.lang.String> mimeTypes)
Returns the list of accepted keys for the resource types that can be indexed using this document factory. |
java.lang.String |
getName()
Returns the name of this document type factory. |
protected CmsFile |
readFile(CmsObject cms,
CmsResource resource)
Upgrades the given resource to a CmsFile with content. |
void |
setCache(CmsExtractionResultCache cache)
Sets the disk based cache used to store the raw extraction results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opencms.search.documents.I_CmsDocumentFactory |
|---|
isLocaleDependend, isUsingCache |
| Methods inherited from interface org.opencms.search.documents.I_CmsSearchExtractor |
|---|
extractContent |
| Field Detail |
|---|
public static final java.lang.String SEARCH_PRIORITY_HIGH_VALUE
CmsSearchFieldConfiguration.SEARCH_PRIORITY_HIGH_VALUE instead
public static final java.lang.String SEARCH_PRIORITY_LOW_VALUE
CmsSearchFieldConfiguration.SEARCH_PRIORITY_LOW_VALUE instead
public static final java.lang.String SEARCH_PRIORITY_MAX_VALUE
CmsSearchFieldConfiguration.SEARCH_PRIORITY_MAX_VALUE instead
public static final java.lang.String SEARCH_PRIORITY_NORMAL_VALUE
CmsSearchFieldConfiguration.SEARCH_PRIORITY_NORMAL_VALUE instead
public static final java.lang.String VFS_DOCUMENT_KEY_PREFIX
CmsSearchFieldConfiguration.VFS_DOCUMENT_KEY_PREFIX instead
protected java.lang.String m_name
| Constructor Detail |
|---|
public A_CmsVfsDocument(java.lang.String name)
name - name of the documenttype| Method Detail |
|---|
public static java.lang.String getDocumentKey(java.lang.String type,
java.lang.String mimeType)
If the given mimeType is null, this indicates that the key should
match all VFS resource of the given resource type regardless of the MIME type.
type - the resource type name to usemimeType - the MIME type to use
public org.apache.lucene.document.Document createDocument(CmsObject cms,
CmsResource resource,
CmsSearchIndex index)
throws CmsException
createDocument in interface I_CmsDocumentFactorycms - the OpenCms user context used to access the OpenCms VFSresource - the search index resource to create the Lucene document fromindex - the search index to create the Document for
CmsException - if something goes wrongI_CmsDocumentFactory.createDocument(CmsObject, CmsResource, CmsSearchIndex),
CmsSearchFieldConfiguration.createDocument(CmsObject, CmsResource, CmsSearchIndex, I_CmsExtractionResult)public CmsExtractionResultCache getCache()
I_CmsDocumentFactory
In case null is returned, then result caching is not supported for this factory.
getCache in interface I_CmsDocumentFactoryI_CmsDocumentFactory.getCache()
public java.util.List<java.lang.String> getDocumentKeys(java.util.List<java.lang.String> resourceTypes,
java.util.List<java.lang.String> mimeTypes)
throws CmsException
I_CmsDocumentFactory
The result List contains String objects.
This String is later matched against getDocumentKey(String, String) to find
the corrospondig I_CmsDocumentFactory for a resource to index.
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.
getDocumentKeys in interface I_CmsDocumentFactoryresourceTypes - list of accepted resource typesmimeTypes - list of accepted mime types
CmsException - if something goes wrongI_CmsDocumentFactory.getDocumentKeys(java.util.List, java.util.List)public java.lang.String getName()
I_CmsDocumentFactory
getName in interface I_CmsDocumentFactoryI_CmsDocumentFactory.getName()public void setCache(CmsExtractionResultCache cache)
I_CmsDocumentFactory
This should only be used for factories where I_CmsDocumentFactory.isUsingCache() returns true.
setCache in interface I_CmsDocumentFactorycache - the disk based cache used to store the raw extraction resultsI_CmsDocumentFactory.setCache(org.opencms.search.documents.CmsExtractionResultCache)
protected CmsFile readFile(CmsObject cms,
CmsResource resource)
throws CmsException,
CmsIndexException
CmsFile with content.
cms - the current users OpenCms contextresource - the resource to upgrade
CmsFile with content
CmsException - if the resource could not be read
CmsIndexException - if the resource has no content
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||