SMILA (incubation) API documentation

org.eclipse.smila.search.highlighting.transformer
Class MaxTextLength

java.lang.Object
  extended by org.eclipse.smila.search.highlighting.transformer.HighlightingTransformer
      extended by org.eclipse.smila.search.highlighting.transformer.MaxTextLength

public class MaxTextLength
extends HighlightingTransformer

Author:
brox IT-Solutions GmbH

Field Summary
 
Fields inherited from class org.eclipse.smila.search.highlighting.transformer.HighlightingTransformer
PARAM_HL_ELEMENT_FILTER, PARAM_MARKUP_PREFIX, PARAM_MARKUP_SUFFIX, PARAM_MAX_HL_ELEMENTS, PARAM_MAX_LENGTH, PARAM_MAX_PRECEDING_CHARACTERS, PARAM_MAX_SUCCEEDING_CHARACTERS, PARAM_PRECEDING_CHARACTERS, PARAM_SORT_ALGORITHM, PARAM_SUCCEEDING_CHARACTERS, PARAM_TEXT_HANDLING
 
Constructor Summary
MaxTextLength()
           
 
Method Summary
 AnyMap transform(AnyMap highlight, DParameterSet highlightConfig)
          Performs the transformation of the given highlight annotation and returns the modified annotation.
 java.util.ArrayList<java.lang.Object> transform(java.util.ArrayList<java.lang.Object> data, ParameterSet parameterSet)
          Performs the actual transformation/validation of result structure.
 
Methods inherited from class org.eclipse.smila.search.highlighting.transformer.HighlightingTransformer
createParameterSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxTextLength

public MaxTextLength()
Method Detail

transform

public AnyMap transform(AnyMap highlight,
                        DParameterSet highlightConfig)
                 throws HighlightingTransformerException,
                        ParameterException
Performs the transformation of the given highlight annotation and returns the modified annotation.

Overrides:
transform in class HighlightingTransformer
Parameters:
highlight - the highlight annotation
highlightConfig - the highlightConfig
Returns:
the transformed highlight annotation
Throws:
HighlightingTransformerException - if any transformation error occurs
ParameterException - if there is any configuration error

transform

public java.util.ArrayList<java.lang.Object> transform(java.util.ArrayList<java.lang.Object> data,
                                                       ParameterSet parameterSet)
                                                throws HighlightingTransformerException
Performs the actual transformation/validation of result structure. Transformer parameters can be accessed via the getParameterSet().getXXXParameter() methods. Not implemented. Use transform(Annotation highlight, final DParameterSet highlightConfig) instead.

Specified by:
transform in class HighlightingTransformer
Parameters:
data - the list of Strings and DHighLighted objects
parameterSet - the ParameterSet
Returns:
ArrayList
Throws:
HighlightingTransformerException - - if an error occurred during transformation
See Also:
HighlightingTransformer.transform(ArrayList, ParameterSet)

SMILA (incubation) API documentation