public class SearchServiceImpl extends java.lang.Object implements SearchService
NAMESPACE_SEARCH, TAG_DETAILS, TAG_ERROR, TAG_MESSAGE, TAG_SCRIPT_NAME, TAG_SEARCHRESULT, TAG_WORKFLOWNAME| Constructor and Description |
|---|
SearchServiceImpl()
create instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(ComponentContext context) |
protected void |
deactivate(ComponentContext context)
OSGi Declarative Services service deactivation method.
|
Record |
search(java.lang.String workflowName,
Record query)
Execute a query using the named workflow and create a SearchResult from the workflow result.
|
org.w3c.dom.Document |
searchAsXml(java.lang.String workflowName,
Record query)
Execute a query using the named workflow and return the search result as an XML document.
|
java.lang.String |
searchAsXmlString(java.lang.String workflowName,
Record query)
Execute a query using the named workflow and return the search result as an XML string.
|
java.lang.String |
searchAsXmlStringWithScript(java.lang.String scriptAndFunction,
Record query)
Execute a query using the named script and return the search result as an XML string.
|
org.w3c.dom.Document |
searchAsXmlWithScript(java.lang.String scriptAndFunction,
Record query)
Execute a query using the named script and return the search result as an XML document.
|
Record |
searchWithScript(java.lang.String scriptAndFunction,
Record record)
Execute a query using the named script and create a SearchResult from the script result.
|
void |
setBlackboardFactory(BlackboardFactory factory)
set blackboard factory reference (used by DS).
|
void |
setProcessor(WorkflowProcessor processor)
set workflow processor reference (used by DS).
|
void |
setScriptingEngine(ScriptingEngine scriptingEngine)
set OSGI service.
|
void |
unsetBlackboardFactory(BlackboardFactory factory)
remove blackboard factory reference (used by DS).
|
void |
unsetProcessor(WorkflowProcessor processor)
remove workflow processor reference (used by DS).
|
void |
unsetScriptingEngine(ScriptingEngine scriptingEngine)
unset OSGI service.
|
public Record search(java.lang.String workflowName, Record query) throws ProcessingException
search in interface SearchServiceworkflowName - name of workflow to process the search.query - query object describing the search.ProcessingException - error while processing the request or preparing the input message or search result.public org.w3c.dom.Document searchAsXml(java.lang.String workflowName,
Record query)
throws javax.xml.parsers.ParserConfigurationException
searchAsXml in interface SearchServiceworkflowName - name of workflow to process the search.query - query object describing the search.javax.xml.parsers.ParserConfigurationException - error creating the XML result.org.eclipse.smila.search.api.SearchService#xmlSearch(java.lang.String,
org.eclipse.smila.datamodel.record.Record)public java.lang.String searchAsXmlString(java.lang.String workflowName,
Record query)
throws javax.xml.parsers.ParserConfigurationException
searchAsXmlString in interface SearchServiceworkflowName - name of workflow to process the search.query - query object describing the search.javax.xml.parsers.ParserConfigurationException - error creating the XML result.org.eclipse.smila.search.api.SearchService#searchAsXmlString(java.lang.String,
org.eclipse.smila.datamodel.record.Record)public Record searchWithScript(java.lang.String scriptAndFunction, Record record) throws ProcessingException
searchWithScript in interface SearchServicescriptAndFunction - name of the script function to process the search (e.g. search.process)record - query object describing the search.ProcessingException - error while processing the request or preparing the input message or search result.SearchService.searchWithScript(String scriptAndFunction, Record record)public org.w3c.dom.Document searchAsXmlWithScript(java.lang.String scriptAndFunction,
Record query)
throws javax.xml.parsers.ParserConfigurationException
searchAsXmlWithScript in interface SearchServicescriptAndFunction - name of the script function to process the search (e.g. search.process)query - query object describing the search.javax.xml.parsers.ParserConfigurationException - error creating the XML result.org.eclipse.smila.search.api.SearchService#searchAsXmlWithScript(final String scriptAndFunction, Record query)public java.lang.String searchAsXmlStringWithScript(java.lang.String scriptAndFunction,
Record query)
throws javax.xml.parsers.ParserConfigurationException
searchAsXmlStringWithScript in interface SearchServicescriptAndFunction - name of the script function to process the search (e.g. search.process)query - query object describing the search.javax.xml.parsers.ParserConfigurationException - error creating the XML result.SearchService.searchAsXmlStringWithScript(String scriptAndFunction, Record query)protected void activate(ComponentContext context)
protected void deactivate(ComponentContext context)
context - OSGi service component context.public void setProcessor(WorkflowProcessor processor)
processor - workflow processorpublic void unsetProcessor(WorkflowProcessor processor)
processor - workflow processorpublic void setBlackboardFactory(BlackboardFactory factory)
factory - blackboard factorypublic void unsetBlackboardFactory(BlackboardFactory factory)
factory - blackboard factorypublic void setScriptingEngine(ScriptingEngine scriptingEngine)
public void unsetScriptingEngine(ScriptingEngine scriptingEngine)