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


public interface IParameter

The IParameter interface is an interface to a parameter passed to a java activity allowing access to its value.


Field Summary
static int BOOLEAN
          The constant indicating the value is a boolean
static int CONCEPT
          The constant indicating the value is a concept
static int DOUBLE
          The constant indicating the value is a double
static int INT
          The constant indicating the value is an integer
static int STRING
          The constant indicating the value is a string
static int SYMBOL
          The constant indicating the value is a symbol
static int UNKNOWN
          The constant indicating the value is unknown
static int VARIABLE
          The constant indicating the value is a variable
 
Method Summary
 boolean getBooleanValue()
          Returns the boolean value
 IConcept getConceptValue()
          Returns the concept value, the value of a parameter can potentially be a class.
 int getContentType()
          Returns the content type of the parameter.
 double getDoubleValue()
          Returns the double value
 int getIntValue()
          Returns the integer value
 java.lang.String getName()
          Returns the name of the parameter.
 java.lang.String getStringValue()
          Returns the string value.
 java.lang.String getSymbolValue()
          Returns the symbol value
 IType getType()
          Returns the type of the parameter.
 IUnknown getUnknownValue()
          Returns the 'unknown' value.
 java.lang.Object getValue()
          Generic method to return the parameter value as an object.
 IVariable getVariableValue()
          Returns the variable passed to the parameter.
 

Field Detail

INT

static final int INT
The constant indicating the value is an integer

See Also:
Constant Field Values

DOUBLE

static final int DOUBLE
The constant indicating the value is a double

See Also:
Constant Field Values

BOOLEAN

static final int BOOLEAN
The constant indicating the value is a boolean

See Also:
Constant Field Values

SYMBOL

static final int SYMBOL
The constant indicating the value is a symbol

See Also:
Constant Field Values

STRING

static final int STRING
The constant indicating the value is a string

See Also:
Constant Field Values

CONCEPT

static final int CONCEPT
The constant indicating the value is a concept

See Also:
Constant Field Values

VARIABLE

static final int VARIABLE
The constant indicating the value is a variable

See Also:
Constant Field Values

UNKNOWN

static final int UNKNOWN
The constant indicating the value is unknown

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
                         throws ExternalException
Returns the name of the parameter.

Returns:
String the name of the parameter.
Throws:
ExternalException

getContentType

int getContentType()
                   throws ExternalException
Returns the content type of the parameter. The parameter value is not necessarily a primitive type or user defined type but can also be a variable referencing the actual value.

Returns:
int the concept type of the parameter
Throws:
ExternalException - if an internal error occurs
See Also:
INT, DOUBLE, BOOLEAN, SYMBOL, STRING, CONCEPT, VARIABLE, UNKNOWN

getType

IType getType()
              throws ExternalException
Returns the type of the parameter.

Returns:
IType the parameter's type.
Throws:
ExternalException - if an internal error occurs
See Also:
IType

getIntValue

int getIntValue()
                throws InvalidContentTypeException,
                       ExternalException
Returns the integer value

Returns:
int the integer value
Throws:
InvalidContentTypeException - if the parameter value is not an integer
ExternalException - if an internal error occurs

getDoubleValue

double getDoubleValue()
                      throws InvalidContentTypeException,
                             ExternalException
Returns the double value

Returns:
double the double value
Throws:
InvalidContentTypeException - if the parameter value is not a double
ExternalException - if an internal error occurs

getBooleanValue

boolean getBooleanValue()
                        throws InvalidContentTypeException,
                               ExternalException
Returns the boolean value

Returns:
boolean the boolean value
Throws:
InvalidContentTypeException - if the parameter value is not a boolean
ExternalException - if an internal error occurs

getSymbolValue

java.lang.String getSymbolValue()
                                throws InvalidContentTypeException,
                                       ExternalException
Returns the symbol value

Returns:
String the symbol value
Throws:
InvalidContentTypeException - if the parameter value is not a symbol
ExternalException - if an internal error occurs

getStringValue

java.lang.String getStringValue()
                                throws InvalidContentTypeException,
                                       ExternalException
Returns the string value.

Returns:
String the string value
Throws:
InvalidContentTypeException - if the parameter value is not a string
ExternalException - if an internal error occurs

getConceptValue

IConcept getConceptValue()
                         throws InvalidContentTypeException,
                                ExternalException
Returns the concept value, the value of a parameter can potentially be a class.

Returns:
IConcept the concept value
Throws:
InvalidContentTypeException - if the parameter value is not a concept
ExternalException - if an internal error occurs
See Also:
IConcept

getVariableValue

IVariable getVariableValue()
                           throws InvalidContentTypeException,
                                  ExternalException
Returns the variable passed to the parameter.

Returns:
IVariable the variable assigning the value
Throws:
InvalidContentTypeException - if the parameter value is not a variable
ExternalException - if an internal error occurs
See Also:
IVariable

getUnknownValue

IUnknown getUnknownValue()
                         throws InvalidContentTypeException,
                                ExternalException
Returns the 'unknown' value.

Returns:
IUnknown the 'unknown' value
Throws:
InvalidContentTypeException - if the parameter value is not 'unknown'
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

getValue

java.lang.Object getValue()
                          throws InvalidContentTypeException,
                                 ExternalException
Generic method to return the parameter value as an object. Values of primitive types are wrapped using their class representations.

Note that the use of getType and the method to retrieve a value using its specific type method is more efficient.

Returns:
Object the parameter value
Throws:
InvalidContentTypeException - if the parameter value does not match with the content type
ExternalException - if an internal error occurs