public class CmsSolrDocumentXmlContent extends A_CmsVfsDocument
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MAPPING_GALLERY_DESCRIPTION
Mapping name used to indicate that the value should be used for the gallery description.
|
static java.lang.String |
MAPPING_GALLERY_NAME
Mapping name used to indicate that the value should be used for the gallery name.
|
static java.lang.String |
TYPE_XMLCONTENT_SOLR
The solr document type name for xml-contents.
|
m_name| Constructor and Description |
|---|
CmsSolrDocumentXmlContent(java.lang.String name)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
collectSchemaXpathsForSimpleValues(CmsObject cms,
CmsXmlContentDefinition def,
java.lang.String path,
java.util.Set<java.lang.String> result)
Collects a list of all possible XPaths for a content definition.
|
I_CmsExtractionResult |
extractContent(CmsObject cms,
CmsResource resource,
I_CmsSearchIndex index)
Extracts the content of a given index resource according to the resource file type and the
configuration of the given index.
|
static CmsExtractionResult |
extractXmlContent(CmsObject cms,
CmsResource resource,
I_CmsSearchIndex index)
Extracts the content of a single XML content resource.
|
static CmsExtractionResult |
extractXmlContent(CmsObject cms,
CmsResource resource,
I_CmsSearchIndex index,
java.util.Locale forceLocale)
Extracts the content of a single XML content resource.
|
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()
Solr index content is stored in multiple languages, so the result is NOT locale dependent.
|
boolean |
isUsingCache()
Returns
true if result caching is supported for this factory. |
createDocument, getCache, getDocumentKey, getName, logContentExtraction, readFile, setCachepublic static final java.lang.String MAPPING_GALLERY_DESCRIPTION
public static final java.lang.String MAPPING_GALLERY_NAME
public static final java.lang.String TYPE_XMLCONTENT_SOLR
public CmsSolrDocumentXmlContent(java.lang.String name)
name - the name for the document typepublic static void collectSchemaXpathsForSimpleValues(CmsObject cms, CmsXmlContentDefinition def, java.lang.String path, java.util.Set<java.lang.String> result)
cms - the CMS context to usedef - the content definitionpath - the path of the given content definitionresult - the set used to collect the XPathspublic static CmsExtractionResult extractXmlContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsException
cms - the cms contextresource - the resourceindex - the used indexCmsException - in case reading or unmarshalling the content failspublic static CmsExtractionResult extractXmlContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index, java.util.Locale forceLocale) throws CmsException
cms - the cms contextresource - the resourceindex - the used indexforceLocale - if set, only the content values for the given locale will be extractedCmsException - in case reading or unmarshalling the content failspublic I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsException
I_CmsSearchExtractorcms - 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.I_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 in interface I_CmsDocumentFactorygetDocumentKeys in class 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()
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()