public class ExtractionService extends Object
| Constructor and Description |
|---|
ExtractionService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(JCRNodeWrapper node)
Performs a check if the provided node can be handled by currently
configured parsers.
|
void |
extractProperties(AddedNodeFact node,
org.drools.core.spi.KnowledgeHelper drools)
Extract properties from document
|
void |
extractText(JCRStoreProvider provider,
String sourcePath,
String extractionNodePath)
Synchronously extract text from document and store it as a property of either the file
node itself or the node referred to by the extractionNodePath parameter.
|
boolean |
extractText(JCRStoreProvider provider,
String sourcePath,
String extractionNodePath,
String workspace)
Synchronously extract text from document and store it as a property of either the file
node itself or the node referred to by the extractionNodePath parameter.
|
static ExtractionService |
getInstance() |
boolean |
isEnabled()
Returns
true if the text extraction service is activated. |
void |
setJcrTemplate(JCRTemplate jcrTemplate) |
void |
setMapping(Map<String,String> mapping) |
void |
setTextExtractionService(TextExtractionService textExtractionService) |
public static ExtractionService getInstance()
public boolean canHandle(JCRNodeWrapper node) throws IOException
node - the node to be checkedtrue if there is a parser that can handle provided
node's contentIOException - in case of the read/write errorspublic void extractProperties(AddedNodeFact node, org.drools.core.spi.KnowledgeHelper drools) throws Exception
node - file node in JCRdrools - context of the rule engineExceptionpublic void extractText(JCRStoreProvider provider, String sourcePath, String extractionNodePath) throws IOException
provider - the JCR store providersourcePath - the path to the file nodeextractionNodePath - the optional path to the node receiving the extracted textIOExceptionpublic boolean extractText(JCRStoreProvider provider, String sourcePath, String extractionNodePath, String workspace) throws IOException
provider - the JCR store providersourcePath - the path to the file nodeextractionNodePath - the optional path to the node receiving the extracted textworkspace - the workspace, where document was saved (default or live)IOExceptionpublic boolean isEnabled()
true if the text extraction service is activated.true if the text extraction service is activatedpublic void setJcrTemplate(JCRTemplate jcrTemplate)
public void setTextExtractionService(TextExtractionService textExtractionService)
textExtractionService - the textExtractionService to setCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.