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

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.ConceptualInstanceCtx
All Implemented Interfaces:
IBrahmsObjectCtx, IConceptCtx, IConceptualInstanceCtx, IRuntimeConstants, java.io.Serializable
Direct Known Subclasses:
VMConceptualInstanceCtx

public class ConceptualInstanceCtx
extends ConceptCtx
implements IConceptualInstanceCtx

The ConceptualInstanceCtx is the runtime representation of conceptual instances defined in a Brahms model. The conceptual instance context manages the creation and deletion time of the conceptual instances. The conceptual instance context also manages the list of sub aggregates or parts of the conceptual instance and the parent aggregates of the conceptual instance.

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
ConceptualInstanceCtx(ConceptualInstance ci)
          Constructor, creates a new context for the specified conceptual instance.
 
Method Summary
 void addAggregate(PartCtx aggregate)
          Adds the specified aggregate as an aggregate for this conceptual instance.
 void addSubAggregate(PartCtx subaggregate)
          Adds the specified sub aggregate as a sub aggregate for this conceptual instance.
 java.util.Enumeration getAggregates()
          Returns a list of all the aggregates (PartCtx).
 java.util.Enumeration getSubAggregates()
          Returns a list of all the sub aggregates (PartCtx).
 void removeAggregate(PartCtx aggregate)
          Removes the specified aggregate as an aggregate for this conceptual instance.
 void removeAllAggregates()
          Removes all the aggregates from the list of aggregates.
 void removeAllSubAggregates()
          Removes all the sub aggregates from the list of aggregates.
 void removeSubAggregate(PartCtx subaggregate)
          Removes the specified sub aggregate as a sub aggregate from this conceptual instance.
 
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.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Constructor Detail

ConceptualInstanceCtx

public ConceptualInstanceCtx(ConceptualInstance ci)
Constructor, creates a new context for the specified conceptual instance.

Parameters:
ci - the ConceptualInstance 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 conceptual 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 IConceptualInstanceCtx
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 conceptual 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 IConceptualInstanceCtx
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 IConceptualInstanceCtx
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 IConceptualInstanceCtx

addSubAggregate

public void addSubAggregate(PartCtx subaggregate)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified sub aggregate as a sub aggregate for this conceptual instance. The actual sub aggregate is the concept references by the part context. Aggregates and sub aggregates are associated through a PartCtx.

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

removeSubAggregate

public void removeSubAggregate(PartCtx subaggregate)
                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified sub aggregate as a sub aggregate from this conceptual instance. The actual sub aggregate is the concept references by the part context. Aggregates and sub aggregates are associated through a PartCtx.

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

getSubAggregates

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

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

removeAllSubAggregates

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

Specified by:
removeAllSubAggregates in interface IConceptualInstanceCtx


Copyright © 1997-2012 All Rights Reserved.