|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.result.BasicResultItem
no.sesat.search.result.BasicResultList<T>
T - the type of ResultItem the ResultList contains.public class BasicResultList<T extends ResultItem>
A simple implementation of a search result. Is not multi-thread safe. All fields (of all types) handled by superclass BasicSearchResultItem.
| Constructor Summary | |
|---|---|
|
BasicResultList()
Plain constructor. |
|
BasicResultList(ResultItem copy)
Copy constructor. |
|
BasicResultList(ResultList<ResultItem> copy)
Copy constructor. |
protected |
BasicResultList(String title,
String url,
int hitCount)
|
| Method Summary | |
|---|---|
BasicResultList<T> |
addField(String field,
String value)
Adds the field to the returned instance which is otherwise equal to this. |
BasicResultList<T> |
addObjectField(String field,
Serializable value)
Adds the field to the returned instance which is otherwise equal to this. |
void |
addQuerySuggestion(Suggestion query)
|
void |
addRelevantQuery(WeightedSuggestion query)
|
void |
addResult(T item)
Adds the result to the end of the current list of results. |
void |
addResults(List<? extends T> items)
Appends the results to the end of the current list of results. |
void |
addSpellingSuggestion(WeightedSuggestion suggestion)
|
BasicResultList<T> |
addToMultivaluedField(String field,
String value)
Adds (to the multivalued) field to the returned instance which is otherwise equal to this. |
int |
getHitCount()
Get the hitcount. |
Collection<Suggestion> |
getQuerySuggestions()
|
List<WeightedSuggestion> |
getRelevantQueries()
Get the relevantQueries. |
List<T> |
getResults()
Returns a defensive copy of the results. |
int |
getResultsSize()
JavaBean compatability for JSPs. |
List<WeightedSuggestion> |
getSpellingSuggestions()
|
Map<String,List<WeightedSuggestion>> |
getSpellingSuggestionsMap()
|
void |
removeResult(T item)
Remove the result from the current result list. |
void |
removeResults()
Remove all results from the current result list. |
void |
replaceResult(T original,
T theNew)
Replace the original with theNew. |
void |
setHitCount(int docCount)
Set the hitcount. |
void |
sortResults(Comparator comparator)
Sorts the results according to the order induced by the specified comparator. |
| Methods inherited from class no.sesat.search.result.BasicResultItem |
|---|
equals, getField, getField, getFieldNames, getFields, getInteger, getMultivaluedField, getObjectField, getTitle, getUrl, hashCode, setTitle, setUrl |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface no.sesat.search.result.ResultItem |
|---|
getField, getFieldNames, getMultivaluedField, getObjectField, getTitle, getUrl, setTitle, setUrl |
| Constructor Detail |
|---|
public BasicResultList()
protected BasicResultList(String title,
String url,
int hitCount)
public BasicResultList(ResultItem copy)
copy - public BasicResultList(ResultList<ResultItem> copy)
copy - | Method Detail |
|---|
public void setHitCount(int docCount)
ResultList
setHitCount in interface ResultList<T extends ResultItem>public int getHitCount()
ResultList
getHitCount in interface ResultList<T extends ResultItem>public void addResult(T item)
ResultList
addResult in interface ResultList<T extends ResultItem>public void addResults(List<? extends T> items)
ResultList
addResults in interface ResultList<T extends ResultItem>
public void replaceResult(T original,
T theNew)
ResultList
replaceResult in interface ResultList<T extends ResultItem>public void removeResult(T item)
ResultList
removeResult in interface ResultList<T extends ResultItem>public void removeResults()
ResultList
removeResults in interface ResultList<T extends ResultItem>public void sortResults(Comparator comparator)
ResultList
sortResults in interface ResultList<T extends ResultItem>public void addSpellingSuggestion(WeightedSuggestion suggestion)
addSpellingSuggestion in interface ResultList<T extends ResultItem>public List<WeightedSuggestion> getSpellingSuggestions()
getSpellingSuggestions in interface ResultList<T extends ResultItem>public Map<String,List<WeightedSuggestion>> getSpellingSuggestionsMap()
public Collection<Suggestion> getQuerySuggestions()
getQuerySuggestions in interface ResultList<T extends ResultItem>public void addQuerySuggestion(Suggestion query)
addQuerySuggestion in interface ResultList<T extends ResultItem>public List<T> getResults()
getResults in interface ResultList<T extends ResultItem>public int getResultsSize()
public BasicResultList<T> addField(String field,
String value)
addField in interface ResultItemaddField in interface ResultList<T extends ResultItem>addField in class BasicResultItemfield - value - html formatted string. html to display must be escaped.
public BasicResultList<T> addObjectField(String field,
Serializable value)
ResultItem
addObjectField in interface ResultItemaddObjectField in interface ResultList<T extends ResultItem>addObjectField in class BasicResultItemfield - value -
public BasicResultList<T> addToMultivaluedField(String field,
String value)
ResultItem
addToMultivaluedField in interface ResultItemaddToMultivaluedField in class BasicResultItempublic void addRelevantQuery(WeightedSuggestion query)
query - public List<WeightedSuggestion> getRelevantQueries()
getRelevantQueries in interface ResultList<T extends ResultItem>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||