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

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.AttributeStatement
All Implemented Interfaces:
gov.nasa.arc.brahms.common.IConstants, java.io.Serializable

public class AttributeStatement
extends Statement

A AttributeStatement defines a state in the world or for an active instance defining the value for a concept's attribute.

Version:
$Revision: 1.4 $ $Date: 2009/11/23 19:12:22 $ $Author: rnado $
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
AttributeStatement()
          Constructor, creates a new attribute statement.
AttributeStatement(java.lang.Object lhsObject, Attribute lhsAttribute, int lhsCollectionIndex, int relation, java.lang.Object rhsValue, int rhsValueType)
          Constructor, creates a new attribute statement with the specified object, attribute, collection index, relation, and value.
AttributeStatement(java.lang.Object lhsObject, Attribute lhsAttribute, int relation, java.lang.Object rhsValue)
          Constructor, creates a new attribute statement with the specified object, attribute, relation, and value.
AttributeStatement(java.lang.Object lhsObject, Attribute lhsAttribute, java.lang.String lhsCollectionIndex, int relation, java.lang.Object rhsValue, int rhsValueType)
          Constructor, creates a new attribute statement with the specified object, attribute, collection index, relation, and value.
 
Method Summary
 Attribute getLhsAttribute()
          Returns the left hand side attribute.
 java.lang.Object getLhsCollectionIndex()
          Returns the collection index for the left hand side attribute.
 int getRelation()
          Returns the relation of the statement.
 void setLhsAttribute(Attribute lhsAttribute)
          Sets the left hand side attribute of the relation.
 void setLhsCollectionIndex(int index)
          Sets the collection index for the left hand side attribute.
 void setLhsCollectionIndex(java.lang.String key)
          Sets the collection index for the left hand side attribute.
 void setRelation(int relation)
          Sets the relation 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
getLhsObject, 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

AttributeStatement

public AttributeStatement()
Constructor, creates a new attribute statement.


AttributeStatement

public AttributeStatement(java.lang.Object lhsObject,
                          Attribute lhsAttribute,
                          int relation,
                          java.lang.Object rhsValue)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new attribute statement with the specified object, attribute, relation, and value.

Parameters:
lhsObject - the left hand side Object
lhsAttribute - the left hand side Attribute
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, attribute or value is specified of if an invalid relation is specified

AttributeStatement

public AttributeStatement(java.lang.Object lhsObject,
                          Attribute lhsAttribute,
                          java.lang.String lhsCollectionIndex,
                          int relation,
                          java.lang.Object rhsValue,
                          int rhsValueType)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new attribute statement with the specified object, attribute, collection index, relation, and value.

Parameters:
lhsObject - the left hand side Object
lhsAttribute - the left hand side Attribute
lhsCollectionIndex - the collection index/key for the lhs attribute
relation - the relation between the lhs and rhs
rhsValue - the right hand side value
rhsValueType - the type of the right hand side value
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null lhsObject, attribute or value is specified of if an invalid relation is specified
See Also:
IConstants.INT, IConstants.CHAR, IConstants.BYTE, IConstants.SHORT, IConstants.LONG, IConstants.FLOAT, IConstants.DOUBLE, IConstants.BOOLEAN, IConstants.STRING, IConstants.SYMBOL, IConstants.UDT, IConstants.JAVA_TYPE, IConstants.UNKNOWN

AttributeStatement

public AttributeStatement(java.lang.Object lhsObject,
                          Attribute lhsAttribute,
                          int lhsCollectionIndex,
                          int relation,
                          java.lang.Object rhsValue,
                          int rhsValueType)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Constructor, creates a new attribute statement with the specified object, attribute, collection index, relation, and value.

Parameters:
lhsObject - the left hand side Object
lhsAttribute - the left hand side Attribute
lhsCollectionIndex - the collection index for the lhs attribute
relation - the relation between the lhs and rhs
rhsValue - the right hand side value
rhsValueType - the type of the right hand side value
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null lhsObject, attribute or value is specified of if an invalid relation is specified
See Also:
IConstants.INT, IConstants.CHAR, IConstants.BYTE, IConstants.SHORT, IConstants.LONG, IConstants.FLOAT, IConstants.DOUBLE, IConstants.BOOLEAN, IConstants.STRING, IConstants.SYMBOL, IConstants.UDT, IConstants.JAVA_TYPE, IConstants.UNKNOWN
Method Detail

setLhsAttribute

public void setLhsAttribute(Attribute lhsAttribute)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the left hand side attribute of the relation.

Parameters:
lhsAttribute - the left hand side Attribute
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null lhsAttribute is specified

getLhsAttribute

public Attribute getLhsAttribute()
                          throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the left hand side attribute.

Returns:
Attribute the left hand side attribute
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no lhs attribute is specified

setLhsCollectionIndex

public void setLhsCollectionIndex(java.lang.String key)
Sets the collection index for the left hand side attribute.

Parameters:
key - the key serving as the index for the collection

setLhsCollectionIndex

public void setLhsCollectionIndex(int index)
Sets the collection index for the left hand side attribute.

Parameters:
index - the index for the collection

getLhsCollectionIndex

public java.lang.Object getLhsCollectionIndex()
Returns the collection index for the left hand side attribute.

Returns:
Object one of String or Integer, null if no collection index is set

setRelation

public void setRelation(int 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 an invalid relation is specified
See Also:
IConstants.EQ, IConstants.NE, IConstants.LT, IConstants.LE, IConstants.GT, IConstants.GE

getRelation

public int 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
See Also:
IConstants.EQ, IConstants.NE, IConstants.LT, IConstants.LE, IConstants.GT, IConstants.GE

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.