org.cfpm.caves.za
Class EndorsementDisposalPolicy
java.lang.Object
org.cfpm.caves.za.DisposalPolicy
org.cfpm.caves.za.EndorsementDisposalPolicy
public class EndorsementDisposalPolicy
- extends DisposalPolicy
This class is a specialisation of DisposalPolicy
, able
to include endorsement facts. This is necessary because the fact header
of endorsement facts (endorsed
) is the same for all endorsements
and the differentiation of removal or not has to be made based on the
actual endorsement (slot endorsement
). All endorsement facts
have the default time stamp slot tickStamp
.
- Author:
- Ruth
Field Summary |
(package private) java.util.HashMap<java.lang.String,java.lang.Integer> |
endorsementFilter
the list of endorsement filters
(key = endorsement token, value = time lag) |
Method Summary |
void |
addEndorsementPolicy(java.lang.String endorsementToken,
int lag)
adds a new endorsement policy |
protected void |
determineDisposalList(java.util.Iterator factList,
java.util.ArrayList<jess.Fact> disposalList,
int tick)
The strategy applied to determine which facts fit the defined policies and should
therefore be removed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
endorsementFilter
java.util.HashMap<java.lang.String,java.lang.Integer> endorsementFilter
- the list of endorsement filters
(key = endorsement token, value = time lag)
EndorsementDisposalPolicy
public EndorsementDisposalPolicy(jess.Rete engine)
- Creates a new empty endorsement disposal policy
- Parameters:
engine
- the Jess engine
addEndorsementPolicy
public void addEndorsementPolicy(java.lang.String endorsementToken,
int lag)
- adds a new endorsement policy
- Parameters:
endorsementToken
- the endorsement tokenlag
- the time lag
determineDisposalList
protected void determineDisposalList(java.util.Iterator factList,
java.util.ArrayList<jess.Fact> disposalList,
int tick)
- The strategy applied to determine which facts fit the defined policies and should
therefore be removed. Collects all fitting facts in a disposal list.
- Overrides:
determineDisposalList
in class DisposalPolicy
- Parameters:
factList
- the list of all facts to be checkeddisposalList
- the list of facts to be removed from the fact basetick
- the current tick