public class JsonLdSubprocessor extends Object implements IDocumentSubprocessor
| Constructor and Description |
|---|
JsonLdSubprocessor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProcess(String formatId)
Returns true if subprocessor should be run against object
|
List<ISolrDataField> |
getFieldList()
Get the list of the Solr field names the subprocessor can handle
|
List<String> |
getMatchDocuments()
Get the list of format ids which the subprocessor can process
|
boolean |
isHttps(List expandedJsonld)
Determine if the expanded jsonld object uses the schema of https://schema.org
|
SolrDoc |
mergeWithIndexedDocument(SolrDoc indexDocument) |
Map<String,SolrDoc> |
processDocument(String identifier,
Map<String,SolrDoc> docs,
InputStream is)
Method allows for manipulation of indexed fields that should be added to solr index
|
void |
setFieldList(List<ISolrDataField> fieldList)
Set the list of the Solr field names which the subprocessor can handle
|
void |
setMatchDocuments(List<String> matchDocuments)
Set the list of format ids which the subprocessor can process
|
public boolean canProcess(String formatId)
canProcess in interface IDocumentSubprocessorformatId - the the document to be processedpublic List<String> getMatchDocuments()
public void setMatchDocuments(List<String> matchDocuments)
matchDocuments - the format ids will be setpublic List<ISolrDataField> getFieldList()
public void setFieldList(List<ISolrDataField> fieldList)
fieldList - the list of Solr field names which the subprocessor can handlepublic Map<String,SolrDoc> processDocument(String identifier, Map<String,SolrDoc> docs, InputStream is) throws Exception
IDocumentSubprocessorprocessDocument in interface IDocumentSubprocessoridentifier - id of original document in Map docsdocs - Documents indexed by identifiersis - original document streamExceptionpublic boolean isHttps(List expandedJsonld) throws Exception
expandedJsonld - the expanded Jsonld objectExceptionpublic SolrDoc mergeWithIndexedDocument(SolrDoc indexDocument) throws IOException, org.apache.commons.codec.EncoderException, XPathExpressionException
mergeWithIndexedDocument in interface IDocumentSubprocessorIOExceptionorg.apache.commons.codec.EncoderExceptionXPathExpressionExceptionCopyright © 2022. All rights reserved.