public class Ranker
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
errorMessagePrefix |
Prefix for every error message set by
run(RankerParameters) |
static int |
ERRORS_STEP |
Possible step at which calculations can be restarted (from calculation of ranking errors).
|
static java.lang.String |
infoMessagePrefix |
Prefix for every info message set by
run(RankerParameters) |
static int |
PCT_STEP |
Possible step (initial one) at which calculations can be started.
|
static int |
PREFERENCE_GRAPH_STEP |
Possible step at which calculations can be restarted (from calculation of a preference graph).
|
static int |
RANKING_STEP |
Possible step at which calculations can be restarted (from calculation of a ranking).
|
static int |
RULES_STEP |
Possible step at which calculations can be restarted (from induction of rules).
|
static int |
UNION_CONTAINER_STEP |
Possible step at which calculations can be started (from setting a union container).
|
static java.lang.String |
warningMessagePrefix |
Prefix for every warning message set by
run(RankerParameters) |
Constructor | Description |
---|---|
Ranker() |
Sole constructor.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.ArrayList<java.lang.String> |
getMessages() |
Gets list of messages resulting from the latest call to
run(RankerParameters) . |
RankerParameters |
getRankerParameters() |
Gets ranker parameters.
|
RankerResults |
run() |
Runs this ranker, from initial step, using ranker parameters stored in this object.
|
RankerResults |
run(int startingStep) |
Re-runs this ranker, from given step, using ranker parameters stored in this object.
|
RankerResults |
run(int startingStep,
int lastStep) |
Re-runs this ranker, from given step, using ranker parameters stored in this object.
|
RankerResults |
run(RankerParameters rankerParameters) |
Runs this ranker using given parameters.
|
void |
setRankerParameters(RankerParameters rankerParameters) |
Sets ranker parameters.
|
public static java.lang.String errorMessagePrefix
run(RankerParameters)
public static java.lang.String warningMessagePrefix
run(RankerParameters)
public static java.lang.String infoMessagePrefix
run(RankerParameters)
public static final int PCT_STEP
public static final int UNION_CONTAINER_STEP
public static final int RULES_STEP
public static final int PREFERENCE_GRAPH_STEP
public static final int RANKING_STEP
public static final int ERRORS_STEP
public java.util.ArrayList<java.lang.String> getMessages()
run(RankerParameters)
.run(RankerParameters)
public RankerParameters getRankerParameters()
public void setRankerParameters(RankerParameters rankerParameters)
rankerParameters
- new ranker parameterspublic RankerResults run(int startingStep, int lastStep)
getMessages()
is required.startingStep
- starting step of calculations to perform. Can be one of PCT_STEP
, UNION_CONTAINER_STEP
, RULES_STEP
, PREFERENCE_GRAPH_STEP
, RANKING_STEP
, or ERRORS_STEP
.lastStep
- last step of calculations. Calculations are stopped after stopped this step, even if returned ranker results are not complete.null
in case of an errorjava.lang.NullPointerException
- when ranker parameters are not setjava.lang.NullPointerException
- when there are no previous ranking results and required starting step is later than PCT_STEP
InvalidValueException
- when given value of the starting step or last step is incorrectInvalidValueException
- when given value of the starting step is greater than the given value of last steppublic RankerResults run(int startingStep)
getMessages()
is required. See run(int, int)
.startingStep
- starting step of calculations to perform. Can be one of PCT_STEP
, UNION_CONTAINER_STEP
, RULES_STEP
, PREFERENCE_GRAPH_STEP
, RANKING_STEP
, or ERRORS_STEP
.null
in case of an errorjava.lang.NullPointerException
- when ranker parameters are not setjava.lang.NullPointerException
- when there are no previous ranker results and required starting step is later than PCT_STEP
InvalidValueException
- when given value of the starting step is incorrectpublic RankerResults run()
getMessages()
is required.java.lang.NullPointerException
- when ranker parameters are not setpublic RankerResults run(RankerParameters rankerParameters)
getMessages()
is required.
Can modify fields of the object given as a parameter - see RankerParameters.validateAndAdjust()
.rankerParameters
- ranker parameters