SMILA (incubation) API documentation

org.eclipse.smila.search.api
Interface SearchService

All Known Implementing Classes:
SearchServiceImpl

public interface SearchService

Interface of SMILA search services. The usual purpose of such a service is to put the query object on a blackboard, create a search message to be executed with a WorkflowProcessor and finally create the SearchResult object For the structure of the query record see the Search API specificaton page in the Eclipse Wiki: http://wiki.eclipse.org/SMILA/Specifications/Search_API.

Author:
jschumacher

Field Summary
static java.lang.String NAMESPACE_SEARCH
          namespace of search specific elements in XML result.
static java.lang.String TAG_QUERY
          local name of XML result's element containing the pipeline name.
static java.lang.String TAG_SEARCHRESULT
          local name of XML result's root element.
static java.lang.String TAG_WORKFLOWNAME
          local name of XML result's element containing the pipeline name.
 
Method Summary
 SearchResult 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.
 

Field Detail

NAMESPACE_SEARCH

static final java.lang.String NAMESPACE_SEARCH
namespace of search specific elements in XML result.

See Also:
Constant Field Values

TAG_SEARCHRESULT

static final java.lang.String TAG_SEARCHRESULT
local name of XML result's root element.

See Also:
Constant Field Values

TAG_WORKFLOWNAME

static final java.lang.String TAG_WORKFLOWNAME
local name of XML result's element containing the pipeline name.

See Also:
Constant Field Values

TAG_QUERY

static final java.lang.String TAG_QUERY
local name of XML result's element containing the pipeline name.

See Also:
Constant Field Values
Method Detail

search

SearchResult search(java.lang.String workflowName,
                    Record query)
                    throws ProcessingException
Execute a query using the named workflow and create a SearchResult from the workflow result.

Parameters:
workflowName - name of workflow to process the search.
query - query object describing the search.
Returns:
search result.
Throws:
ProcessingException - error while processing the request or preparing the input message or search result.

searchAsXml

org.w3c.dom.Document searchAsXml(java.lang.String workflowName,
                                 Record query)
                                 throws ProcessingException
Execute a query using the named workflow and return the search result as an XML document.

Parameters:
workflowName - name of workflow to process the search.
query - query object describing the search.
Returns:
search result as DOM document
Throws:
ProcessingException - error while processing the request or preparing the input message or search result.

searchAsXmlString

java.lang.String searchAsXmlString(java.lang.String workflowName,
                                   Record query)
                                   throws ProcessingException
Execute a query using the named workflow and return the search result as an XML string.

Parameters:
workflowName - name of workflow to process the search.
query - query object describing the search.
Returns:
search result as XML string
Throws:
ProcessingException - error while processing the request or preparing the input message or search result.

SMILA (incubation) API documentation