SMILA (incubation) API documentation

org.eclipse.smila.search.highlighting
Interface HighlightingService

All Known Implementing Classes:
HighlightingServiceImpl

public interface HighlightingService

HighlightingService using HighlightingTransformer services. Basically a background service for the Highlighting pipelet to make the handling of dynamic transformer services easier.

Author:
scum36

Field Summary
static java.lang.String HIGHLIGHTING_PARAMETER_NAME
          Constant for the sub annotation "name" of annotation HighlightingTransformer.
static java.lang.String HIGHLIGHTING_TRANSFORMERS
          Constant for the configuration parameter
 
Method Summary
 java.util.Map<java.lang.String,DHighlightingTransformer> getTransformerConfigs(QueryParameterAccessor parameters)
          Checks if the query contains any Highlight annotations on attributes and converts them into DHighlightingTransformer configuration objects.
 void highlight(AnyMap resultRecord, java.util.Map<java.lang.String,DHighlightingTransformer> highlightConfigs)
          Executes highlighting for the record with the given Id using the given highlightConfigs.
 

Field Detail

HIGHLIGHTING_TRANSFORMERS

static final java.lang.String HIGHLIGHTING_TRANSFORMERS
Constant for the configuration parameter

See Also:
Constant Field Values

HIGHLIGHTING_PARAMETER_NAME

static final java.lang.String HIGHLIGHTING_PARAMETER_NAME
Constant for the sub annotation "name" of annotation HighlightingTransformer.

See Also:
Constant Field Values
Method Detail

getTransformerConfigs

java.util.Map<java.lang.String,DHighlightingTransformer> getTransformerConfigs(QueryParameterAccessor parameters)
                                                                               throws BlackboardAccessException
Checks if the query contains any Highlight annotations on attributes and converts them into DHighlightingTransformer configuration objects.

Parameters:
parameters - query parameters
Returns:
a Map of attribute names to DHighlightingTransformer configurations
Throws:
BlackboardAccessException - if any record access error occurs

highlight

void highlight(AnyMap resultRecord,
               java.util.Map<java.lang.String,DHighlightingTransformer> highlightConfigs)
               throws BlackboardAccessException,
                      HighlightingTransformerException,
                      ParameterException
Executes highlighting for the record with the given Id using the given highlightConfigs.

Parameters:
resultRecord - a search result record to highlight.
highlightConfigs - the highlightConfigs
Throws:
BlackboardAccessException - if any record access error occurs
HighlightingTransformerException - if any highlight transformation error occurs
ParameterException - if any highlight configuration error occurs

SMILA (incubation) API documentation