gov.nasa.arc.brahms.vm.api.common
Class FactFactory

java.lang.Object
  extended by gov.nasa.arc.brahms.vm.api.common.FactFactory

public class FactFactory
extends java.lang.Object

The FactFactory provides methods to create new facts.

Version:
$Revision: 1.5 $ $Date: 2009/11/29 21:46:23 $ $Author: rnado $
Author:
Ron van Hoof

Constructor Summary
FactFactory()
           
 
Method Summary
static IFact createFact(IConcept concept, IAttribute attribute, int relop, boolean value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, byte value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, char value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, double value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, float value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, IConcept value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, int value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, boolean value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, byte value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, char value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, double value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, float value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IConcept value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, int value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, IUnknown value)
          Creates 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'.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, long value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.lang.Object value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.io.Serializable value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, short value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int collectionIndex, int relop, java.lang.String value, boolean symbol)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, IUnknown value)
          Creates 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'.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, long value)
          Creates a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a long.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, java.lang.Object value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, java.io.Serializable value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, short value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, int relop, java.lang.String value, boolean symbol)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, boolean value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, byte value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, char value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, double value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, float value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IConcept value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, int value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, IUnknown value)
          Creates 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'.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, long value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.lang.Object value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.io.Serializable value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, short value)
          Creates 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.
static IFact createFact(IConcept concept, IAttribute attribute, java.lang.String collectionIndex, int relop, java.lang.String value, boolean symbol)
          Creates 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.
static IFact createFact(IConcept lhsConcept, IRelation relation, IConcept rhsConcept)
          Creates a new IFact of the form concept relation concept.
static IFact createFact(IConcept lhsConcept, IRelation relation, IConcept rhsConcept, int truthValue)
          Creates a new IFact of the form concept relation concept.
static IFact createFact(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept)
          Creates a new IFact of the form concept relation concept.
static IFact createFact(IConcept lhsConcept, IRelation relation, IUnknown rhsConcept, int truthValue)
          Creates a new IFact of the form concept relation concept.
static IFact[] createFacts(IConcept concept, IAttribute attribute, int relop, java.util.Map collection)
          Creates new IFact(s) of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactFactory

public FactFactory()
Method Detail

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               IUnknown value)
                        throws ExternalException
Creates 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'.

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 value 'unknown' to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS, IUnknown.UNKNOWN

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               int value)
                        throws ExternalException
Creates 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. The attribute's type must be int, long, float, or double.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               char value)
                        throws ExternalException
Creates 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. The attribute's type must be char, int, long, float, or double.

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 character value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               byte value)
                        throws ExternalException
Creates 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. The attribute's type must be byte, short, int, long, float, or double.

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 byte value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               short value)
                        throws ExternalException
Creates 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. The attribute's type must be short, int, long, float, or double.

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 short value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               long value)
                        throws ExternalException
Creates a new IFact of the form concept.attribute relop value where relop is one of EQUALS or NOT_EQUALS and the value is a long. The attribute's type must be long, float, or double.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               float value)
                        throws ExternalException
Creates 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. The attribute's type must be float or double.

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 float value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               double value)
                        throws ExternalException
Creates 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. The attribute's type must be double.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               boolean value)
                        throws ExternalException
Creates 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. The attribute's type must be boolean.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               java.lang.String value,
                               boolean symbol)
                        throws ExternalException
Creates 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. The attribute's type must be symbol or string.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               IConcept value)
                        throws ExternalException
Creates 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. 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.

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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept, the attribute is the location attribute or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               java.io.Serializable value)
                        throws ExternalException
Creates 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. The attribute's type must be an IJavaType.

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 to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept, the attribute is the location attribute or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int relop,
                               java.lang.Object value)
                        throws ExternalException
Creates 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. The attribute's type must be an IJavaType.

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 Object to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the value does not match with the attribute's type, the attribute is not specified for the given concept, the attribute is the location attribute or if an invalid relational operator is specified.

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               IUnknown value)
                        throws ExternalException
Creates 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'.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the value 'unknown' to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS, IUnknown.UNKNOWN

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               IUnknown value)
                        throws ExternalException
Creates 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'.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the value 'unknown' to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS, IUnknown.UNKNOWN

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               int value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the integer value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               int value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the integer value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               char value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the character value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               char value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the character value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               byte value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the byte value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               byte value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the byte value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               short value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the short value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               short value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the short value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               long value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the long value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               long value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the long value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               float value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the float value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               float value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the float value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               double value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the double value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               double value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the double value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               boolean value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the boolean value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               boolean value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the boolean value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               java.lang.String value,
                               boolean symbol)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 integer index/key if the attribute's type is a collection
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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               java.lang.String value,
                               boolean symbol)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType.

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 String index/key if the attribute's type is a collection
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
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               IConcept value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the IConcept value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               IConcept value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the IConcept value to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               java.io.Serializable value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the Java Serializable to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               int collectionIndex,
                               int relop,
                               java.lang.Object value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 integer index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the Java Object to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               java.io.Serializable value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the Java Serializable to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept concept,
                               IAttribute attribute,
                               java.lang.String collectionIndex,
                               int relop,
                               java.lang.Object value)
                        throws ExternalException
Creates 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. The attribute's type must be an ICollectionType. The attribute name must not be 'location'. The 'location' attribute's value is managed by the virtual machine.

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 String index/key if the attribute's type is a collection
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
value - the Java Object to be assigned to the attribute
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
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 or if an invalid relational operator is specified.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

createFact

public static IFact createFact(IConcept lhsConcept,
                               IRelation relation,
                               IUnknown rhsConcept)
                        throws ExternalException
Creates a new IFact of the form concept relation concept. The truth-value is set to true.

Parameters:
lhsConcept - the IConcept for which the relation is specified
relation - the IRelation defined for the concept
rhsConcept - the IUnknown value to be related to the lhsConcept
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the rhsConcept does not match with the relation's type or the relation is not specified for the given lhsConcept.
See Also:
IUnknown.UNKNOWN

createFact

public static IFact createFact(IConcept lhsConcept,
                               IRelation relation,
                               IConcept rhsConcept)
                        throws ExternalException
Creates a new IFact of the form concept relation concept. The truth-value is set to true.

Parameters:
lhsConcept - the IConcept for which the relation is specified
relation - the IRelation defined for the concept
rhsConcept - the IConcept to be related to the lhsConcept
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the rhsConcept does not match with the relation's type or the relation is not specified for the given lhsConcept.

createFact

public static IFact createFact(IConcept lhsConcept,
                               IRelation relation,
                               IUnknown rhsConcept,
                               int truthValue)
                        throws ExternalException
Creates a new IFact of the form concept relation concept.

Parameters:
lhsConcept - the IConcept for which the relation is specified
relation - the IRelation defined for the concept
rhsConcept - the IUnknown value to be related to the lhsConcept
truthValue - the truth value of the relationship (TRUE, FALSE, UNKNOWN)
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the rhsConcept does not match with the relation's type or the relation is not specified for the given lhsConcept.
See Also:
IUnknown.UNKNOWN, ITruthValue.TRUE, ITruthValue.FALSE, ITruthValue.UNKNOWN

createFact

public static IFact createFact(IConcept lhsConcept,
                               IRelation relation,
                               IConcept rhsConcept,
                               int truthValue)
                        throws ExternalException
Creates a new IFact of the form concept relation concept.

Parameters:
lhsConcept - the IConcept for which the relation is specified
relation - the IRelation defined for the concept
rhsConcept - the IConcept to be related to the lhsConcept
truthValue - the truth value of the relationship (TRUE, FALSE, UNKNOWN)
Returns:
IFact a wrapper for the created fact that can be asserted to or retracted from the world state.
Throws:
ExternalException - if the rhsConcept does not match with the relation's type or the relation is not specified for the given lhsConcept.
See Also:
ITruthValue.TRUE, ITruthValue.FALSE, ITruthValue.UNKNOWN

createFacts

public static IFact[] createFacts(IConcept concept,
                                  IAttribute attribute,
                                  int relop,
                                  java.util.Map collection)
                           throws ExternalException
Creates new IFact(s) of the form concept.attribute(index) relop value where relop is one of EQUALS or NOT_EQUALS. The index/value pairs are specified in the specified collection. The indices must be types as either int or String, the values must be one of IUnknown, int, long, double, boolean, string, symbol or IConcept.

Parameters:
concept - the IConcept for which an attribute value is specified
attribute - the collection type IAttribute defined for the concept to which to assign the values
relop - the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS.
collection - the index/value pairs to assign to the attribute
Returns:
IFact[] the wrappers for the created facts that can be asserted to or retracted from the world state.
Throws:
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.
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS, IUnknown.UNKNOWN


Copyright © 1997-2012 All Rights Reserved.