SMILA (incubation) API documentation

org.eclipse.smila.search.servlet
Class MockSearchPipelet

java.lang.Object
  extended by org.eclipse.smila.search.servlet.MockSearchPipelet
All Implemented Interfaces:
IPipelet, SearchPipelet

public class MockSearchPipelet
extends java.lang.Object
implements SearchPipelet

SimplePipelet implementation for test. Just logs the given configuration and record IDs.

Author:
jschumacher

Field Summary
static int MAX_INDEX_SIZE
          maximal number of hits.
static int MAX_TOTAL_HITS
          maximal number of hits.
static java.lang.String PREFIX
          prefix for fragment name and attribute value.
static java.lang.String PREFIX_BLIND
          blind text prefix.
static java.lang.String PREFIX_HIGHLIGHT
          highlight prefix test.
static Path QUERY
          attribute to set in query to query string and attach terms to.
static Path QUERY_ANNOTATION
          path to set attribute annotations on query attribute.
static java.lang.String SUFFIX_BLIND
          blind text suffix.
static java.lang.String SUFFIX_HIGHLIGHT
          highlight suffix test.
static Path TITLE
          attribute to set in results to $PREFIX + index (0 <= index < resultSize).
 
Constructor Summary
MockSearchPipelet()
           
 
Method Summary
 void configure(PipeletConfiguration configuration)
          set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.
 SearchMessage process(Blackboard blackboard, SearchMessage message)
          simulate an index retrieval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_TOTAL_HITS

public static final int MAX_TOTAL_HITS
maximal number of hits.

See Also:
Constant Field Values

MAX_INDEX_SIZE

public static final int MAX_INDEX_SIZE
maximal number of hits.

See Also:
Constant Field Values

QUERY

public static final Path QUERY
attribute to set in query to query string and attach terms to.


QUERY_ANNOTATION

public static final Path QUERY_ANNOTATION
path to set attribute annotations on query attribute.


TITLE

public static final Path TITLE
attribute to set in results to $PREFIX + index (0 <= index < resultSize).


PREFIX

public static final java.lang.String PREFIX
prefix for fragment name and attribute value.

See Also:
Constant Field Values

PREFIX_BLIND

public static final java.lang.String PREFIX_BLIND
blind text prefix.

See Also:
Constant Field Values

SUFFIX_BLIND

public static final java.lang.String SUFFIX_BLIND
blind text suffix.

See Also:
Constant Field Values

PREFIX_HIGHLIGHT

public static final java.lang.String PREFIX_HIGHLIGHT
highlight prefix test.

See Also:
Constant Field Values

SUFFIX_HIGHLIGHT

public static final java.lang.String SUFFIX_HIGHLIGHT
highlight suffix test.

See Also:
Constant Field Values
Constructor Detail

MockSearchPipelet

public MockSearchPipelet()
Method Detail

configure

public void configure(PipeletConfiguration configuration)
               throws ProcessingException
set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.

Specified by:
configure in interface IPipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)
See Also:
#configure(org.eclipse.smila.processing.configuration.PipeletConfiguration)

process

public SearchMessage process(Blackboard blackboard,
                             SearchMessage message)
                      throws ProcessingException
simulate an index retrieval. [process records on Blackboard service.

Specified by:
process in interface SearchPipelet
Parameters:
blackboard - Blackboard service managing the records.
message - Ids of query record and records to process.
Returns:
Ids of query record and result records.
Throws:
ProcessingException - error during processing.
See Also:
SimplePipelet.process(org.eclipse.smila.blackboard.Blackboard, org.eclipse.smila.datamodel.id.Id[])

SMILA (incubation) API documentation