public class Evaluation extends Object
Constructor and Description |
---|
Evaluation(Query query) |
Evaluation(Query query,
int traceLevel)
Creates a new evaluation
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(Item item,
TermType termType)
Adds an item to the query being evaluated in a way consistent with the query type
|
FlattenedItem |
currentItem()
Returns the current item, or null if there is no more elements
|
RuleEvaluation |
freshRuleEvaluation()
Returns a fresh rule evaluation starting at the current position of this
|
NameSpace |
getNameSpace(String nameSpaceName) |
Query |
getQuery() |
int |
getQuerySize() |
boolean |
getStemming()
Returns whether stemmed matches are allowed.
|
int |
getTraceLevel()
The amount of context information to collect about this evaluation.
|
void |
indentTrace() |
void |
insertItem(Item item,
CompositeItem parent,
int index,
TermType desiredParentType)
Inserts an item to the query being evaluated in a way consistent with the query type
|
void |
makeParentMutable(TermItem item)
Convert The parent of this item into a mutable item.
|
void |
next()
Advances to the next item as current item
|
void |
previous() |
void |
removeItem(int position,
Item item)
Removes an item, prefers the one at/close to the given position if there are multiple ones
|
void |
removeItem(Item item)
Removes this item
|
void |
removeItemByIdentity(Item item)
Removes this item by identity to ensure we remove the right one if there are multiple
equal items
|
void |
reset()
Resets the item iterator to point to the first item
|
void |
resetToLast()
Resets the item iterator to point to the last item:
|
void |
setStemming(boolean stemming)
Set to true to enable stemmed matches.
|
void |
setToLast()
Sets the item iterator to point to the last item:
|
void |
trace(int level,
String message) |
void |
unindentTrace() |
public Evaluation(Query query)
public Evaluation(Query query, int traceLevel)
query
- the query this evaluation is fortraceLevel
- the amount of tracing to dopublic void reset()
public void setToLast()
public void resetToLast()
public Query getQuery()
public void setStemming(boolean stemming)
public boolean getStemming()
public int getQuerySize()
public void next()
public void previous()
public FlattenedItem currentItem()
public RuleEvaluation freshRuleEvaluation()
public void addItem(Item item, TermType termType)
public void removeItem(Item item)
public void removeItemByIdentity(Item item)
public void removeItem(int position, Item item)
public void makeParentMutable(TermItem item)
item
- The item for which the parent shall be made mutablepublic void insertItem(Item item, CompositeItem parent, int index, TermType desiredParentType)
item
- the item to insertparent
- the parent of this item, or null to set the rootindex
- the index at which to insert this into the parentdesiredParentType
- the desired type of the composite which contains item when this returnspublic void trace(int level, String message)
public int getTraceLevel()
public void indentTrace()
public void unindentTrace()
Copyright © 2018. All rights reserved.