|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.search.Search
public class Search
The Search component queries several unstructured and
(semi)structured knowledge sources in parallel and aggregate the results.
Queries are instances of the class
info.ephyra.querygeneration.Query, results are instances of the
Result class in this package.
| Field Summary | |
|---|---|
private static java.util.ArrayList<KnowledgeAnnotator> |
kas
KnowledgeAnnotators used to query (semi)structured knowledge
sources. |
private static java.util.ArrayList<KnowledgeMiner> |
kms
KnowledgeMiners used to query unstructured knowledge
sources. |
private static int |
MAX_PENDING
The maximum number of parallel queries. |
private static int |
pending
Number pending of queries. |
private static java.util.ArrayList<Result> |
results
Results from different searches are aggregated in this field. |
| Constructor Summary | |
|---|---|
Search()
|
|
| Method Summary | |
|---|---|
static void |
addKnowledgeAnnotator(KnowledgeAnnotator ka)
Registers a KnowledgeAnnotator for a (semi)structured
knowledge source. |
static void |
addKnowledgeMiner(KnowledgeMiner km)
Registers a KnowledgeMiner for an unstructured knowledge
source. |
static void |
addResults(Result[] results)
Used by Searchers to return the results found in the
knowledge sources. |
static void |
clearKnowledgeAnnotators()
Unregisters all KnowledgeAnnotators. |
static void |
clearKnowledgeMiners()
Unregisters all KnowledgeMiners. |
static Result[] |
doSearch(Query[] queries)
Sends several alternative queries to all the searchers that have been registered and returns the aggregated results. |
private static java.util.ArrayList<Result> |
dropDuplicates(java.util.ArrayList<Result> results)
Drops duplicates among results from KnowledgeMiners. |
static void |
incPending()
Increments the number of pending queries by 1. |
private static void |
queryKAs(Query query)
Searches the (semi)structured knowledge sources. |
private static void |
queryKMs(Query query)
Searches the unstructured knowledge sources. |
static void |
waitForPending()
Delays a thread until there are less than MAX_PENDING pending queries. |
private static void |
waitForResults()
Delays the main thread until all queries have been completed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_PENDING
private static java.util.ArrayList<KnowledgeAnnotator> kas
KnowledgeAnnotators used to query (semi)structured knowledge
sources.
private static java.util.ArrayList<KnowledgeMiner> kms
KnowledgeMiners used to query unstructured knowledge
sources.
private static java.util.ArrayList<Result> results
private static int pending
| Constructor Detail |
|---|
public Search()
| Method Detail |
|---|
private static void queryKAs(Query query)
query - query to be processedprivate static void queryKMs(Query query)
query - query to be processedprivate static void waitForResults()
private static java.util.ArrayList<Result> dropDuplicates(java.util.ArrayList<Result> results)
KnowledgeMiners.
results - results with duplicates
public static void addKnowledgeAnnotator(KnowledgeAnnotator ka)
KnowledgeAnnotator for a (semi)structured
knowledge source.
ka - KnowledgeAnnotator to addpublic static void addKnowledgeMiner(KnowledgeMiner km)
KnowledgeMiner for an unstructured knowledge
source.
km - KnowledgeMiner to addpublic static void clearKnowledgeAnnotators()
KnowledgeAnnotators.
public static void clearKnowledgeMiners()
KnowledgeMiners.
public static Result[] doSearch(Query[] queries)
queries - queries to be processed
public static void waitForPending()
public static void incPending()
public static void addResults(Result[] results)
Searchers to return the results found in the
knowledge sources.
results - results found in the knowledge sources
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||