SMILA (incubation) API documentation

org.eclipse.smila.search.api.helper
Class ResultRecordAccessor

java.lang.Object
  extended by org.eclipse.smila.search.api.helper.RecordAccessor
      extended by org.eclipse.smila.search.api.helper.ResultRecordAccessor

public class ResultRecordAccessor
extends RecordAccessor

wrapper for search result records. Provides easier access to relevance and highlight annotations.

Author:
jschumacher

Constructor Summary
ResultRecordAccessor(Record record)
          create instance.
 
Method Summary
 HighlightInfo getHighlightInfo()
           
 HighlightInfo getHighlightInfo(java.lang.String attributeName)
           
 java.lang.Double getRelevance()
           
 
Methods inherited from class org.eclipse.smila.search.api.helper.RecordAccessor
annotationSize, annotationSize, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotationValue, getAnnotationValues, getLiteral, getLiterals, getRecord, getResultAnnotationFloatValue, getResultAnnotationIntValue, getResultAnnotationValue, getTerms, hasAnnotation, hasAnnotation, hasAttribute, hasLiterals, literalSize, unmodifiableList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultRecordAccessor

public ResultRecordAccessor(Record record)
create instance.

Parameters:
record - result record.
Method Detail

getRelevance

public java.lang.Double getRelevance()
Returns:
a relevance value attached to the record. Null, if no such annotation exists or its value cannot be parsed as an double.

getHighlightInfo

public HighlightInfo getHighlightInfo()
Returns:
top-level highlight.

getHighlightInfo

public HighlightInfo getHighlightInfo(java.lang.String attributeName)
Parameters:
attributeName - name of attribute
Returns:
attribute hightlight

SMILA (incubation) API documentation