gov.nasa.arc.brahms.vm.api.common
Interface IAttributeTuple

All Superinterfaces:
ITuple

public interface IAttributeTuple
extends ITuple

IAttributeTuple is a wrapper interface for an attribute based tuple specifying the state represented by an IStatement (IBelief or IFact). The state of an attribute tuple specifies the value for an attribute of a concept.

Version:
$Revision: 1.1 $ $Date: 2009/11/23 18:37:46 $ $Author: rnado $
Author:
Ron van Hoof
See Also:
ITuple

Method Summary
 boolean getBooleanRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 byte getByteRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 char getCharRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 IConcept getConceptRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 double getDoubleRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 float getFloatRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 int getIntRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 IAttribute getLhsAttribute()
          Returns the attribute for which the value is specified in this tuple.
 java.lang.Object getLhsCollectionIndex()
          Returns the collection index/key for the collection.
 long getLongRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 int getRelationalOperator()
          Returns the relational operator specifying whether the attribute of the left hand side concept is equals or not equal to the right hand side value specified by this tuple.
 java.lang.Object getRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 short getShortRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 java.lang.String getStringRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 java.lang.String getSymbolRhsValue()
          Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept.
 IUnknown getUnknownRhsValue()
          Returns value 'unknown' as the right hand side value of the tuple if this value is indeed 'unknown'.
 
Methods inherited from interface gov.nasa.arc.brahms.vm.api.common.ITuple
getLhsConcept, getLhsObject
 

Method Detail

getLhsAttribute

IAttribute getLhsAttribute()
                           throws ExternalException
Returns the attribute for which the value is specified in this tuple.

Returns:
IAttribute the left hand side attribute
Throws:
ExternalException - if an internal error occurs

getLhsCollectionIndex

java.lang.Object getLhsCollectionIndex()
                                       throws ExternalException
Returns the collection index/key for the collection. The collection index can be an integer or a String.

Returns:
Object one of Integer or String being the index/key for the collection
Throws:
ExternalException - if the left-hand side attribute is not of a collection type or if no collection index is specified.

getRelationalOperator

int getRelationalOperator()
                          throws ExternalException
Returns the relational operator specifying whether the attribute of the left hand side concept is equals or not equal to the right hand side value specified by this tuple.

Returns:
int the relational operator, one of IRelationalOperator.EQUALS or IRelationalOperator.NOT_EQUALS
Throws:
ExternalException - if an internal error occurs
See Also:
IRelationalOperator.EQUALS, IRelationalOperator.NOT_EQUALS

getRhsValue

java.lang.Object getRhsValue()
                             throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. If the right hand side value is of one of the primitive types int, double or boolean then its value is wrapped in its object counterpart (Integer, Double, Boolean). If the rhs value is 'unknown' an instance of IUnknown is returned.

Returns:
Object the right hand side value
Throws:
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

getIntRhsValue

int getIntRhsValue()
                   throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer, otherwise an exception is thrown.

Returns:
int the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getCharRhsValue

char getCharRhsValue()
                     throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer, otherwise an exception is thrown.

Returns:
char the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getByteRhsValue

byte getByteRhsValue()
                     throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer, otherwise an exception is thrown.

Returns:
byte the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getShortRhsValue

short getShortRhsValue()
                       throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer, otherwise an exception is thrown.

Returns:
short the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getLongRhsValue

long getLongRhsValue()
                     throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be a long, otherwise an exception is thrown.

Returns:
long the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getFloatRhsValue

float getFloatRhsValue()
                       throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer, otherwise an exception is thrown.

Returns:
float the right hand side value
Throws:
ExternalException - if the attribute's type is not int or if an internal error occurs.

getDoubleRhsValue

double getDoubleRhsValue()
                         throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an integer or double, otherwise an exception is thrown.

Returns:
double the right hand side value
Throws:
ExternalException - if the attribute's type is not int or double or if an internal error occurs.

getBooleanRhsValue

boolean getBooleanRhsValue()
                           throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be a boolean, otherwise an exception is thrown.

Returns:
boolean the right hand side value
Throws:
ExternalException - if the attribute's type is not boolean or if an internal error occurs.

getSymbolRhsValue

java.lang.String getSymbolRhsValue()
                                   throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be a symbol, otherwise an exception is thrown.

Returns:
String the right hand side value
Throws:
ExternalException - if the attribute's type is not symbol or if an internal error occurs.

getStringRhsValue

java.lang.String getStringRhsValue()
                                   throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be a symbol or string, otherwise an exception is thrown.

Returns:
String the right hand side value
Throws:
ExternalException - if the attribute's type is not symbol or string or if an internal error occurs.

getConceptRhsValue

IConcept getConceptRhsValue()
                            throws ExternalException
Returns the right hand side value of the tuple, specifying the value for the left hand side attribute of the left hand side concept. The type of the attribute must be an IMetaType or IUserDefinedType, otherwise an exception is thrown.

Returns:
String the right hand side value
Throws:
ExternalException - if the attribute's type is not IMetaType or IUserDefinedType or if an internal error occurs.

getUnknownRhsValue

IUnknown getUnknownRhsValue()
                            throws ExternalException
Returns value 'unknown' as the right hand side value of the tuple if this value is indeed 'unknown'. If the value is not 'unknown' an exception is thrown.

Returns:
IUnknown the 'unknown' value
Throws:
ExternalException - if the right hand side value is not 'unknown'.
See Also:
IUnknown.UNKNOWN


Copyright © 1997-2012 All Rights Reserved.