gov.nasa.arc.brahms.common.rt
Interface IStatementCtx

All Superinterfaces:
IBrahmsObjectCtx
All Known Subinterfaces:
IBeliefCtx, IFactCtx
All Known Implementing Classes:
BeliefCtx, FactCtx, StatementCtx, VMBeliefCtx, VMFactCtx, VMStatementCtx

public interface IStatementCtx
extends IBrahmsObjectCtx

The IStatementCtx is the interface for statement context that define a context for a Statement defining the source of the statement, the element that created the statement. The source of a statement can be a concept due to the definition of initial statements, a consequence, a detectable, a transfer definition, an activity (actually the engine core that generates statements based on the activities executed), or just the engine core (reflection statements).

Version:
4 August 2000
Author:
Ron van Hoof

Method Summary
 IBrahmsObjectCtx getSource()
          Returns the source of the statement, no source is specified for reflection statements generated by the engine (source type == ENGINE).
 int getSourceType()
          Returns the type of the source of this statement
 void setSource(IBrahmsObjectCtx source)
          Sets the source of the statement, no source is specified for reflection statements generated by the engine (source type == ENGINE).
 void setSourceType(int type)
          Sets the type of the source of this statement
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

setSourceType

void setSourceType(int type)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the type of the source of this statement

Parameters:
type - the source type
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if an invalid source type is specified
See Also:
IRuntimeConstants.INITIAL, IRuntimeConstants.CONSEQUENCE, IRuntimeConstants.DETECTABLE, IRuntimeConstants.TRANSFER, IRuntimeConstants.ACTIVITY, IRuntimeConstants.ENGINE

getSourceType

int getSourceType()
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the type of the source of this statement

Returns:
int the source type
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no source type is specified
See Also:
IRuntimeConstants.INITIAL, IRuntimeConstants.CONSEQUENCE, IRuntimeConstants.DETECTABLE, IRuntimeConstants.TRANSFER, IRuntimeConstants.ACTIVITY, IRuntimeConstants.ENGINE

setSource

void setSource(IBrahmsObjectCtx source)
               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the source of the statement, no source is specified for reflection statements generated by the engine (source type == ENGINE). For initial statements (INITIAL) a concept is to be specified (IConceptCtx), for consequence based statements a consequence is to be specified (IConsequenceCtx), for detectable based statements a detectable action is to be specified (IDetectableActionCtx), for transfer definition (TRANSFER) based statements a transfer definition is to be specified (ITransferDefinitionCtx), and for statements generated by the engine as a side effect of an activity, the activity is to be specified (IActivityCtx).

Parameters:
source - the IBrahmsObjectCtx causing the creation of the statement
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null source is specified

getSource

IBrahmsObjectCtx getSource()
                           throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the source of the statement, no source is specified for reflection statements generated by the engine (source type == ENGINE).

Returns:
IBrahmsObjectCtx the source causing the creation of the statement
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no source is specified
See Also:
setSource(gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx)


Copyright © 1997-2012 All Rights Reserved.