|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.ucsb.adl.middleware.ResultAccumulator
|
+--edu.ucsb.adl.middleware.RankingAccumulator
A result accumulator that ranks query results before adding them to the associated result set.
This class reads the following properties from the main middleware
configuration file. Property values may be indirectly specified
using the notation @P where P is the
name of another property (see ExtendedProperties for more
information).
rankers
relevance,date,spatial_similarity".
.name
by date, most recent first".
.class
edu.ucsb.adl.middleware.DateRanker".
.argument
$Log: RankingAccumulator.java,v $
Revision 1.6 2004/09/21 23:53:43 gjanee
Minor documentation change.
Revision 1.5 2004/03/11 20:12:20 gjanee
Minor documentation addition.
Revision 1.4 2004/03/05 21:17:57 gjanee
Added support for multiple middleware instances. A middleware
instance is represented by a Global object that is
tied to a main middleware configuration file. All service objects
now maintain a reference to the appropriate Global
object. Instance-wide variables formerly coded as class variables
are now held by the Global object; various methods
that return instance-wide variables now accept a
Global object as an argument. The Global
object is now passed to all service drivers.
Revision 1.3 2003/06/09 21:04:05 gjanee
Query results are now Result objects, i.e., triplets
of standard metadata views.
Revision 1.2 2001/08/17 20:53:56 gjanee
Switched to the new configuration file structure. In the new
structure, an entirely collection-independent "main" configuration
file refers to a directory of subdirectories, one subdirectory per
collection; each subdirectory holds a collection-specific
middleware configuration file in addition to any configuration
files required by the collection driver.
Revision 1.1 2000/02/27 23:00:46 gjanee
Initial revision
| Field Summary |
| Fields inherited from class edu.ucsb.adl.middleware.ResultAccumulator |
m_maximumResults, m_set |
| Method Summary | |
protected void |
addResultInternal(edu.ucsb.adl.middleware.Result result)
Ranks a query result and adds it to the internal queue. |
static edu.ucsb.adl.middleware.RankingAccumulator |
createAccumulator(edu.ucsb.adl.middleware.Global global,
edu.ucsb.adl.middleware.ResultSet set,
int maximumResults,
long lifetime,
boolean validateResults,
java.lang.String rankerName)
Creates a RankingAccumulator. |
protected void |
flushToResultSet()
Flushes query results from the internal queue to the result set. |
protected int |
getTotalResultCount()
Returns the total number of query results examined. |
static void |
loadRankers(edu.ucsb.adl.middleware.Global global,
edu.ucsb.adl.middleware.ConfigurationFile config)
Loads ranker descriptions into the global registry. |
| Methods inherited from class edu.ucsb.adl.middleware.ResultAccumulator |
addResult, addSource, destroy, getAllInstances, getID, getInstance, getOutstandingSources, isStarted, sourceTerminated, start |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void loadRankers(edu.ucsb.adl.middleware.Global global,
edu.ucsb.adl.middleware.ConfigurationFile config)
throws InternalErrorException
global - The global object representing this instance of the middleware.config - The contents of a main middleware configuration file.
InternalErrorException - If any error occurs.
public static edu.ucsb.adl.middleware.RankingAccumulator createAccumulator(edu.ucsb.adl.middleware.Global global,
edu.ucsb.adl.middleware.ResultSet set,
int maximumResults,
long lifetime,
boolean validateResults,
java.lang.String rankerName)
throws MiddlewareException
RankingAccumulator.
global - The global object representing this instance of the middleware.set - The associated result set. The result set should be
incomplete, and no object other than the accumulator should
ever mark it as being complete.maximumResults - The maximum number of results to accumulate. Note that this is
independent of the maximum number of results requested in the
associated query.lifetime - The lifetime of the accumulator in milliseconds.validateResults - Indicates if query results should be validated.rankerName - The descriptive name of the ranker to employ, e.g., "by
date, most recent first".
UnsupportedException - If rankerName is not recognized.
java.lang.NullPointerException - If set or rankerName are
null.
java.lang.IllegalArgumentException - If maximumResults or lifetime are
negative.
InternalErrorException - If any other error occurs.
MiddlewareExceptionprotected void addResultInternal(edu.ucsb.adl.middleware.Result result)
addResultInternal in class ResultAccumulatorresult - The result.protected void flushToResultSet()
flushToResultSet in class ResultAccumulatorprotected int getTotalResultCount()
getTotalResultCount in class ResultAccumulator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||