public class CmsSolrDocumentXmlContent extends CmsDocumentXmlContent
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
TYPE_XMLCONTENT_SOLR
The solr document type name for xml-contents.
|
m_name
构造器和说明 |
---|
CmsSolrDocumentXmlContent(java.lang.String name)
Public constructor.
|
限定符和类型 | 方法和说明 |
---|---|
I_CmsExtractionResult |
extractContent(CmsObject cms,
CmsResource resource,
CmsSearchIndex index)
Returns the raw text content of a given VFS resource of type
CmsResourceTypeXmlContent . |
createDocument, getDocumentKeys, isLocaleDependend, isUsingCache
getCache, getDocumentKey, getName, logContentExtraction, readFile, setCache
public static final java.lang.String TYPE_XMLCONTENT_SOLR
public CmsSolrDocumentXmlContent(java.lang.String name)
name
- the name for the document typepublic I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsException
CmsDocumentXmlContent
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 have the form like for example
Text[1]
or Nested[1]/Text[1]
.
extractContent
在接口中 I_CmsSearchExtractor
extractContent
在类中 CmsDocumentXmlContent
cms
- the cms objectresource
- the resource to extract the content fromindex
- the index to extract the content forCmsException
- if something goes wrongCmsDocumentXmlContent.extractContent(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.CmsSearchIndex)