public class CmsDocumentXmlContent extends A_CmsVfsDocument
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].
m_name| 构造器和说明 |
|---|
CmsDocumentXmlContent(java.lang.String name)
Creates a new instance of this lucene document factory.
|
| 限定符和类型 | 方法和说明 |
|---|---|
I_CmsSearchDocument |
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. |
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.
|
boolean |
isLocaleDependend()
Returns
true if this document factory is locale depended. |
boolean |
isUsingCache()
Returns
true if result caching is supported for this factory. |
getCache, getDocumentKey, getName, logContentExtraction, readFile, setCachepublic CmsDocumentXmlContent(java.lang.String name)
name - name of the document typepublic I_CmsSearchDocument createDocument(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsException
A_CmsVfsDocumentcreateDocument 在接口中 I_CmsDocumentFactorycreateDocument 在类中 A_CmsVfsDocumentcms - 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 forCmsException - if something goes wrongA_CmsVfsDocument.createDocument(org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.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 have the form like for example
Text[1] or Nested[1]/Text[1].
cms - the cms objectresource - the resource to extract the content fromindex - the index to extract the content forCmsException - if something goes wrongI_CmsSearchExtractor.extractContent(CmsObject, CmsResource, CmsSearchIndex)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 A_CmsVfsDocument.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 在接口中 I_CmsDocumentFactorygetDocumentKeys 在类中 A_CmsVfsDocumentresourceTypes - list of accepted resource typesmimeTypes - list of accepted mime typesCmsException - if something goes wrongI_CmsDocumentFactory.getDocumentKeys(java.util.List, java.util.List)public boolean isLocaleDependend()
I_CmsDocumentFactorytrue if this document factory is locale depended.true if this document factory is locale dependedI_CmsDocumentFactory.isLocaleDependend()public boolean isUsingCache()
I_CmsDocumentFactorytrue if result caching is supported for this factory.true if result caching is supported for this factoryI_CmsDocumentFactory.isUsingCache()