Package FAtiMA.Core.conditions
Class PastEventCondition
- java.lang.Object
-
- FAtiMA.Core.conditions.Condition
-
- FAtiMA.Core.conditions.PredicateCondition
-
- FAtiMA.Core.conditions.PastEventCondition
-
- All Implemented Interfaces:
IGroundable,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
RecentEventCondition
public class PastEventCondition extends PredicateCondition
- Author:
- User
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPastEventCondition()PastEventCondition(boolean occurred, short type, short status, Name event)PastEventCondition(boolean occurred, short type, short status, Symbol subject, Symbol action, Symbol target, java.util.ArrayList<Symbol> parameters)PastEventCondition(boolean occurred, Event e)PastEventCondition(PastEventCondition pEC)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanCheckCondition(AgentModel am)Checks if the EventCondition is verified in the agent's AutobiographicalMemoryjava.lang.Objectclone()Clones this Predicate, returning an equal copy.protected java.util.ArrayList<ActionDetail>GetPossibleBindings(AgentModel am)protected java.util.ArrayList<SearchKey>GetSearchKeys()java.util.ArrayList<SubstitutionSet>GetValidBindings(AgentModel am)This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's AutobiographicalMemorybooleanisGrounded()Indicates if the Predicate is grounded (no unbound variables in it's WFN) Example: Stronger(Luke,John) is grounded while Stronger(John,[X]) is not.voidMakeGround(Substitution subst)Applies a set of substitutions to the object, grounding it.voidMakeGround(java.util.ArrayList<Substitution> bindings)Applies a set of substitutions to the object, grounding it.static PastEventConditionParseEvent(org.xml.sax.Attributes attributes)Parses a RecentEventCondition given a XML attribute listvoidReplaceUnboundVariables(int variableID)Replaces all unbound variables in the object by applying a numeric identifier to each one.-
Methods inherited from class FAtiMA.Core.conditions.PredicateCondition
getPositive, GetValue, GetValueBindings, isPositive, ParsePredicate, setPositive, toString
-
Methods inherited from class FAtiMA.Core.conditions.Condition
CheckActivation, getName, getToM, hasChangedVerifiability, isVerifiable, setName, setToM, setVerifiable
-
-
-
-
Constructor Detail
-
PastEventCondition
protected PastEventCondition()
-
PastEventCondition
public PastEventCondition(boolean occurred, short type, short status, Symbol subject, Symbol action, Symbol target, java.util.ArrayList<Symbol> parameters)
-
PastEventCondition
public PastEventCondition(boolean occurred, Event e)
-
PastEventCondition
public PastEventCondition(boolean occurred, short type, short status, Name event)
-
PastEventCondition
public PastEventCondition(PastEventCondition pEC)
-
-
Method Detail
-
ParseEvent
public static PastEventCondition ParseEvent(org.xml.sax.Attributes attributes)
Parses a RecentEventCondition given a XML attribute list- Parameters:
attributes- - A list of XMl attributes- Returns:
- - the EventCondition Parsed
-
clone
public java.lang.Object clone()
Description copied from class:PredicateConditionClones this Predicate, returning an equal copy. If this clone is changed afterwards, the original object remains the same.- Overrides:
clonein classPredicateCondition- Returns:
- The Predicates's copy.
-
isGrounded
public boolean isGrounded()
Description copied from class:ConditionIndicates if the Predicate is grounded (no unbound variables in it's WFN) Example: Stronger(Luke,John) is grounded while Stronger(John,[X]) is not.- Specified by:
isGroundedin interfaceIGroundable- Overrides:
isGroundedin classCondition- Returns:
- true if the Predicate is grounded, false otherwise
-
ReplaceUnboundVariables
public void ReplaceUnboundVariables(int variableID)
Description copied from class:ConditionReplaces all unbound variables in the object by applying a numeric identifier to each one. For example, the variable [x] becomes [x4] if the received ID is 4. Attention, this method modifies the original object.- Specified by:
ReplaceUnboundVariablesin interfaceIGroundable- Overrides:
ReplaceUnboundVariablesin classCondition- Parameters:
variableID- - the identifier to be applied
-
MakeGround
public void MakeGround(java.util.ArrayList<Substitution> bindings)
Description copied from class:ConditionApplies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.- Specified by:
MakeGroundin interfaceIGroundable- Overrides:
MakeGroundin classCondition- Parameters:
bindings- - A list of substitutions of the type "[Variable]/value"- See Also:
Substitution
-
MakeGround
public void MakeGround(Substitution subst)
Description copied from class:ConditionApplies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.- Specified by:
MakeGroundin interfaceIGroundable- Overrides:
MakeGroundin classCondition- Parameters:
subst- - a substitution of the type "[Variable]/value"- See Also:
Substitution
-
GetPossibleBindings
protected java.util.ArrayList<ActionDetail> GetPossibleBindings(AgentModel am)
-
GetValidBindings
public java.util.ArrayList<SubstitutionSet> GetValidBindings(AgentModel am)
This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's AutobiographicalMemory- Overrides:
GetValidBindingsin classCondition- Returns:
- A list with all SubstitutionsSets that make the condition valid
- See Also:
AutobiographicalMemory
-
CheckCondition
public boolean CheckCondition(AgentModel am)
Checks if the EventCondition is verified in the agent's AutobiographicalMemory- Overrides:
CheckConditionin classPredicateCondition- Returns:
- true if the PastPredicate is verified, false otherwise
- See Also:
AutobiographicalMemory
-
GetSearchKeys
protected java.util.ArrayList<SearchKey> GetSearchKeys()
-
-