public class BaseXPathDocumentSubprocessor extends Object implements IDocumentSubprocessor
Constructor and Description |
---|
BaseXPathDocumentSubprocessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProcess(String formatId)
Returns true if subprocessor should be run against object
|
List<ISolrField> |
getFieldList() |
List<String> |
getMatchDocuments() |
void |
initExpression(XPath xpathObject) |
SolrDoc |
mergeWithIndexedDocument(SolrDoc indexDocument) |
Map<String,SolrDoc> |
processDocument(String identifier,
Map<String,SolrDoc> docs,
InputStream is)
Default functionality is to process fields like XPathDocumentProcessor
and add fields to Solr Document This method maybe overridden to add
functionality such as retrieving and updating existing documents in the
index.
|
void |
setFieldList(List<ISolrField> fieldList) |
void |
setMatchDocuments(List<String> matchDocuments) |
static void |
setXmlNamespaceConfig(XMLNamespaceConfig xmlNamespaceConfig) |
public Map<String,SolrDoc> processDocument(String identifier, Map<String,SolrDoc> docs, InputStream is) throws Exception
processDocument
in interface IDocumentSubprocessor
identifier
- identifier of System Metadata Documentdocs
- Map of Solr Index documents use @identifier to retrieve the
original System Metadata Documentdoc
- System Metadata DocumentException
public boolean canProcess(String formatId)
canProcess
in interface IDocumentSubprocessor
formatId
- the the document to be processedpublic void initExpression(XPath xpathObject)
public List<ISolrField> getFieldList()
public void setFieldList(List<ISolrField> fieldList)
public static void setXmlNamespaceConfig(XMLNamespaceConfig xmlNamespaceConfig)
public SolrDoc mergeWithIndexedDocument(SolrDoc indexDocument) throws IOException, org.apache.commons.codec.EncoderException, XPathExpressionException
mergeWithIndexedDocument
in interface IDocumentSubprocessor
IOException
org.apache.commons.codec.EncoderException
XPathExpressionException
Copyright © 2022. All rights reserved.