SMILA (incubation) API documentation

org.eclipse.smila.search.highlighting
Class HighlightingService

java.lang.Object
  extended by org.eclipse.smila.search.highlighting.HighlightingService
All Implemented Interfaces:
SearchProcessingService

public class HighlightingService
extends java.lang.Object
implements SearchProcessingService

HighlightingService using HighlightingTransformer services.


Field Summary
static java.lang.String HIGHLIGHTING_PARAMETER_NAME
          Constant for the sub annotation "name" of annotation HighlightingTransformer.
static java.lang.String HIGHLIGHTING_PARAMETER_VALUE
          Constant for the property name "value" of sub annotation "name".
static java.lang.String HIGHLIGHTING_TRANSFORMER
          Constant for the SearchAnnotation HighlightingTransformer.
static java.lang.String HIGHLIGHTING_TRANSFORMER_REFERENCE
          name of OSGi service reference to highlightingTransformer.
static java.lang.String PROPERTY_HIGHLIGHTING_TRANSFORMER_TYPE
          Constant for the OSGi property smila.highlighting.transformer.type.
 
Fields inherited from interface org.eclipse.smila.processing.SearchProcessingService
PROPERTY_NAME
 
Constructor Summary
HighlightingService()
           
 
Method Summary
protected  void activate(ComponentContext context)
          DS activate method.
protected  void deactivate(ComponentContext context)
          DS deactivate method.
 SearchMessage process(Blackboard blackboard, SearchMessage message)
          process records on Blackboard service.
protected  void setHighlightingTransformer(ServiceReference serviceReference)
          add a search processing service as an OSGi service reference.
protected  void unsetHighlightingTransformer(ServiceReference serviceReference)
          remove a search processing service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGHLIGHTING_TRANSFORMER_REFERENCE

public static final java.lang.String HIGHLIGHTING_TRANSFORMER_REFERENCE
name of OSGi service reference to highlightingTransformer.

See Also:
Constant Field Values

PROPERTY_HIGHLIGHTING_TRANSFORMER_TYPE

public static final java.lang.String PROPERTY_HIGHLIGHTING_TRANSFORMER_TYPE
Constant for the OSGi property smila.highlighting.transformer.type.

See Also:
Constant Field Values

HIGHLIGHTING_TRANSFORMER

public static final java.lang.String HIGHLIGHTING_TRANSFORMER
Constant for the SearchAnnotation HighlightingTransformer.

See Also:
Constant Field Values

HIGHLIGHTING_PARAMETER_NAME

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

See Also:
Constant Field Values

HIGHLIGHTING_PARAMETER_VALUE

public static final java.lang.String HIGHLIGHTING_PARAMETER_VALUE
Constant for the property name "value" of sub annotation "name".

See Also:
Constant Field Values
Constructor Detail

HighlightingService

public HighlightingService()
Method Detail

activate

protected void activate(ComponentContext context)
                 throws java.lang.Exception
DS activate method.

Parameters:
context - ComponentContext
Throws:
java.lang.Exception - if any error occurs

deactivate

protected void deactivate(ComponentContext context)
                   throws java.lang.Exception
DS deactivate method.

Parameters:
context - the ComponentContext
Throws:
java.lang.Exception - if any error occurs

setHighlightingTransformer

protected void setHighlightingTransformer(ServiceReference serviceReference)
add a search processing service as an OSGi service reference. To be used by Declarative Services as the bind method.

Parameters:
serviceReference - service reference to add.

unsetHighlightingTransformer

protected void unsetHighlightingTransformer(ServiceReference serviceReference)
remove a search processing service. To be used by Declarative Services as the unbind method.

Parameters:
serviceReference - service reference to remove.

process

public SearchMessage process(Blackboard blackboard,
                             SearchMessage message)
                      throws ProcessingException
process records on Blackboard service.

Specified by:
process in interface SearchProcessingService
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:
SearchProcessingService.process(org.eclipse.smila.blackboard.Blackboard, org.eclipse.smila.processing.SearchMessage)

SMILA (incubation) API documentation