org.argkit.dung
Class Dungine<C>

java.lang.Object
  extended by org.argkit.dung.Dungine<C>
Type Parameters:
C - (Argument's) claim class
All Implemented Interfaces:
ArgumentSource<C>

public class Dungine<C>
extends java.lang.Object
implements ArgumentSource<C>

A DungEngine decorates arguments from an ArgumentSource with an isAcceptable flag, using a DefeatSource and a Reasoner. It can be used:

A light touch has been used with regards to synchronisation. The updateCaches method is synchronised, because this is where the key work is done. This approach may need to be revisited at a later stage.

Author:
Matt South

Constructor Summary
Dungine()
           
Dungine(ArgumentSource<C> source)
           
 
Method Summary
 Query<C> createQuery(C claim)
          Create a Query.
 java.util.Collection<? extends Argument<C>> getAllArguments()
          Yield all arguments from a particular argument source.
 java.util.Collection<? extends Argument<C>> getArguments(C claim)
          Yield all arguments with a particular claim expression.
 AbstractReasoner<C> getReasoner()
           
 void setReasoner(AbstractReasoner<C> reasoner)
           
protected  void updateCaches()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dungine

public Dungine(ArgumentSource<C> source)

Dungine

public Dungine()
Method Detail

getReasoner

public AbstractReasoner<C> getReasoner()

setReasoner

public void setReasoner(AbstractReasoner<C> reasoner)

createQuery

public Query<C> createQuery(C claim)
Create a Query. A query allows a user to examine the dialogue behind the status annotation given for a particular argument.

Parameters:
claim -
Returns:
a query containing all results available from the argument source

getAllArguments

public java.util.Collection<? extends Argument<C>> getAllArguments()
Description copied from interface: ArgumentSource
Yield all arguments from a particular argument source.

Specified by:
getAllArguments in interface ArgumentSource<C>
Returns:
a collection of all arguments available from the implementing source

getArguments

public java.util.Collection<? extends Argument<C>> getArguments(C claim)
Description copied from interface: ArgumentSource
Yield all arguments with a particular claim expression.

Specified by:
getArguments in interface ArgumentSource<C>
Parameters:
claim - argument's claim
Returns:
a collection of arguments with the given claim

updateCaches

protected void updateCaches()