|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.reasoning.CBRReasoningStep
Title: CBRReasoningStep
Description: Abstract class used to implement a step in the Case-Based Reasoning process. This class and the classes it implemetns are not thread safe.
Field Summary | |
static int |
ACTIVATED_STATE
|
protected int |
counter
|
protected int |
counterMax
|
static int |
EXPLAINED_STATE
|
static int |
FOCUSED_STATE
|
static int |
INITIAL_STATE
|
protected KnowledgeModel |
km
|
protected int |
state
|
protected java.util.Vector |
updateListeners
|
Constructor Summary | |
CBRReasoningStep(KnowledgeModel model)
Creates a new CBRReasoningStep using the model specified. |
Method Summary | |
void |
abort()
If called, it aborts the current reasoning process and resets the status to INITIAL_STATE. |
abstract void |
activate()
Runs the "activate" step in this reasoning step. |
void |
addReasoningUpdateListener(ReasoningUpdateListener listener)
Adds a listener that will be notified when the reasoning status enters a new status or when it is restarted because of an update to the underlaying model. |
abstract void |
explain()
Runs the "explain" step in this reasoning step. |
abstract void |
focus()
Trims down the number of elements in the reasoning step, using information from the activate() and explani() methods. |
int |
getIteration()
The activate/explain/focis step is usually excecuted on N cases, and this method returns how far the current task is progressed. |
int |
getIterationMax()
The activate/explain/focis step is usually excecuted on N cases, and this method returns how many iterations the current task is performing. |
KnowledgeModel |
getKnowledgeModel()
Returns the KnowledgeModel this reasoning is executed on. |
int |
getState()
Returns the state of the reasoning step. |
boolean |
isAborted()
This method may be used to check at intervals during the reasoning process if another thread has requested that the reasoning is aborted. |
boolean |
isActivated()
Returns true if this reasoning step has been activated. |
boolean |
isExplained()
Returns true if this reasoning step has been explained. |
boolean |
isFocused()
Returns true if this reasoning step has been focused. |
void |
removeReasoningUpdateListener(ReasoningUpdateListener listener)
Removes a listener from the list. |
abstract void |
reset()
Resets the reasoning to the initial step. |
protected void |
setState(int state)
|
void |
update()
Updates the reasoning, e.g. when there has been a change in the case-base. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected KnowledgeModel km
protected volatile int state
protected java.util.Vector updateListeners
protected volatile int counter
protected volatile int counterMax
public static final int INITIAL_STATE
public static final int ACTIVATED_STATE
public static final int EXPLAINED_STATE
public static final int FOCUSED_STATE
Constructor Detail |
public CBRReasoningStep(KnowledgeModel model)
Method Detail |
public abstract void reset()
public void update()
public abstract void activate()
public abstract void explain()
public abstract void focus()
protected void setState(int state)
public int getState()
public boolean isActivated()
public boolean isExplained()
public boolean isFocused()
public KnowledgeModel getKnowledgeModel()
public int getIterationMax()
public int getIteration()
public void abort()
public boolean isAborted()
public void addReasoningUpdateListener(ReasoningUpdateListener listener)
listener
- The listener to add.public void removeReasoningUpdateListener(ReasoningUpdateListener listener)
listener
- The listener to remove.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |