gov.nasa.arc.brahms.common.rt
Class RelationStatement

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.rt.Statement
          extended by gov.nasa.arc.brahms.common.rt.RelationStatement
All Implemented Interfaces:
gov.nasa.arc.brahms.common.IConstants, java.io.Serializable

public class RelationStatement
extends Statement

A RelationStatement defines a state in the world or for an active instance defining a user defined relationship between a concept and a value. The statement can be defined as being true or false.

Version:
3 August 2001
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
 
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
RelationStatement()
          Constructor, creates a new relation statement .
RelationStatement(Concept lhsObject, Relation relation, java.lang.Object rhsValue)
          Constructor, creates a new relation statement with the specified object, relation, value and default truth value of true.
RelationStatement(Concept lhsObject, Relation relation, java.lang.Object rhsValue, int truth)
          Constructor, creates a new relation statement with the specified object, relation, value and truth value.
 
Method Summary
 Concept getLhsObject()
          Returns the left hand side object of the relation as a concept.
 Relation getRelation()
          Returns the relation of the statement.
 int getTruthValue()
          Returns the truth value of the statement.
 void setRelation(Relation relation)
          Sets the relation of the statement.
 void setTruthValue(int truth)
          Sets the truth value of the statement.
 java.lang.String toString()
          Returns a string representation of this relation statement.
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.Statement
getRhsValue, getRhsValueType, setLhsObject, setRhsValue, setRhsValueType
 
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, setID, setLine, setLoaded, setResolved, setSerialNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationStatement

public RelationStatement()
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new relation statement .

Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException

RelationStatement

public RelationStatement(Concept lhsObject,
                         Relation relation,
                         java.lang.Object rhsValue)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new relation statement with the specified object, relation, value and default truth value of true.

Parameters:
lhsObject - the left hand side concept
relation - the relation between the lhs and rhs
rhsValue - the right hand side value
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null lhsObject, relation or rhsValue is specified

RelationStatement

public RelationStatement(Concept lhsObject,
                         Relation relation,
                         java.lang.Object rhsValue,
                         int truth)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new relation statement with the specified object, relation, value and truth value.

Parameters:
lhsObject - the left hand side concept
relation - the relation between the lhs and rhs
rhsValue - the right hand side value
truth - the truth value of the state
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null lhsObject, relation or rhsValue is specified
Method Detail

getLhsObject

public Concept getLhsObject()
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the left hand side object of the relation as a concept.

Overrides:
getLhsObject in class Statement
Returns:
Concept the left hand side concept
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no lhs is specified

setRelation

public void setRelation(Relation relation)
                 throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the relation of the statement.

Parameters:
relation - the Relation
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null relation is specified

getRelation

public Relation getRelation()
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the relation of the statement.

Returns:
Relation the relation
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no relation is specified

setTruthValue

public void setTruthValue(int truth)
Sets the truth value of the statement.

Parameters:
truth - TRUE if the statement is true, FALSE if it false, UNKNOWN if it is unknown
See Also:
gov.nasa.arc.brahms.common.IConstants.TRUE, gov.nasa.arc.brahms.commonIConstants.FALSE, gov.nasa.arc.brahms.commonIConstants.UNKNOWN

getTruthValue

public int getTruthValue()
Returns the truth value of the statement.

Returns:
int TRUE if the statement is true, FALSE if it false, UNKNOWN if it is unknown
See Also:
gov.nasa.arc.brahms.common.IConstants.TRUE, gov.nasa.arc.brahms.commonIConstants.FALSE, gov.nasa.arc.brahms.commonIConstants.UNKNOWN

toString

public java.lang.String toString()
Returns a string representation of this relation statement.

Overrides:
toString in class java.lang.Object
Returns:
String the string representation of this statement


Copyright © 1997-2012 All Rights Reserved.