gov.nasa.arc.brahms.vm.api.jac
Class AbstractExternalActivity

java.lang.Object
  extended by gov.nasa.arc.brahms.vm.api.jac.AbstractExternalActivity
All Implemented Interfaces:
IExternalActivity
Direct Known Subclasses:
AddObjectToArrayActivity, AddTimeActivity, ConvertToTimeZoneActivity, CopyFileActivity, CreateArrayActivity, CreateCommunicativeActActivity, CreateExternalAgentActivity, DeleteFileActivity, DeregisterFromAgentMonitorActivity, FileExistsActivity, FindAgent, FindObject, GetArrayLengthActivity, GetCalendarActivity, GetCommunicativeActProperty, GetCurrentTimeActivity, GetJavaAttributeValueActivity, GetObjectAtActivity, GetPropertyValueActivity, GetTimeStampActivity, GetTomorrowActivity, GetYesterdayActivity, InDateRangeActivity, LoadPropertiesActivity, ParsePrimitiveValueActivity, PrintBeliefActivity, PrintFactActivity, PrintlnActivity, ReadBeliefsActivity, RegisterWithAgentMonitorActivity, ReplaceActivity, RetractBeliefsActivity, RetractCommunicativeActActivity, RetractFactsActivity, RTPrimitiveActivity, SendBeliefsActivity, SendCommunicativeActActivity, SetCommunicativeActProperty, SetJavaAttributeValueActivity, SetPropertyValueActivity, ToIntActivity, VerifyChecksumActivity

public abstract class AbstractExternalActivity
extends java.lang.Object
implements IExternalActivity

The AbstractExternalActivity is an interface for external activities implemented in Java called by Brahms Java activities. The external activity can perform any Java actions. This abstract class provides access to parameters passed to Brahms Java activities, and allows for adding bindings to unbound variables passed to Brahms java activities through parameters. Any class extending from this class is required to have a constructor with as parameter an IJavaActivityCtx. The activity will be passed to the external activity by the virtual machine.

Version:
$Revision: 1.1 $ $Date: 2007/10/10 14:03:30 $ $Author: rvhoof $
Author:
Ron van Hoof

Constructor Summary
AbstractExternalActivity()
          Constructor, creates a new AbstractExternalActivity
 
Method Summary
protected  void assertBelief(IBelief belief)
          Schedules the assertion of the specified belief to the belief set of the active instance performing this activity.
protected  void assertFact(IFact fact)
          Schedules the assertion of the specified fact into the world state including the distribution of the fact to all agents and objects.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, boolean value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, double value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, IConcept value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, boolean value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, double value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IConcept value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, int value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, int value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IUnknown value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, long value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.io.Serializable value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Serializable Object.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.lang.String value, boolean symbol, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, IUnknown value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, long value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, java.util.Map collection, int beliefcertainty, int factcertainty)
          Concludes new IFact(s) and/or IBelief(s) of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, java.io.Serializable value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Serializable Object.
 IStatement[] conclude(IConcept concept, IAttribute attribute, int relop, java.lang.String value, boolean symbol, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, boolean value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, double value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IConcept value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, int value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IUnknown value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, long value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.io.Serializable value, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Serializable Object.
 IStatement[] conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.lang.String value, boolean symbol, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String.
 IStatement[] conclude(IConcept lhsConcept, IRelation relation, IConcept rhsConcept, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept relation concept.
 IStatement[] conclude(IConcept lhsConcept, IRelation relation, IConcept rhsConcept, int truthValue, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept relation concept with the specified truth value.
 IStatement[] conclude(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept relation concept.
 IStatement[] conclude(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept, int truthValue, int beliefcertainty, int factcertainty)
          Concludes a new IBelief and/or IFact of the form concept relation concept with the specified truth value.
abstract  void doActivity()
          Executes the java activity code.
protected  IContext getContext()
          Returns this activity's context
protected  IModel getModel()
          Returns a reference to the model loaded in the virtual machine.
 java.lang.String getName()
          Returns the name of this activity
protected  IParameter getParameter(java.lang.String name)
          Returns the parameter with the specified name defined for the external activity.
protected  int getParameterCount()
          Returns the number of parameters specified for the activity.
protected  IActiveInstance getPerformedBy()
          Returns the active instance (agent or object) performing this activity.
protected  IVMController getVMController()
          Returns the virtual machine's controller usable by this activity.
protected  IWorldState getWorldState()
          Returns a reference to the world state managing the fact set.
 boolean isValidTruthValue(int truth)
          Checks whether the specified value is a valid truth value.
protected  void retractBelief(IBelief belief)
          Schedules the retraction of the specified belief from the belief set of the active instance performing this activity.
protected  void retractFact(IFact fact)
          Schedules the retraction of the specified fact from the world state including the notification of the retraction to all agents and objects.
protected  void send(IBelief[] beliefs, IActiveInstance agent)
          Sends the specified set of beliefs to the specified agent, causing the assertion of the beliefs in the specified agent's belief set.
protected  void send(IBelief[] beliefs, IActiveInstance[] agents)
          Sends the specified beliefs to the specified agents, causing the assertion of the beliefs in the belief set of every agent in the list of agents.
protected  void send(IBelief belief, IActiveInstance agent)
          Sends the specified belief to the specified agent, causing the assertion of the belief in the specified agent's belief set.
protected  void send(IBelief belief, IActiveInstance[] agents)
          Sends the specified belief to the specified agents, causing the assertion of the belief in the belief set of every agent in the list of agents.
 void setActivity(gov.nasa.arc.brahms.common.rt.IJavaActivityCtx activity)
          Sets the activity to be wrapped by this external activity.
 void setProperties(java.util.Properties p)
          Sets the properties for the activity.
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractExternalActivity

public AbstractExternalActivity()
Constructor, creates a new AbstractExternalActivity

Method Detail

setActivity

public final void setActivity(gov.nasa.arc.brahms.common.rt.IJavaActivityCtx activity)
                       throws ExternalException
Sets the activity to be wrapped by this external activity. This method is called by the virtual machine and can not be called in the doActivity method.

Parameters:
activity - the IJavaActivityCtx for the Java activity
Throws:
ExternalException - if a null activity is specified or if the external activity already wraps another activity

setProperties

public final void setProperties(java.util.Properties p)
                         throws ExternalException
Sets the properties for the activity. The properties specify the allowed capabilities of the external activity. This method is called by the virtual machine and can not be called in the doActivity method.

Parameters:
p - the Properties set by the virtual machine.
Throws:
ExternalException - if the properties were already set.

getName

public final java.lang.String getName()
                               throws ExternalException
Returns the name of this activity

Returns:
String the activity's name
Throws:
ExternalException - if no Brahms activity is associated with this external activity

getContext

protected final IContext getContext()
Returns this activity's context

Returns:
IContext the context for this activity

doActivity

public abstract void doActivity()
                         throws ExternalException
Executes the java activity code.

Specified by:
doActivity in interface IExternalActivity
Throws:
ExternalException - if an internal error occurs

getVMController

protected final IVMController getVMController()
                                       throws ExternalException
Returns the virtual machine's controller usable by this activity.

Returns:
IVMController the virtual machine's controller
Throws:
ExternalException - if there is an internal error retrieving the virtual machine's controller

getParameterCount

protected final int getParameterCount()
                               throws ExternalException
Returns the number of parameters specified for the activity.

Returns:
int the number of parameters
Throws:
ExternalException - if an internal error occurs

getParameter

protected final IParameter getParameter(java.lang.String name)
                                 throws ExternalException
Returns the parameter with the specified name defined for the external activity. If no parameter with such name exists an exception is thrown.

Parameters:
name - the name of the requested parameter
Returns:
IParameter an interface to the parameter and its value.
Throws:
ExternalException - if the parameter could not be found.

getPerformedBy

protected final IActiveInstance getPerformedBy()
                                        throws ExternalException
Returns the active instance (agent or object) performing this activity.

Returns:
IActiveInstance the agent or object performing this activity
Throws:
ExternalException - if an internal error occurs

getModel

protected final IModel getModel()
                         throws ExternalException
Returns a reference to the model loaded in the virtual machine.

Returns:
IModel the model loaded in the virtual machine.
Throws:
ExternalException - is an internal error occurs.

getWorldState

protected final IWorldState getWorldState()
                                   throws ExternalException
Returns a reference to the world state managing the fact set.

Returns:
IWorldState the virtual machine's world state
Throws:
ExternalException - if an internal error occurs.

isValidTruthValue

public final boolean isValidTruthValue(int truth)
Checks whether the specified value is a valid truth value.

Parameters:
truth - the truth value to be tested
Returns:
true if the truth value is valid, false otherwise

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   IUnknown value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'. The attribute's type is not relevant. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the 'unknown' value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.
See Also:
IUnknown.UNKNOWN

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   int value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the integer value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   long value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the long value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   double value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. The attribute's type must be double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the double value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   boolean value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean. The attribute's type must be boolean. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the boolean value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   java.lang.String value,
                                   boolean symbol,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String. The attribute's type must be symbol or string. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the String value to be assigned to the attribute
symbol - indicates if the value is a symbol or string
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   IConcept value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept. The attribute's type must be an IMetaType or IConcept. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the IConcept value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int relop,
                                   java.io.Serializable value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Serializable Object. The attribute's type must be IJavaType. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the Java Serializable Object to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept. if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int collectionIndex,
                                   int relop,
                                   IUnknown value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'. The attribute's type is not relevant. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the 'unknown' value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.
See Also:
IUnknown.UNKNOWN

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   java.lang.String collectionIndex,
                                   int relop,
                                   IUnknown value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'. The attribute's type is not relevant. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the 'unknown' value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.
See Also:
IUnknown.UNKNOWN

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int collectionIndex,
                                   int relop,
                                   int value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the integer value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   java.lang.String collectionIndex,
                                   int relop,
                                   int value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the integer value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int collectionIndex,
                                   int relop,
                                   long value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the long value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   java.lang.String collectionIndex,
                                   int relop,
                                   long value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. The attribute's type must be int or double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the long value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int collectionIndex,
                                   int relop,
                                   double value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. The attribute's type must be double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the double value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   java.lang.String collectionIndex,
                                   int relop,
                                   double value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. The attribute's type must be double. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the double value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty - the percentage certainty that the fact indeed is created
Returns:
IStatement[] contains up to two elements, one being an IBelief and one being an IFact, depending on the certainty. The first slot is for an IBelief, the second one for an IFact. IBelief and IFact are wrappers for the created belief and fact that are scheduled for assertion. The IStatement array is null if neither has been created due to the certainty values.
Throws:
ExternalException - if the attribute is not specified for the given concept, if the attribute is not of a collection type, if the collection index is invalid, if the attribute is the location attribute, if an invalid relational operator is specified or if the fact/belief certainty is less than 0 or more than 100.

conclude

public final IStatement[] conclude(IConcept concept,
                                   IAttribute attribute,
                                   int collectionIndex,
                                   int relop,
                                   boolean value,
                                   int beliefcertainty,
                                   int factcertainty)
                            throws ExternalException
Concludes a new IBelief and/or IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean. The attribute's type must be boolean. The belief is scheduled for assertion in the current agent's belief set, the fact is scheduled for assertion in the world state.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the IAttribute defined for the concept to which to assign a value
collectionIndex - the index/key in the collection for the specified value
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the boolean value to be assigned to the attribute
beliefcertainty - the percentage certainty that the belief indeed is created
factcertainty