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

java.lang.Object
  extended by gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
      extended by gov.nasa.arc.brahms.common.rt.ConceptCtx
          extended by gov.nasa.arc.brahms.common.rt.ActiveInstanceCtx
              extended by gov.nasa.arc.brahms.common.rt.ObjectInstanceCtx
All Implemented Interfaces:
IActiveInstanceCtx, IBrahmsObjectCtx, IConceptCtx, IObjectInstanceCtx, IRuntimeConstants, java.io.Serializable

public class ObjectInstanceCtx
extends ActiveInstanceCtx
implements IObjectInstanceCtx

The ObjectInstanceCtx is the runtime class for the objects. It manages the belief set, location, frame contexts with their various states and containment. The virtual machine maintains the object states through the object instance contexts.

Version:
1.0
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE
 
Constructor Summary
ObjectInstanceCtx(ObjectInstance obj)
          Constructor, creates a new context for the specified ObjectInstance.
 
Method Summary
 void addAggregate(PartCtx aggregate)
          Adds the specified aggregate as an aggregate for this object instance.
 java.util.Enumeration getAggregates()
          Returns a list of all the aggregates (PartCtx).
 void removeAggregate(PartCtx aggregate)
          Removes the specified aggregate as an aggregate for this object instance.
 void removeAllAggregates()
          Removes all the aggregates from the list of aggregates.
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.ActiveInstanceCtx
addAvailableFrame, addBelief, addCompletedFrame, addContainedElement, addImpasseDetectable, addImpassedFrame, addInterruptedFrame, addPastLocation, getAvailableThoughtframes, getAvailableWorkframes, getBeliefs, getBelievedTime, getCompletedThoughtframeNames, getCompletedThoughtframes, getCompletedWorkframeNames, getCompletedWorkframes, getContainedElements, getCurrentWork, getImpasseDetectables, getImpassedFrames, getInterruptedFrames, getLocation, getPastLocations, getPriorityAvailableThoughtframe, getPriorityAvailableWorkframe, getPriorityInterruptedFrame, hasAvailableThoughtframes, hasAvailableWorkframes, hasCompletedThoughtframes, hasCompletedWorkframes, hasImpassedFrames, hasInterruptedFrames, removeAllAvailableFrames, removeAllBeliefs, removeAllCompletedFrames, removeAllContainedElements, removeAllImpasseDetectables, removeAllImpassedFrames, removeAllInterruptedFrames, removeAllPastLocations, removeAvailableFrame, removeBelief, removeCompletedFrame, removeContainedElement, removeImpasseDetectable, removeImpassedFrame, removeInterruptedFrame, removePastLocation, setBelievedTime, setCurrentWork, setLocation
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.ConceptCtx
addAttribute, addRelation, getAttribute, getRelation, initAttributeRelationCache, removeAttribute, removeRelation, resetAttributeRelationCache, toString
 
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IActiveInstanceCtx
addAvailableFrame, addBelief, addCompletedFrame, addContainedElement, addImpasseDetectable, addImpassedFrame, addInterruptedFrame, addPastLocation, getAvailableThoughtframes, getAvailableWorkframes, getBeliefs, getBelievedTime, getCompletedThoughtframeNames, getCompletedThoughtframes, getCompletedWorkframeNames, getCompletedWorkframes, getContainedElements, getCurrentWork, getImpasseDetectables, getImpassedFrames, getInterruptedFrames, getLocation, getPastLocations, hasAvailableThoughtframes, hasAvailableWorkframes, hasCompletedThoughtframes, hasCompletedWorkframes, hasImpassedFrames, hasInterruptedFrames, removeAllAvailableFrames, removeAllBeliefs, removeAllCompletedFrames, removeAllContainedElements, removeAllImpasseDetectables, removeAllImpassedFrames, removeAllInterruptedFrames, removeAllPastLocations, removeAvailableFrame, removeBelief, removeCompletedFrame, removeContainedElement, removeImpasseDetectable, removeImpassedFrame, removeInterruptedFrame, removePastLocation, setBelievedTime, setCurrentWork, setLocation
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Constructor Detail

ObjectInstanceCtx

public ObjectInstanceCtx(ObjectInstance obj)
Constructor, creates a new context for the specified ObjectInstance.

Parameters:
obj - the ObjectInstance for which to create a context
Method Detail

addAggregate

public void addAggregate(PartCtx aggregate)
                  throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified aggregate as an aggregate for this object instance. The actual aggregate is the part context's aggregate/parent. Aggregates and sub aggregates are associated through a PartCtx.

Specified by:
addAggregate in interface IObjectInstanceCtx
Parameters:
aggregate - the aggregate (PartCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if aggregate is null

removeAggregate

public void removeAggregate(PartCtx aggregate)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified aggregate as an aggregate for this object instance. The actual aggregate is the part context's aggregate/parent. Aggregates and sub aggregates are associated through a PartCtx.

Specified by:
removeAggregate in interface IObjectInstanceCtx
Parameters:
aggregate - the aggregate to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if aggregate is null, no aggregates are available, or the aggregate is not found

getAggregates

public java.util.Enumeration getAggregates()
                                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the aggregates (PartCtx).

Specified by:
getAggregates in interface IObjectInstanceCtx
Returns:
Enumeration an enumeration of PartCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no aggregates

removeAllAggregates

public void removeAllAggregates()
Removes all the aggregates from the list of aggregates.

Specified by:
removeAllAggregates in interface IObjectInstanceCtx


Copyright © 1997-2012 All Rights Reserved.