gov.nasa.arc.brahms.vm.rt
Class VMFactCtx
java.lang.Object
gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.StatementCtx
gov.nasa.arc.brahms.vm.rt.VMStatementCtx
gov.nasa.arc.brahms.vm.rt.VMFactCtx
- All Implemented Interfaces:
- IBrahmsObjectCtx, IFactCtx, IRuntimeConstants, IStatementCtx, gov.nasa.arc.brahms.vm.events.IDiscreteEventData, java.io.Serializable
public class VMFactCtx
- extends VMStatementCtx
- implements IFactCtx
The VMFactCtx is a FactCtx with extensions for use in the virtual
machine. A FactCtx maintains information about a fact created
in the world. The fact context defines when the
fact is created and what created the fact.
- Version:
- 7 January 2004
- 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 |
Method Summary |
IConceptCtx |
getCreatedBy()
Returns the concept responsible for the creation of the fact. |
void |
setCreatedBy(IConceptCtx concept)
Sets the concept responsible for the creation of the fact. |
java.lang.String |
toString()
Returns the string representation of the fact context,
returning the id and 'fact' followed by the fact 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 |
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 |
VMFactCtx
public VMFactCtx(Statement fact)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Constructor, creates a fact context for the specified fact
- Parameters:
fact
- the fact for which this is context
- Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException
VMFactCtx
public VMFactCtx(Statement fact,
int sourceType,
IBrahmsObjectCtx source)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Constructor, creates a fact context for the specified fact.
- Parameters:
fact
- the Statement for which this is a contextsourceType
- the source typesource
- the BrahmsObjectCtx 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
setCreatedBy
public void setCreatedBy(IConceptCtx concept)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Sets the concept responsible for the creation of the fact. Facts are not
owned by any concept but are created by a concept.
- Parameters:
concept
- the IConceptCtx that created the fact
- Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if concept is null or an internal error occurs
getCreatedBy
public IConceptCtx getCreatedBy()
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
- Returns the concept responsible for the creation of the fact.
- Returns:
- IConceptCtx the concept that created the fact
- Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no concept is specified or an internal error occurs
toString
public java.lang.String toString()
- Returns the string representation of the fact context,
returning the id and 'fact' followed by the fact itself.
- Overrides:
toString
in class java.lang.Object
- Returns:
- String the string representation of the fact context
Copyright © 1997-2012 All Rights Reserved.