gov.nasa.arc.brahms.vm.rt
Class VMBeliefCtx
java.lang.Object
   gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
       gov.nasa.arc.brahms.common.rt.StatementCtx
gov.nasa.arc.brahms.common.rt.StatementCtx
           gov.nasa.arc.brahms.vm.rt.VMStatementCtx
gov.nasa.arc.brahms.vm.rt.VMStatementCtx
               gov.nasa.arc.brahms.vm.rt.VMBeliefCtx
gov.nasa.arc.brahms.vm.rt.VMBeliefCtx
- All Implemented Interfaces: 
- IBeliefCtx, IBrahmsObjectCtx, IRuntimeConstants, IStatementCtx, gov.nasa.arc.brahms.vm.events.IDiscreteEventData, java.io.Serializable, java.lang.Cloneable
- public class VMBeliefCtx 
- extends VMStatementCtx- implements IBeliefCtx, java.lang.Cloneable
The VMBeliefCtx is a BeliefCtx with extensions for use in the virtual
 machine. A BeliefCtx maintains information about a belief created
 for an active instance. The belief context defines when the
 belief is created and what created the belief.
- Version:
- 7 January 2004
- Author:
- Ron van Hoof
- See Also:
- BeliefCtx, 
Serialized Form
 
| 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 | 
 
 
| Method Summary | 
|  java.lang.Object | clone()Creates and returns a copy of this object.
 | 
|  IActiveInstanceCtx | getOwner()Returns the owner of the belief
 | 
|  void | setOwner(IActiveInstanceCtx owner)Sets the owner of the belief
 | 
|  java.lang.String | toString()Returns the string representation of the belief context,
 returning the id and 'belief' followed by the belief itself.
 | 
 
 
 
| 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 | 
| equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
 
| Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx | 
| addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime | 
 
VMBeliefCtx
public VMBeliefCtx(Statement belief)
            throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Constructor, creates a belief context for the specified belief
 
- Parameters:
- belief- the belief for which this is context
- Throws:
- gov.nasa.arc.brahms.common.exceptions.BrahmsException
 
VMBeliefCtx
public VMBeliefCtx(Statement belief,
                   int sourceType,
                   IBrahmsObjectCtx source)
            throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Constructor, creates a belief context for the specified belief.
 
- Parameters:
- belief- the Statement for which this is a context
- sourceType- the source type
- source- the IBrahmsObjectCtx causing the creation of the statement
- Throws:
- gov.nasa.arc.brahms.common.exceptions.BrahmsException- if an invalid source type or source is specified
- See Also:
- IRuntimeConstants.INITIAL,- IRuntimeConstants.CONSEQUENCE,- IRuntimeConstants.DETECTABLE,- IRuntimeConstants.TRANSFER,- IRuntimeConstants.ACTIVITY,- IRuntimeConstants.ENGINE
 
setOwner
public void setOwner(IActiveInstanceCtx owner)
              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Sets the owner of the belief
 
- 
- Specified by:
- setOwnerin interface- IBeliefCtx
 
- 
- Parameters:
- owner- the active instance having the belief
- Throws:
- gov.nasa.arc.brahms.common.exceptions.BrahmsException- if an error occurs in setting the owner
 
getOwner
public IActiveInstanceCtx getOwner()
                            throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Returns the owner of the belief
 
- 
- Specified by:
- getOwnerin interface- IBeliefCtx
 
- 
- Returns:
- IActiveInstanceCtx the active instance having the belief
- Throws:
- gov.nasa.arc.brahms.common.exceptions.BrahmsException- if no owner is specified
 
clone
public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
- Creates and returns a copy of this object.
 
- 
- Overrides:
- clonein class- java.lang.Object
 
- 
- Returns:
- Object a clone of this instance
- Throws:
- java.lang.CloneNotSupportedException- if the object's class does not
                                                support the Cloneable interface. Subclasses that override
                                                the clone method can also throw this exception to indicate
                                                that an instance cannot be cloned.
- java.lang.OutOfMemoryError- if there is not enough memory.
 
toString
public java.lang.String toString()
- Returns the string representation of the belief context,
 returning the id and 'belief' followed by the belief itself.
 
- 
- Overrides:
- toStringin class- java.lang.Object
 
- 
- Returns:
- String the string representation of the belief context
 
Copyright © 1997-2012 All Rights Reserved.