|
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.api.helper.ResultAccessor
org.eclipse.smila.search.api.helper.ResultBuilder
public class ResultBuilder
wrapper helper class to build the result record. This is intentionally a subclass of the ResultAccessor as to
also provide read access to the props that are set here.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.smila.search.api.helper.ResultAccessor |
|---|
_result |
| Constructor Summary | |
|---|---|
ResultBuilder(java.lang.String workflowName,
Record result)
Creates a new builder and adds an AnySeq for the SearchResultConstants.RECORDS. |
|
| Method Summary | |
|---|---|
AnySeq |
addGroup(java.lang.String groupName)
Adds group Seq with the given name and returns it. |
AnyMap |
addGroupValue(AnySeq group,
Any value,
java.lang.Long count)
Adds the map containing the count and value for the group value. |
AnyMap |
addGroupValue(AnySeq group,
java.lang.Object value,
java.lang.Long count)
Adds the map containing the count and value for the group value. |
AnyMap |
addResultItem(java.lang.String id,
java.lang.Double score)
Adds a new result item to the list. |
void |
setCount(java.lang.Long count)
sets value for SearchResultConstants.COUNT. |
void |
setRuntime(java.lang.Long millis)
sets value for SearchResultConstants.RUNTIME. |
| Methods inherited from class org.eclipse.smila.search.api.helper.ResultAccessor |
|---|
getCount, getGroups, getIndexSize, getNumberOfRecords, getQuery, getResult, getResultRecord, getResultRecords, getRuntime, getWorkflowName, hasQuery, hasRecords |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResultBuilder(java.lang.String workflowName,
Record result)
SearchResultConstants.RECORDS.
workflowName - result - | Method Detail |
|---|
public AnyMap addResultItem(java.lang.String id,
java.lang.Double score)
public void setCount(java.lang.Long count)
SearchResultConstants.COUNT.
public void setRuntime(java.lang.Long millis)
SearchResultConstants.RUNTIME.
public AnySeq addGroup(java.lang.String groupName)
public AnyMap addGroupValue(AnySeq group,
Any value,
java.lang.Long count)
group - NullArgumentException if nullvalue - NullArgumentException if nullcount - if null the count property is not set
public AnyMap addGroupValue(AnySeq group,
java.lang.Object value,
java.lang.Long count)
group - any valid literal object that can be passed into
DataFactory.autoConvertValue(Object)
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||