public interface IDfQueryProcessor
Modifier and Type | Method and Description |
---|---|
void |
addListener(IDfQueryListener listener)
Registers a listener of the query execution.
|
IDfResultsSet |
blockingSearch(long timeout)
Starts a search and block until the query execution finished.
|
DfApplicationContext |
getApplicationContext()
Return the application context set by the client application
|
java.util.Map<java.lang.String,java.lang.String> |
getCutoffMessages()
Get cutoff messages.
|
java.util.List<IDfFacet> |
getFacets()
Gets the list of facets.
|
IDfQueryStatus |
getQueryStatus()
Gets the current status of the query.
|
int |
getRangeLowerBound()
Returns the lower bound of the range defined by the method setRange
|
int |
getRangeUpperBound()
Returns the upper bound of the range defined by the method setRange
|
IDfResultsSet |
getResults()
Gets the current list of results.
|
IDfResultsSet |
getResults(int from)
Gets a subset of the current list of results, from the specified start index (inclusive) to the end of the list.
|
IDfResultsSet |
getResults(int from,
int to)
Get a subset of the current list of results, from the specified start index (inclusive) to the specified end index
(exclusive).
|
int |
getResultsSize()
Gets the size of the current list of results.
|
void |
removeListener(IDfQueryListener listener)
Unregisters a listener of the query execution.
|
void |
search()
Asynchronously starts a search.
|
void |
setApplicationContext(DfApplicationContext applicationContext)
This context contains information that the client application wants to pass along with the query.
|
void |
setRange(int lowerBound,
int upperBound)
The query (IDfQueryBuilder) attached to this query processor will match only the range of results defined by
the lower bound and the upper bound specified by this method.
|
void |
setResultRaterFactory(IDfResultRaterFactory resultRaterFactory)
Sets the IDfResultRaterFactory that replaces the default one implementing the IPR (Incremental Perceptual
Ranking) algorithm.
|
void |
setResultsSet(IDfModifiableResultsSet resultSet)
Sets the result set to populate as a result of this search.
|
void |
stop()
Stops a running query.
|
void addListener(IDfQueryListener listener)
listener
- This listener will be asynchronously notified of new results and events occuring while executing
the query.void removeListener(IDfQueryListener listener)
listener
- A listener that has been previously added using addListener method.void setResultsSet(IDfModifiableResultsSet resultSet)
resultSet
- An IDfModifiableResultsSet object specifying the result set value.void search()
void stop()
IDfResultsSet blockingSearch(long timeout) throws java.lang.InterruptedException, DfSearchException
timeout
- A maximum time to wait in milliseconds. Set to 0 to have no timeout. Note that each adapter to the
sources may have their own timeout, some connection to the sources may timeout earlier.java.lang.InterruptedException
- If this query processor thread is interrupted while waiting for the query results.DfSearchException
- If the timeout elapses, or if an error occurs during the search.getResults()
IDfQueryStatus getQueryStatus()
IDfResultsSet getResults()
IDfResultsSet getResults(int from)
from
- The start index of the sublist.IDfResultsSet getResults(int from, int to)
from
- The start index of the sublist.to
- The end index of the sublist.int getResultsSize()
java.util.List<IDfFacet> getFacets()
void setResultRaterFactory(IDfResultRaterFactory resultRaterFactory)
resultRaterFactory
- The IDfResultRaterFactory to be used by this query processor.void setRange(int lowerBound, int upperBound) throws DfSearchException
lowerBound
- the range lower bound; -1 is used to disable the range accessupperBound
- the range upper bound; -1 is used to disable the range accessDfSearchException
search()
,
A method is available to know if range access is supported by the query builder
,
The results can be retrieved using the methods available in IDfQueryProcessor
,
getResults()
,
getResults(int from);
,
The indexes specified in the last two methods are local to the result set and don't match the index specified by
the setRange method. e.g. : if a range of 25 results is defined using setRange(26,50), getResults(0,1) returns the
first two results of this bunch of 25 results.
int getRangeLowerBound()
setRange(int lowerBound, int upperBound)
int getRangeUpperBound()
setRange(int lowerBound, int upperBound)
void setApplicationContext(DfApplicationContext applicationContext)
applicationContext
- DfApplicationContext getApplicationContext()
java.util.Map<java.lang.String,java.lang.String> getCutoffMessages()
Copyright 1994-2023 OpenText Corporation. All rights reserved.