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:
Pipelet

public class MockSearchPipelet
extends java.lang.Object
implements Pipelet

Pipelet 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 java.lang.String SUFFIX_BLIND
          blind text suffix.
static java.lang.String SUFFIX_HIGHLIGHT
          highlight suffix test.
static java.lang.String TITLE
          attribute to set in results to $PREFIX + index (0 <= index < resultSize).
 
Constructor Summary
MockSearchPipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          set configuration of pipelet.
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] 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

TITLE

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

See Also:
Constant Field Values

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(AnyMap 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 Pipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] message)
                           throws ProcessingException
simulate an index retrieval. process records on Blackboard service.

Specified by:
process in interface Pipelet
Parameters:
blackboard - Blackboard service managing the records.
message - Ids of records to process.
Returns:
Ids of result records. By default this should be the same as the passed in recordIds unless there is a specific reason not to do so. This is especially true for SearchPiplets.
Throws:
ProcessingException - error during processing.

SMILA (incubation) API documentation