|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.data.BrahmsObject gov.nasa.arc.brahms.common.data.ModelElement gov.nasa.arc.brahms.common.data.Condition gov.nasa.arc.brahms.common.data.Consequence
public class Consequence
A consequences is a logical statement for concluding/asserting new beliefs for an agent or object and/or facts in the world.
Field Summary | |
---|---|
static java.lang.String |
BELIEF_CERTAINTY_PROPERTY
Configuration property name for belief certainty |
static java.lang.String |
BELIEF_CHANGE_SUPPORT_PROPERTY
Configuration property name for belief change support |
static java.lang.String |
CHANGE_SUPPORT_PROPERTY
Configuration property name for change support |
static java.lang.String |
FACT_CERTAINTY_PROPERTY
Configuration property name for fact certainty |
static java.lang.String |
FACT_CHANGE_SUPPORT_PROPERTY
Configuration property name for fact change support |
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants |
---|
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML |
Constructor Summary | |
---|---|
Consequence()
Constructor, creates a new Consequence. |
|
Consequence(Comparison c)
Constructor, creates a new Consequence with the specified Comparison specifying the conditional expression with a truth value of TRUE and a belief and fact certainty of 100. |
|
Consequence(Comparison c,
int truth)
Constructor, creates a new Consequence with the specified Comparison specifying the conditional expression with the specified truth value and a belief and fact certainty of 100. |
|
Consequence(Comparison c,
int bc,
int fc)
Constructor, creates a new Consequence with the specified Comparison specifying the conditional expression with a truth value of TRUE and with the specified belief and fact certainties. |
|
Consequence(Comparison c,
int truth,
int bc,
int fc)
Constructor, creates a new Consequence with the specified Comparison specifying the conditional expression and with the specified truth value, belief and fact certainty. |
|
Consequence(java.util.List<Comparison> comparisons,
int truth,
int bc,
int fc)
Constructor, creates a new Consequence with the specified Comparisons specifying the conditional expression and with the specified truth value, belief and fact certainty. |
Method Summary | |
---|---|
IConsequenceCtx |
createContext()
Creates a new context for this consequence. |
int |
getBeliefCertainty()
Returns the certainty with which the consequence asserts a belief (0-100). |
java.util.List<Comparison> |
getComparisons()
Returns the comparisons defining the expression for concluding new state. |
int |
getFactCertainty()
Returns the certainty with which the consequence asserts a fact (0-100). |
boolean |
isBeliefChangeSupportEnabled()
Indicates whether to register property change support to automatically assert beliefs for property value changes for Java properties if the lhs object in a comparison is of a java type and that objects implements a property change support interface. |
boolean |
isExpanded()
|
boolean |
isFactChangeSupportEnabled()
Indicates whether to register property change support to automatically assert facts for property value changes for Java properties if the lhs object in a comparison is of a java type and that objects implements a property change support interface. |
void |
setBeliefCertainty(int bc)
Sets the certainty with which the consequence asserts a belief (0-100). |
void |
setBeliefChangeSupportEnabled(boolean enabled)
Sets whether to register property change support to automatically assert beliefs for property value changes for Java properties if the lhs object in a comparison is of a java type and that objects implements a property change support interface. |
void |
setComparisons(java.util.List<Comparison> comparisons)
Sets the comparisons defining the expression for concluding new state. |
void |
setExpanded(boolean expanded)
|
void |
setFactCertainty(int fc)
Sets the certainty with which the consequence asserts a fact (0-100). |
void |
setFactChangeSupportEnabled(boolean enabled)
Sets whether to register property change support to automatically assert facts for property value changes for Java properties if the lhs object in a comparison is of a java type and that objects implements a property change support interface. |
protected void |
setID()
Sets the unique identifier. |
java.lang.String |
toSource()
Returns a source code representation for the consequence. |
java.lang.String |
toString()
Returns a String representation of the Consequence. |
Methods inherited from class gov.nasa.arc.brahms.common.data.Condition |
---|
getComparison, getOwner, getParameters, getTruthValue, getTruthValueAsString, getVariables, setComparison, setOwner, setOwner, setOwner, setTruthValue |
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject |
---|
delete, export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setLine, setLoaded, setResolved, setSerialNumber |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FACT_CERTAINTY_PROPERTY
public static final java.lang.String BELIEF_CERTAINTY_PROPERTY
public static final java.lang.String BELIEF_CHANGE_SUPPORT_PROPERTY
public static final java.lang.String FACT_CHANGE_SUPPORT_PROPERTY
public static final java.lang.String CHANGE_SUPPORT_PROPERTY
Constructor Detail |
---|
public Consequence()
public Consequence(Comparison c)
c
- the Comparisonpublic Consequence(Comparison c, int truth)
c
- the Comparisontruth
- the truth value for the resulting belief/factIConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
public Consequence(Comparison c, int bc, int fc)
c
- the Comparisonbc
- the belief certainty percentage (0-100)fc
- the fact certainty percentage (0-100)public Consequence(Comparison c, int truth, int bc, int fc)
c
- the Comparisontruth
- the truth value for the resulting belief/factbc
- the belief certainty percentage (0-100)fc
- the fact certainty percentage (0-100)IConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
public Consequence(java.util.List<Comparison> comparisons, int truth, int bc, int fc)
comparisons
- the Listtruth
- the truth value for the resulting belief/factbc
- the belief certainty percentage (0-100)fc
- the fact certainty percentage (0-100)IConstants.TRUE
,
IConstants.FALSE
,
IConstants.UNKNOWN
Method Detail |
---|
protected void setID()
setID
in class BrahmsObject
public void setComparisons(java.util.List<Comparison> comparisons)
comparisons
- the list of comparisonsComparison
,
ValueComparison
,
ObjectComparison
public java.util.List<Comparison> getComparisons()
Comparison
,
ValueComparison
,
ObjectComparison
public void setBeliefCertainty(int bc)
bc
- the belief certainty percentagepublic int getBeliefCertainty()
public void setFactCertainty(int fc)
fc
- the fact certainty percentagepublic int getFactCertainty()
public void setBeliefChangeSupportEnabled(boolean enabled)
enabled
- true to enable belief change support, false to disable itpublic boolean isBeliefChangeSupportEnabled()
public void setFactChangeSupportEnabled(boolean enabled)
enabled
- true to enable fact change support, false to disable itpublic boolean isFactChangeSupportEnabled()
public void setExpanded(boolean expanded)
public boolean isExpanded()
public IConsequenceCtx createContext()
Note: This method always returns a new instance and does not verify whether one is already created.
public java.lang.String toSource()
toSource
in class Condition
public java.lang.String toString()
toString
in class Condition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |