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

All Known Subinterfaces:
IActiveInstanceCtx, IActivityCtx, IAgentCtx, IAreaCtx, IAssignmentCtx, IBeliefCtx, IBroadcastActivityCtx, ICommunicateActivityCtx, ICompositeActivityCtx, IConceptCtx, IConceptualInstanceCtx, IConditionCtx, IConsequenceCtx, IContainmentActivityCtx, ICreateAgentActivityCtx, ICreateAreaActivityCtx, ICreateObjectActivityCtx, IDeleteCtx, IDetectableCtx, IDetectCtx, IFactCtx, IFrameCtx, IGestureActivityCtx, IGetActivityCtx, IJavaActivityCtx, IMethodInvocationCtx, IMoveActivityCtx, IObjectInstanceCtx, IPreconditionCtx, IPrimitiveActivityCtx, IPutActivityCtx, IStatementCtx, IThoughtframeCtx, ITransferDefinitionCtx, ITriggerCtx, IVariableCtx, IWorkframeCtx
All Known Implementing Classes:
ActiveCtx, ActiveInstanceCtx, ActivityCtx, ActivityStateCtx, AgentCtx, AreaCtx, AssignmentCtx, AvailableCtx, BeliefCtx, BrahmsObjectCtx, BroadcastActivityCtx, CommunicateActivityCtx, CompleteCtx, CompositeActivityCtx, ConceptCtx, ConceptualInstanceCtx, ConditionCtx, ConsequenceCtx, ContainedInstanceCtx, ContainmentActivityCtx, CreateAgentActivityCtx, CreateAreaActivityCtx, CreateObjectActivityCtx, DeleteCtx, DetectableCtx, DetectCtx, FactCtx, FrameCtx, FrameStateCtx, GestureActivityCtx, GetActivityCtx, ImpasseCtx, InterruptCtx, JavaActivityCtx, MethodInvocationCtx, ModelCtx, MoveActivityCtx, ObjectInstanceCtx, ParameterCtx, PartCtx, PreconditionCtx, PrimitiveActivityCtx, PutActivityCtx, StatementCtx, ThoughtframeCtx, TransferDefinitionCtx, TriggerCtx, UnavailableCtx, VariableCtx, VMActiveInstanceCtx, VMActivityCtx, VMAgentCtx, VMAreaCtx, VMAssignmentCtx, VMBeliefCtx, VMBroadcastActivityCtx, VMCommunicateActivityCtx, VMCompositeActivityCtx, VMConceptualInstanceCtx, VMConsequenceCtx, VMContainmentActivityCtx, VMCreateAgentActivityCtx, VMCreateAreaActivityCtx, VMCreateObjectActivityCtx, VMDeleteCtx, VMDetectableCtx, VMDetectCtx, VMExternalAgentCtx, VMFactCtx, VMFrameCtx, VMGestureActivityCtx, VMGetActivityCtx, VMJavaActivityCtx, VMMethodInvocationCtx, VMMoveActivityCtx, VMObjectInstanceCtx, VMPathCtx, VMPreconditionCtx, VMPrimitiveActivityCtx, VMPutActivityCtx, VMStatementCtx, VMThoughtframeCtx, VMTransferDefinitionCtx, VMTriggerCtx, VMVariableCtx, VMWorkframeCtx, WorkframeCtx

public interface IBrahmsObjectCtx

The IBrahmsObjectCtx interface is the interface for all contexts in the Brahms system as part of the dynamic model. The BrahmsObject context class manages the start and end times of the contexts or depending on the type of object the creation and deletion time of an object. Every context allows for additional notes to capture additional information for explanation purposes. The contexts in the dynamic model are generally used to maintain the state information for the elements defined in a Brahms model in a simulation or when running intelligent agents.

Version:
28 October 1999
Author:
Ron van Hoof

Method Summary
 void addNote(Note note)
          Adds a note to the context.
 BrahmsObject getContextFor()
          Returns the BrahmsObject this context is a context for.
 long getEndTime()
          Returns the end time.
 java.lang.String getID()
          Returns the unique identifier for the context.
 Note getNote(int index)
          Returns the note defined at the given index.
 java.util.Enumeration getNotes()
          Returns a list of all the notes for the context.
 long getStartTime()
          Returns the start time.
 void removeNote(Note note)
          Removes a note from the context.
 void setEndTime(long endTime)
          Sets the end time.
 void setID(java.lang.String id)
          Sets a unique identifier for the context.
 void setStartTime(long startTime)
          Sets the start time.
 

Method Detail

setID

void setID(java.lang.String id)
Sets a unique identifier for the context. Not all contexts are required to have a unique identifier.

Parameters:
id - the unique identifier for the context

getID

java.lang.String getID()
Returns the unique identifier for the context. Not all contexts are required to have a unique identifier.

Returns:
String the unique identifier for the context, empty string if no id is specified

setStartTime

void setStartTime(long startTime)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the start time. The start time represents either the time a object was started or the time an object was created. The time is represented in simulation units when used in a simulation run and the time is represented in milliseconds when used in an intelligent agent mode.

Parameters:
startTime - the time the object was started or created.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the start time is <= 0

getStartTime

long getStartTime()
Returns the start time. The start time represents either the time an object was started or the time an object was created. The time is represented in simulation units when used in a simulation run and the time is represented in milliseconds when used in an intelligent agent mode.

Returns:
long the time the object was started or created.

setEndTime

void setEndTime(long endTime)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the end time. The end time represents either the time an object was ended or the time an object was deleted. The time is represented in simulation units when used in a simulation run and the time is represented in milliseconds when used in an intelligent agent mode.

Parameters:
endTime - the time the object was ended or deleted.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if the end time is <= 0 && end time < start time

getEndTime

long getEndTime()
Returns the end time. The end time represents either the time an object was ended or the time an object was deleted. The time is represented in simulation units when used in a simulation run and the time is represented in milliseconds when used in an intelligent agent mode.

Returns:
long the time the object was ended or deleted.

addNote

void addNote(Note note)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds a note to the context. A note provides additional information relevant for the context that can be used to further explain the use of a specific context. Notes are generally used in the Brahms explanation facility.

Parameters:
note - the Note to be added to the context.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if note is null

removeNote

void removeNote(Note note)
                throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes a note from the context.

Parameters:
note - the Note to be removed from the context
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if note is null, no notes present or note not present

getNotes

java.util.Enumeration getNotes()
                               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the notes for the context.

Returns:
Enumeration the list of notes.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no notes are present

getNote

Note getNote(int index)
             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the note defined at the given index.

Parameters:
index - the index of the requested Note
Returns:
Note the note at the given index
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no notes are registered or an invalid index is given.

getContextFor

BrahmsObject getContextFor()
                           throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the BrahmsObject this context is a context for.

Returns:
BrahmsObject the brahms object this context is a context for.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no BrahmsObject is defined for the context


Copyright © 1997-2012 All Rights Reserved.