gov.nasa.arc.brahms.common.rt
Class BeliefCtx
java.lang.Object
gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.StatementCtx
gov.nasa.arc.brahms.common.rt.BeliefCtx
- All Implemented Interfaces:
- IBeliefCtx, IBrahmsObjectCtx, IRuntimeConstants, IStatementCtx, java.io.Serializable
public class BeliefCtx
- extends StatementCtx
- implements IBeliefCtx
The 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:
- 1.0
- Author:
- Ron van Hoof
- See Also:
- 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 |
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.IBrahmsObjectCtx |
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
BeliefCtx
public BeliefCtx(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
BeliefCtx
public BeliefCtx(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 contextsourceType
- the source typesource
- 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:
setOwner
in 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:
getOwner
in interface IBeliefCtx
- Returns:
- IActiveInstanceCtx the active instance having the belief
- Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no owner is specified
toString
public java.lang.String toString()
- Returns the string representation of the belief context,
returning 'belief' followed by the belief itself.
- Overrides:
toString
in class java.lang.Object
- Returns:
- String the string representation of the belief context
Copyright © 1997-2012 All Rights Reserved.