|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dftproject.genesis.core.search.AbstractSearchHitCollector
public abstract class AbstractSearchHitCollector
A search hit collector retrieves search results and ranks them.
| Constructor Summary | |
|---|---|
AbstractSearchHitCollector()
|
|
| Method Summary | |
|---|---|
void |
addHitListener(HitListener listener)
Adds a hit listener. |
void |
notifyHitListeners(double score,
IResourceNode individual)
Notifies all hit listeners of a new (or updated) hit. |
void |
removeHitListener(HitListener listener)
Removes a hit listener. |
abstract void |
start(IResourceNode query)
Starts collecting search results for the given query. |
abstract void |
stop()
Stops collecting search results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSearchHitCollector()
| Method Detail |
|---|
public abstract void start(IResourceNode query)
The query is given as an example. The hit collector should try to collect resources that are similar to the query example. Score should reflect how closely a resource matches the query example.
query - the querypublic abstract void stop()
public void addHitListener(HitListener listener)
listener - a hit listenerpublic void removeHitListener(HitListener listener)
listener - a hit listener
public void notifyHitListeners(double score,
IResourceNode individual)
Additional information on a resource may be found, which may change that resource's score. When this happens, the listeners will be renotified of the same search result, but with the updated score.
score - the score for this search resultindividual - the search result
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||