|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.search.documents.A_CmsVfsDocument
org.opencms.search.documents.CmsDocumentXmlContent
org.opencms.search.galleries.CmsGalleryDocumentXmlContent
public class CmsGalleryDocumentXmlContent
Special document text extraction factory for the gallery index that creates multiple fields for the content in all the languages available in an XML content.
Field Summary |
---|
Fields inherited from class org.opencms.search.documents.A_CmsVfsDocument |
---|
m_name |
Constructor Summary | |
---|---|
CmsGalleryDocumentXmlContent(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. |
I_CmsExtractionResult |
extractContent(CmsObject cms,
CmsResource resource,
CmsSearchIndex index)
Returns the raw text content of a given VFS resource of type CmsResourceTypeXmlContent . |
boolean |
isLocaleDependend()
Gallery index content is stored in multiple languages, so the result is NOT locale dependent. |
Methods inherited from class org.opencms.search.documents.CmsDocumentXmlContent |
---|
getDocumentKeys, isUsingCache |
Methods inherited from class org.opencms.search.documents.A_CmsVfsDocument |
---|
getCache, getDocumentKey, getName, logContentExtraction, readFile, setCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsGalleryDocumentXmlContent(String name)
name
- name of the document typeMethod Detail |
---|
public org.apache.lucene.document.Document createDocument(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsException
For gallery document generators, we never check for CmsSearchIndex.isExtractingContent()
since
all these classes are assumed to be written with optimizations special to gallery search indexing anyway.
createDocument
in interface I_CmsDocumentFactory
createDocument
in class A_CmsVfsDocument
cms
- 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 wrongCmsSearchFieldConfiguration.createDocument(CmsObject, CmsResource, CmsSearchIndex, I_CmsExtractionResult)
,
I_CmsDocumentFactory.createDocument(CmsObject, CmsResource, CmsSearchIndex)
public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsException
CmsResourceTypeXmlContent
.
All XML nodes from the content for all locales will be stored separately in the item map
which you can access using CmsExtractionResult.getContentItems()
. The XML elements will be
accessible using their xpath. The xpath will start with the locale and have the form like for example
de/Text[1]
or en/Nested[1]/Text[1]
.
extractContent
in interface I_CmsSearchExtractor
extractContent
in class CmsDocumentXmlContent
cms
- the cms objectresource
- the resource to extract the content fromindex
- the index to extract the content for
CmsException
- if somethin goes wrongI_CmsSearchExtractor.extractContent(CmsObject, CmsResource, CmsSearchIndex)
public boolean isLocaleDependend()
isLocaleDependend
in interface I_CmsDocumentFactory
isLocaleDependend
in class CmsDocumentXmlContent
true
if this document factory is locale dependedCmsDocumentXmlContent.isLocaleDependend()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |