|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.search.documents.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, A_CmsIndexResource, String)
Field Summary | |
protected java.lang.String |
m_name
Name of the documenttype. |
static java.lang.String |
VFS_DOCUMENT_KEY_PREFIX
The vfs prefix for document keys. |
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 | |
A_CmsVfsDocument(java.lang.String name)
Creates a new instance of this lucene document factory. |
Method Summary | |
java.lang.String |
getDocumentKey(java.lang.String resourceType)
Returns the document key for the search manager. |
java.util.List |
getDocumentKeys(java.util.List resourceTypes,
java.util.List mimeTypes)
Returns a list of document keys for the documenttype. |
java.lang.String |
getName()
Returns the name of the documenttype. |
protected java.lang.String |
mergeMetaInfo(I_CmsExtractionResult extractedContent)
Returns a String created out of the content and the most important meta information in the given extraction result. |
org.apache.lucene.document.Document |
newInstance(CmsObject cms,
A_CmsIndexResource resource,
java.lang.String language)
Generates a new lucene document instance from contents of the given resource. |
protected CmsFile |
readFile(CmsObject cms,
CmsResource resource)
Upgrades the given resource to a CmsFile with content. |
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_CmsSearchExtractor |
extractContent |
Field Detail |
public static final java.lang.String VFS_DOCUMENT_KEY_PREFIX
protected java.lang.String m_name
Constructor Detail |
public A_CmsVfsDocument(java.lang.String name)
name
- name of the documenttypeMethod Detail |
public java.lang.String getDocumentKey(java.lang.String resourceType) throws CmsIndexException
I_CmsDocumentFactory
getDocumentKey
in interface I_CmsDocumentFactory
resourceType
- the resource type to get the document key for
CmsIndexException
I_CmsDocumentFactory.getDocumentKey(java.lang.String)
public java.util.List getDocumentKeys(java.util.List resourceTypes, java.util.List mimeTypes) throws CmsException
I_CmsDocumentFactory
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_CmsDocumentFactory
resourceTypes
- 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_CmsDocumentFactory
I_CmsDocumentFactory.getName()
public org.apache.lucene.document.Document newInstance(CmsObject cms, A_CmsIndexResource resource, java.lang.String language) throws CmsException
newInstance
in interface I_CmsDocumentFactory
cms
- the cms objectresource
- a cms resourcelanguage
- the requested language
CmsException
- if something goes wrongI_CmsDocumentFactory.newInstance(org.opencms.file.CmsObject, org.opencms.search.A_CmsIndexResource, java.lang.String)
protected java.lang.String mergeMetaInfo(I_CmsExtractionResult extractedContent)
OpenCms uses it's own properties for the text "Title" etc. field, this method ensures the most important document meta information can still be found as part of the content.
extractedContent
- the extraction result to merge
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 |