|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.argkit.dung.AbstractReasoner<C>
C - (Argument's) claim classpublic abstract class AbstractReasoner<C>
An abstract class that manages a Reasoner's argument source and
defeat source, ready for a particular Reasoner implementation.
To implement a Reasoner, create a class that subclasses this one,
build the constructors you want and implement the calculate() method,
see GroundedReasoner.
| Field Summary | |
|---|---|
protected ArgumentSource<C> |
argumentSource
|
protected DefeatSource<C> |
defeatSource
|
protected static java.util.logging.Logger |
logger
|
| Constructor Summary | |
|---|---|
AbstractReasoner()
Default Constructor. |
|
AbstractReasoner(ArgumentSource<C> source)
Typical constructor. |
|
| Method Summary | |
|---|---|
protected abstract Dialogue<C> |
calculate(Dialogue<C> dialogue,
int level)
|
protected java.lang.String |
drawBranch(Branch<C> dialogue)
Draw a version of the current line of reasoning. |
ArgumentSource<C> |
getArgumentSource()
Access the Reasoner's argument source. |
DefeatSource<C> |
getDefeatSource()
Access the Reasoner's defeat source. |
protected void |
log(java.lang.String message,
int level)
Write indented message to the logStream |
Dialogue<C> |
runArgumentGame(Argument<C> argument)
Throw error if there is no ArgumentSource or DefeatSource attached. |
void |
setArgumentSource(ArgumentSource<C> argumentSource)
|
void |
setDefeatSource(DefeatSource<C> defeatSource)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
protected ArgumentSource<C> argumentSource
protected DefeatSource<C> defeatSource
| Constructor Detail |
|---|
public AbstractReasoner()
public AbstractReasoner(ArgumentSource<C> source)
source - argument source| Method Detail |
|---|
public ArgumentSource<C> getArgumentSource()
Reasoner
getArgumentSource in interface Reasoner<C>public void setArgumentSource(ArgumentSource<C> argumentSource)
public DefeatSource<C> getDefeatSource()
Reasoner
getDefeatSource in interface Reasoner<C>public void setDefeatSource(DefeatSource<C> defeatSource)
public Dialogue<C> runArgumentGame(Argument<C> argument)
runArgumentGame in interface Reasoner<C>argument - to be evaluated
protected abstract Dialogue<C> calculate(Dialogue<C> dialogue,
int level)
protected void log(java.lang.String message,
int level)
message - The message to writelevel - The level of indentationprotected java.lang.String drawBranch(Branch<C> dialogue)
dialogue -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||