|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.authority.Choices
public class Choices
Record class to hold a set of Choices returned by an authority in response to a search.
Choice| Field Summary | |
|---|---|
static int |
CF_ACCEPTED
This authority value has been confirmed as accurate by an interactive user or authoritative policy |
static int |
CF_AMBIGUOUS
There are multiple matching authority values of equal validity. |
static int |
CF_FAILED
The authority encountered an internal failure - this preserves a record in the metadata of why there is no value. |
static int |
CF_NOTFOUND
There are no matching answers from the authority. |
static int |
CF_NOVALUE
No reasonable confidence value is available |
static int |
CF_REJECTED
The authority recommends this submission be rejected. |
static int |
CF_UNCERTAIN
Value is singular and valid but has not been seen and accepted by a human, so its provenance is uncertain. |
static int |
CF_UNSET
Value has not been set (DB default). |
int |
confidence
The confidence level that applies to all values in this result set |
int |
defaultSelected
Index of value to be selected by default, if any. |
boolean |
more
true when there are more values to be sent after this result. |
int |
start
Index of start of this result wrt. |
int |
total
Count of total results available |
Choice[] |
values
The set of values returned by the authority |
| Constructor Summary | |
|---|---|
Choices(boolean isError)
Constructor for simple empty or error results |
|
Choices(Choice[] values,
int start,
int total,
int confidence,
boolean more)
Constructor for general purpose |
|
Choices(Choice[] values,
int start,
int total,
int confidence,
boolean more,
int defaultSelected)
Constructor for general purpose |
|
Choices(int confidence)
Constructor for error results |
|
| Method Summary | |
|---|---|
static String |
getConfidenceText(int cv)
Get the symbolic name corresponding to a confidence value, or CF_NOVALUE's name if the value is unknown. |
static int |
getConfidenceValue(String ct)
Get the value corresponding to a symbolic name of a confidence value, or CF_NOVALUE if the symbol is unknown. |
static int |
getConfidenceValue(String ct,
int dflt)
Get the value corresponding to a symbolic name of a confidence value, or the given default if the symbol is unknown. |
boolean |
isError()
Predicate, did this result encounter an error? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CF_ACCEPTED
public static final int CF_UNCERTAIN
public static final int CF_AMBIGUOUS
public static final int CF_NOTFOUND
public static final int CF_FAILED
public static final int CF_REJECTED
public static final int CF_NOVALUE
public static final int CF_UNSET
public Choice[] values
public int confidence
public int start
public int total
public int defaultSelected
public boolean more
| Constructor Detail |
|---|
public Choices(Choice[] values,
int start,
int total,
int confidence,
boolean more)
public Choices(Choice[] values,
int start,
int total,
int confidence,
boolean more,
int defaultSelected)
public Choices(int confidence)
public Choices(boolean isError)
| Method Detail |
|---|
public boolean isError()
public static String getConfidenceText(int cv)
cv - confidence value
public static int getConfidenceValue(String ct)
ct - symbolic name in String
public static int getConfidenceValue(String ct,
int dflt)
ct - symbolic name in Stringdflt - the default value to return
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||