edu.cmu.sei.aadl.instance
Class InstantiateModel

java.lang.Object
  extended by edu.cmu.sei.aadl.instance.InstantiateModel

public class InstantiateModel
extends java.lang.Object

This class implements the instantiation of models from a root system impl. The class also contains a switch for performing checks on semantic constraints that must be satisfied for certain analyes on instance models. Although there is a method that invokes these checks, it is best for each analysis method to invoke those checks that are relevant for its processing.

Author:
phf

Constructor Summary
InstantiateModel(org.eclipse.core.runtime.IProgressMonitor pm, AnalysisErrorReporterManager errMgr)
          create an instantiate object.
 
Method Summary
 SystemInstance buildInstanceModelFile(SystemImpl si)
          This method will construct an instance model, save it on disk and return its root object This method has the knowledge of how the instance model file name is constructed
 SystemInstance findSystemInstance(SystemImpl si)
          This method returns a system instance for the given system implementation.
 org.eclipse.emf.common.util.EList getIncomingConnection(Feature feature, org.eclipse.emf.common.util.EList incomingconnlist)
          get incoming connections for specified feature This method does not work on subcomponent, because we need the enclosing subcomponent rather than the enclosing component implementation in order to get the subcomponent inheritance correct Otherwise the incorrect connections get picked up
 org.eclipse.emf.common.util.URI getInstanceModelURI(SystemImpl si)
          returns the instance model URI for a given system implementation
 SystemInstance getSystemInstance(SystemImpl si)
          This method returns a system instance for the given system implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstantiateModel

public InstantiateModel(org.eclipse.core.runtime.IProgressMonitor pm,
                        AnalysisErrorReporterManager errMgr)
create an instantiate object. Tracks who to report errors to - the resoruce that contains si. It also holds on to the property definition filter to be used for caching properties in the instance model

Method Detail

getIncomingConnection

public org.eclipse.emf.common.util.EList getIncomingConnection(Feature feature,
                                                               org.eclipse.emf.common.util.EList incomingconnlist)
get incoming connections for specified feature This method does not work on subcomponent, because we need the enclosing subcomponent rather than the enclosing component implementation in order to get the subcomponent inheritance correct Otherwise the incorrect connections get picked up

Parameters:
feature - subcomponent feature that is the destination of a connection
Returns:
EList Connection connections with feature as destination

buildInstanceModelFile

public SystemInstance buildInstanceModelFile(SystemImpl si)
This method will construct an instance model, save it on disk and return its root object This method has the knowledge of how the instance model file name is constructed

Parameters:
si - system implementation
Returns:
SystemInstance or null if cancelled.

getSystemInstance

public SystemInstance getSystemInstance(SystemImpl si)
This method returns a system instance for the given system implementation. If the instance model already exists it will be returned. If it does not exist one will be constructed.

Parameters:
si - system implementation
Returns:
SystemInstance

findSystemInstance

public SystemInstance findSystemInstance(SystemImpl si)
This method returns a system instance for the given system implementation. If the instance model already exists it will be returned. If it does not exist null is returned

Parameters:
si - system implementation
Returns:
SystemInstance or null if it does not exist

getInstanceModelURI

public org.eclipse.emf.common.util.URI getInstanceModelURI(SystemImpl si)
returns the instance model URI for a given system implementation

Parameters:
si -
Returns:
URI for instance model file