|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.search.highlighting.internal.HighlightingServiceImpl
public class HighlightingServiceImpl
default implementation of the HighlightingService.
| Field Summary | |
|---|---|
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.search.highlighting.HighlightingService |
|---|
HIGHLIGHTING_PARAMETER_NAME, HIGHLIGHTING_TRANSFORMERS |
| Constructor Summary | |
|---|---|
HighlightingServiceImpl()
|
|
| Method Summary | |
|---|---|
protected void |
activate(ComponentContext context)
DS activate method. |
protected void |
deactivate(ComponentContext context)
DS deactivate method. |
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. |
protected void |
setHighlightingTransformer(ServiceReference serviceReference)
add a highlighting transformer as an OSGi service reference. |
protected void |
unsetHighlightingTransformer(ServiceReference serviceReference)
remove a highlighting transformer service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String HIGHLIGHTING_TRANSFORMER_REFERENCE
public static final java.lang.String PROPERTY_HIGHLIGHTING_TRANSFORMER_TYPE
| Constructor Detail |
|---|
public HighlightingServiceImpl()
| Method Detail |
|---|
protected void activate(ComponentContext context)
throws java.lang.Exception
context - ComponentContext
java.lang.Exception - if any error occurs
protected void deactivate(ComponentContext context)
throws java.lang.Exception
context - the ComponentContext
java.lang.Exception - if any error occursprotected void setHighlightingTransformer(ServiceReference serviceReference)
serviceReference - service reference to add.protected void unsetHighlightingTransformer(ServiceReference serviceReference)
serviceReference - service reference to remove.
public java.util.Map<java.lang.String,DHighlightingTransformer> getTransformerConfigs(QueryParameterAccessor parameters)
throws BlackboardAccessException
getTransformerConfigs in interface HighlightingServiceparameters - query parameters
BlackboardAccessException - if any record access error occurs
public void highlight(AnyMap resultRecord,
java.util.Map<java.lang.String,DHighlightingTransformer> highlightConfigs)
throws BlackboardAccessException,
HighlightingTransformerException,
ParameterException
highlight in interface HighlightingServiceresultRecord - a search result record to highlight.highlightConfigs - the highlightConfigs
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 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||