|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.vm.api.jsvc.AbstractExternalService
public abstract class AbstractExternalService
The AbstractExternalService is the class to be extended from by external services that require interaction with the virtual machine. THe abstract external service provides access to the virtual machine controller's interface to make the virtual machine's public internal services accessible.
IExternalService
Constructor Summary | |
---|---|
AbstractExternalService()
|
Method Summary | |
---|---|
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. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
boolean value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
byte value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a byte. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
char value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a character. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
double value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
float value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a float. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
IConcept value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
boolean value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
byte value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a byte. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
char value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a character. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
double value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
float value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a float. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
IConcept value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
int value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
int value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
IUnknown value,
int factcertainty)
Concludes a new 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'. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
long value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a long. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
java.lang.Object value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Object. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
java.io.Serializable value,
int factcertainty)
Concludes a new 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. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
short value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a short. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int collectionIndex,
int relop,
java.lang.String value,
boolean symbol,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
IUnknown value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is the value 'unknown'. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
long value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. |
IFact[] |
conclude(IConcept concept,
IAttribute attribute,
int relop,
java.util.Map collection,
int factcertainty)
Concludes new IFact(s) of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
java.lang.Object value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Object. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
java.io.Serializable value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Serializable. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
short value,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a short. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
int relop,
java.lang.String value,
boolean symbol,
int factcertainty)
Concludes a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
boolean value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a boolean. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
byte value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a byte. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
char value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a character. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
double value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a double. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
float value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a float. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
IConcept value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an IConcept. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
int value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is an integer. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
IUnknown value,
int factcertainty)
Concludes a new 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'. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
long value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a long. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
java.lang.Object value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a Java Object. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
java.io.Serializable value,
int factcertainty)
Concludes a new 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. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
short value,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a short. |
IFact |
conclude(IConcept concept,
IAttribute attribute,
java.lang.String collectionIndex,
int relop,
java.lang.String value,
boolean symbol,
int factcertainty)
Concludes a new IFact of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS and the value is a String. |
IFact |
conclude(IConcept lhsConcept,
IRelation relation,
IConcept rhsConcept,
int factcertainty)
Concludes a new IFact of the form concept relation concept. |
IFact |
conclude(IConcept lhsConcept,
IRelation relation,
IConcept rhsConcept,
int truthValue,
int factcertainty)
Concludes a new IFact of the form concept relation concept with the specified truth value. |
IFact |
conclude(IConcept lhsConcept,
IRelation relation,
IUnknown rhsConcept,
int factcertainty)
Concludes a new IFact of the form concept relation concept. |
IFact |
conclude(IConcept lhsConcept,
IRelation relation,
IUnknown rhsConcept,
int truthValue,
int factcertainty)
Concludes a new IFact of the form concept relation concept with the specified truth value. |
protected IContext |
getContext()
Returns this service's context |
abstract java.lang.String |
getID()
Returns the unique identifier for the service |
protected IModel |
getModel()
Returns a reference to the model loaded in the virtual machine. |
abstract java.lang.String |
getName()
Returns the name of the service |
IVMController |
getVMController()
Returns the interface to the the virtual machine's controller. |
protected IWorldState |
getWorldState()
Returns a reference to the world state managing the fact set. |
abstract void |
init()
Initializes the service |
boolean |
isValidTruthValue(int truth)
Checks whether the specified value is a valid truth value. |
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 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 |
setProperties(java.util.Properties p)
Sets the properties for the activity. |
abstract void |
start()
Starts the service |
abstract void |
stop()
Ends the service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractExternalService()
Method Detail |
---|
public final void setProperties(java.util.Properties p) throws ExternalException
p
- the Properties set by the virtual machine.
ExternalException
- if the properties were already set.public final IVMController getVMController()
protected final IContext getContext()
protected final IModel getModel() throws ExternalException
ExternalException
- is an internal error occurs.protected final IWorldState getWorldState() throws ExternalException
ExternalException
- if an internal error occurs.public final boolean isValidTruthValue(int truth)
truth
- the truth value to be tested
public final IFact conclude(IConcept concept, IAttribute attribute, int relop, IUnknown value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the value 'unknown' to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.IUnknown.UNKNOWN
public final IFact conclude(IConcept concept, IAttribute attribute, int relop, int value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the integer value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, char value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the character value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, byte value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the byte value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, short value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the short value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, long value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the long value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, float value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the float value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, double value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the double value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, boolean value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the boolean value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, java.lang.String value, boolean symbol, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the String value to be assigned to the attributesymbol
- indicates if the value is a symbol or stringfactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, IConcept value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the IConcept value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, java.io.Serializable value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Serializable to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int relop, java.lang.Object value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Object to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty
is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IUnknown value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the value 'unknown' to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.IUnknown.UNKNOWN
public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IUnknown value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the value 'unknown' to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.IUnknown.UNKNOWN
public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, int value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the integer value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, int value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the integer value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, char value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the character value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, char value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the character value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, byte value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the byte value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, byte value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the byte value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, short value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the short value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, short value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the short value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, long value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the long value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, long value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the long value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, float value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the float value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, float value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the float value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, double value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedcollectionIndex
- the index/key in the collection for the specified valueattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the double value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, double value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedcollectionIndex
- the index/key in the collection for the specified valueattribute
- the IAttribute defined for the concept to which to assign a valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the double value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, boolean value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the boolean value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, boolean value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the boolean value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.lang.String value, boolean symbol, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the String value to be assigned to the attributesymbol
- indicates if the value is a symbol or stringfactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.lang.String value, boolean symbol, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the String value to be assigned to the attributesymbol
- indicates if the value is a symbol or stringfactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IConcept value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the IConcept value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IConcept value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the IConcept value to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.io.Serializable value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Serializable to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.lang.Object value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Object to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.io.Serializable value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Serializable to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public final IFact conclude(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.lang.Object value, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the IAttribute defined for the concept to which to assign a valuecollectionIndex
- the index/key in the collection for the specified valuerelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.value
- the Java Object to be assigned to the attributefactcertainty
- the percentage certainty that the fact indeed is created
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 certainty is less than 0 or more than 100.public IFact[] conclude(IConcept concept, IAttribute attribute, int relop, java.util.Map collection, int factcertainty) throws ExternalException
concept
- the IConcept for which an attribute value is specifiedattribute
- the collection type IAttribute defined for the concept to which to assign the valuesrelop
- the relational operator, one of IRelationalOperator.EQUALS or
IRelationalOperator.NOT_EQUALS.collection
- the index/value pairs to assign to the attributefactcertainty
- the percentage certainty that the fact indeed is created
ExternalException
- if the attribute is not specified for the given concept,
if the attribute is not of a collection type, if a collection index is
invalid, if the attribute is the location attribute, if an invalid relational operator
is specified or if an invalid value is specified.IRelationalOperator.EQUALS
,
IRelationalOperator.NOT_EQUALS
,
IUnknown.UNKNOWN
public final IFact conclude(IConcept lhsConcept, IRelation relation, IConcept rhsConcept, int factcertainty) throws ExternalException
lhsConcept
- the IConcept for which the relation is specifiedrelation
- the IRelation defined for the conceptrhsConcept
- the IUnknown value to be related to the lhsConceptfactcertainty
- the percentage certainty that the fact indeed is created
ExternalException
- if the rhsConcept does not match with the relation's
type, the relation is not specified for the given lhsConcept or if the
fact certainty is less than 0 or more than 100.IUnknown.UNKNOWN
public final IFact conclude(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept, int factcertainty) throws ExternalException
lhsConcept
- the IConcept for which the relation is specifiedrelation
- the IRelation defined for the conceptrhsConcept
- the 'unknown' value to be related to the lhsConceptfactcertainty
- the percentage certainty that the fact indeed is created
ExternalException
- if the rhsConcept does not match with the relation's
type, the relation is not specified for the given lhsConcept or if the
fact certainty is less than 0 or more than 100.public final IFact conclude(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept, int truthValue, int factcertainty) throws ExternalException
lhsConcept
- the IConcept for which the relation is specifiedrelation
- the IRelation defined for the conceptrhsConcept
- the IUnknown value to be related to the lhsConcepttruthValue
- the truth value of the relationship (TRUE, FALSE, UNKNOWN)factcertainty
- the percentage certainty that the fact indeed is created
ExternalException
- if the rhsConcept does not match with the relation's
type, the relation is not specified for the given lhsConcept or if the
fact certainty is less than 0 or more than 100.IUnknown.UNKNOWN
,
ITruthValue.TRUE
,
ITruthValue.FALSE
,
ITruthValue.UNKNOWN
public final IFact conclude(IConcept lhsConcept, IRelation relation, IConcept rhsConcept, int truthValue, int factcertainty) throws ExternalException
lhsConcept
- the IConcept for which the relation is specifiedrelation
- the IRelation defined for the conceptrhsConcept
- the IConcept to be related to the lhsConcepttruthValue
- the truth value of the relationship (TRUE, FALSE, UNKNOWN)factcertainty
- the percentage certainty that the fact indeed is created
ExternalException
- if the rhsConcept does not match with the relation's
type, the relation is not specified for the given lhsConcept or if the
fact certainty is less than 0 or more than 100.ITruthValue.TRUE
,
ITruthValue.FALSE
,
ITruthValue.UNKNOWN
protected final void assertFact(IFact fact) throws ExternalException
fact
- the IFact to be asserted
ExternalException
- if an internal error occursprotected final void retractFact(IFact fact) throws ExternalException
fact
- the IFact to be retracted
ExternalException
- if an internal error occursprotected final void send(IBelief belief, IActiveInstance agent) throws ExternalException
belief
- the IBelief to be send to the specified agentagent
- the IActiveInstance to which to send the belief
ExternalException
- if an internal error occurs
protected final void send(IBelief belief, IActiveInstance[] agents) throws ExternalException
belief
- the IBelief to be send to the specified agentagents
- the list of IActiveInstance to which to send the belief
ExternalException
- if an internal error occurs
protected final void send(IBelief[] beliefs, IActiveInstance agent) throws ExternalException
beliefs
- the list of IBelief to be send to the specified agentagent
- the IActiveInstance to which to send the belief
ExternalException
- if an internal error occurs
public abstract java.lang.String getName()
getName
in interface IExternalService
public abstract java.lang.String getID()
getID
in interface IExternalService
public abstract void init()
init
in interface IExternalService
public abstract void start()
start
in interface IExternalService
public abstract void stop()
stop
in interface IExternalService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |