edu.cmu.sei.aadl.aadl2.instance.impl
Class SystemInstanceImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by edu.cmu.sei.aadl.aadl2.parsesupport.AObjectImpl
                  extended by edu.cmu.sei.aadl.aadl2.impl.ElementImpl
                      extended by edu.cmu.sei.aadl.aadl2.impl.NamedElementImpl
                          extended by edu.cmu.sei.aadl.aadl2.instance.impl.InstanceObjectImpl
                              extended by edu.cmu.sei.aadl.aadl2.instance.impl.ConnectionInstanceEndImpl
                                  extended by edu.cmu.sei.aadl.aadl2.instance.impl.ComponentInstanceImpl
                                      extended by edu.cmu.sei.aadl.aadl2.instance.impl.SystemInstanceImpl
All Implemented Interfaces:
Element, ComponentInstance, ConnectionInstanceEnd, FlowElementInstance, InstanceObject, SystemInstance, NamedElement, AObject, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject

public class SystemInstanceImpl
extends ComponentInstanceImpl
implements SystemInstance

An implementation of the model object ' System Instance'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  SystemImplementation systemImplementation
          The cached value of the 'System Implementation' reference
protected  org.eclipse.emf.common.util.EList<SystemOperationMode> systemOperationModes
          The cached value of the 'System Operation Mode' containment reference list.
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.instance.impl.ComponentInstanceImpl
category, CATEGORY_EDEFAULT, componentInstances, connectionInstances, endToEndFlows, featureInstances, flowSpecifications, indices, inModes, modeInstances, modeTransitionInstances, subcomponent
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.instance.impl.ConnectionInstanceEndImpl
dstConnectionInstances, srcConnectionInstances
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.impl.NamedElementImpl
name, NAME_EDEFAULT, ownedPropertyAssociations, QUALIFIED_NAME_EDEFAULT
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.impl.ElementImpl
OWNED_ELEMENT_ESUBSETS, ownedComments
 
Fields inherited from class edu.cmu.sei.aadl.aadl2.parsesupport.AObjectImpl
copyright, locationReference
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface edu.cmu.sei.aadl.aadl2.parsesupport.AObject
copyright
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected SystemInstanceImpl()
           
 
Method Summary
 SystemImplementation basicGetSystemImplementation()
           
 void clearCurrentSystemOperationMode()
          Clear the mode states for a given SystemInstance.
 SystemOperationMode createSystemOperationMode()
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 ConnectionInstance findConnectionInstance(FeatureInstance srcFI, FeatureInstance dstFI)
          find the Connection instance for these feature instances.
 java.util.List<ConnectionInstance> findConnectionInstances(Connection first, Connection second)
          Find all connection instances that pass through two declarative connections in the same order as given in the parameters.
 SystemOperationMode getCurrentSystemOperationMode()
          Get the current system operation mode of the system, or null if it has not been set.
 java.util.List<SystemOperationMode> getExistsInModes()
          Returns the System Operation Modes in which the element exists, or null if the element always exists.
 SystemOperationMode getInitialSystemOperationMode()
           
 java.util.List<SystemImplementation> getInstantiatedObjects()
          Return the declarative objects that define this instance.
 SystemImplementation getSystemImplementation()
           
 org.eclipse.emf.common.util.EList<SystemOperationMode> getSystemOperationModes()
           
 java.util.List<SystemOperationMode> getSystemOperationModesFor(java.util.List<ModeInstance> mis)
          get all SOMs that contain the ModeInstance list
 java.util.List<SystemOperationMode> getSystemOperationModesFor(ModeInstance mi)
          get all SOMs that contain the mode instance
 boolean isActive(SystemOperationMode som)
           
 void setCurrentSystemOperationMode(SystemOperationMode som)
          Sets the current modes of the component instances contained in this system instance to match the state of the specified system operation mode.
 void setSystemImplementation(SystemImplementation newSystemImplementation)
           
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.instance.impl.ComponentInstanceImpl
basicGetSubcomponent, createComponentInstance, createComponentInstance, createConnectionInstance, createEndToEndFlow, createFeatureInstance, createFlowSpecification, createModeInstance, createModeTransitionInstance, findConnectionInstance, findEndToEndFlowInstance, findFeatureInstance, findFlowSpecInstance, findInstanceObjects, findModeInstance, findModeTransitionInstance, findSubcomponentInstance, getAllComponentInstances, getCategory, getComponentInstances, getConnectionInstances, getEndToEndFlows, getFeatureInstances, getFlowSpecifications, getIndices, getInModes, getModeInstances, getModeTransitionInstances, getSubcomponent, setCategory, setCurrentMode, setSubcomponent, toString
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.instance.impl.ConnectionInstanceEndImpl
eInverseAdd, getDstConnectionInstances, getSrcConnectionInstances
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.instance.impl.InstanceObjectImpl
acceptsProperty, getComponentInstancePath, getContainingComponentInstance, getContainingComponentInstanceOrSelf, getInstanceObjectPath, getPropertyValueFromDeclarativeModel, getPropertyValueInternal, getSystemInstance
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.impl.NamedElementImpl
allNamespaces, checkPropertyAssociation, createOwnedPropertyAssociation, eBasicRemoveFromContainerFeature, getName, getNamespace, getOwnedPropertyAssociations, getPropertyValue, getPropertyValueList, getQualifiedName, getSimplePropertyValue, has_no_qualified_name, has_qualified_name, hasName, isDistinguishableFrom, qualifiedName, removePropertyAssociations, removePropertyAssociations, separator, setName, setPropertyValue, setPropertyValue, setPropertyValue
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.impl.ElementImpl
allOwnedElements, create, createOwnedComment, getCacheAdapter, getChildren, getContainingClassifier, getContainingComponentImpl, getElementRoot, getOwnedComments, getOwnedElements, getOwner, has_owner, isSetOwnedElements, isSetOwner, mustBeOwned, not_own_self
 
Methods inherited from class edu.cmu.sei.aadl.aadl2.parsesupport.AObjectImpl
getAdapter, getLocationReference, setLocationReference, setLocationReference
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.instance.ComponentInstance
createComponentInstance, createComponentInstance, createConnectionInstance, createEndToEndFlow, createFeatureInstance, createFlowSpecification, createModeInstance, createModeTransitionInstance, findConnectionInstance, findEndToEndFlowInstance, findFeatureInstance, findFlowSpecInstance, findInstanceObjects, findModeInstance, findModeTransitionInstance, findSubcomponentInstance, getAllComponentInstances, getCategory, getComponentInstances, getConnectionInstances, getEndToEndFlows, getFeatureInstances, getFlowSpecifications, getIndices, getInModes, getModeInstances, getModeTransitionInstances, getSubcomponent, setCategory, setCurrentMode, setSubcomponent
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.instance.ConnectionInstanceEnd
getDstConnectionInstances, getSrcConnectionInstances
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.instance.InstanceObject
getComponentInstancePath, getContainingComponentInstance, getInstanceObjectPath, getSystemInstance
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.NamedElement
acceptsProperty, allNamespaces, checkPropertyAssociation, createOwnedPropertyAssociation, getName, getNamespace, getOwnedPropertyAssociations, getPropertyValue, getPropertyValueInternal, getPropertyValueList, getQualifiedName, getSimplePropertyValue, has_no_qualified_name, has_qualified_name, hasName, isDistinguishableFrom, qualifiedName, removePropertyAssociations, removePropertyAssociations, separator, setName, setPropertyValue, setPropertyValue, setPropertyValue
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.Element
allOwnedElements, createOwnedComment, getChildren, getContainingClassifier, getContainingComponentImpl, getElementRoot, getOwnedComments, getOwnedElements, getOwner, has_owner, mustBeOwned, not_own_self
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.parsesupport.AObject
getLocationReference, setLocationReference, setLocationReference
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

systemOperationModes

protected org.eclipse.emf.common.util.EList<SystemOperationMode> systemOperationModes
The cached value of the 'System Operation Mode' containment reference list.

See Also:
getSystemOperationModes()

systemImplementation

protected SystemImplementation systemImplementation
The cached value of the 'System Implementation' reference.

See Also:
getSystemImplementation()
Constructor Detail

SystemInstanceImpl

protected SystemInstanceImpl()

Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class ComponentInstanceImpl

getSystemOperationModes

public org.eclipse.emf.common.util.EList<SystemOperationMode> getSystemOperationModes()

Specified by:
getSystemOperationModes in interface SystemInstance
Returns:
the value of the 'System Operation Mode' containment reference list.
See Also:
InstancePackage.getSystemInstance_SystemOperationMode()

createSystemOperationMode

public SystemOperationMode createSystemOperationMode()

Specified by:
createSystemOperationMode in interface SystemInstance
Returns:
The new SystemOperationMode.
See Also:
SystemInstance.getSystemOperationModes()

getSystemImplementation

public SystemImplementation getSystemImplementation()

Specified by:
getSystemImplementation in interface SystemInstance
Returns:
the value of the 'System Implementation' reference.
See Also:
SystemInstance.setSystemImplementation(SystemImplementation), InstancePackage.getSystemInstance_SystemImplementation()

basicGetSystemImplementation

public SystemImplementation basicGetSystemImplementation()


setSystemImplementation

public void setSystemImplementation(SystemImplementation newSystemImplementation)

Specified by:
setSystemImplementation in interface SystemInstance
Parameters:
newSystemImplementation - the new value of the 'System Implementation' reference.
See Also:
SystemInstance.getSystemImplementation()

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class ComponentInstanceImpl

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class ComponentInstanceImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class ComponentInstanceImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class ComponentInstanceImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class ComponentInstanceImpl

getSystemOperationModesFor

public java.util.List<SystemOperationMode> getSystemOperationModesFor(java.util.List<ModeInstance> mis)
get all SOMs that contain the ModeInstance list

Specified by:
getSystemOperationModesFor in interface SystemInstance
Parameters:
mis - List of mode instances
Returns:
SOM that match the ModeInstance list

setCurrentSystemOperationMode

public void setCurrentSystemOperationMode(SystemOperationMode som)
Description copied from interface: SystemInstance
Sets the current modes of the component instances contained in this system instance to match the state of the specified system operation mode. This system operation mode is also set globally on the system instance. There is an invariant over the instance model that if the current system operation mode of the root system instance is non- null, then the "current mode" state of the component instances in the model match that state.

Specified by:
setCurrentSystemOperationMode in interface SystemInstance
Parameters:
som - SystemOperationMode whose values are used to set the currentMode in the instance model
See Also:
SystemInstance.clearCurrentSystemOperationMode(), SystemInstance.getCurrentSystemOperationMode()

getCurrentSystemOperationMode

public SystemOperationMode getCurrentSystemOperationMode()
Description copied from interface: SystemInstance
Get the current system operation mode of the system, or null if it has not been set.

Specified by:
getCurrentSystemOperationMode in interface SystemInstance

clearCurrentSystemOperationMode

public void clearCurrentSystemOperationMode()
Clear the mode states for a given SystemInstance. That is, the modal adapters for the model all have their modes set to null.

Specified by:
clearCurrentSystemOperationMode in interface SystemInstance

findConnectionInstance

public ConnectionInstance findConnectionInstance(FeatureInstance srcFI,
                                                 FeatureInstance dstFI)
Description copied from interface: SystemInstance
find the Connection instance for these feature instances. The connection instance may point to the enclosing feature group instance The connection instance may go through the feature to a subcomponent instance

This method is sensitive to the current system operation mode.

Specified by:
findConnectionInstance in interface SystemInstance
Parameters:
srcFI - source feature instance
dstFI - destination feature instance
Returns:
Connection instance with the specified source and destination, or null if no such connection exists in the current som.

findConnectionInstances

public java.util.List<ConnectionInstance> findConnectionInstances(Connection first,
                                                                  Connection second)
Description copied from interface: SystemInstance
Find all connection instances that pass through two declarative connections in the same order as given in the parameters.

This method is sensitive to the current system operation mode.

Specified by:
findConnectionInstances in interface SystemInstance
Parameters:
first - the first connection that should occur in the connection instance
second - the connection that should occur after the first in the connection instance
Returns:
the list of connection instances

getExistsInModes

public final java.util.List<SystemOperationMode> getExistsInModes()
Description copied from class: InstanceObjectImpl
Returns the System Operation Modes in which the element exists, or null if the element always exists.

Specified by:
getExistsInModes in interface InstanceObject
Overrides:
getExistsInModes in class ComponentInstanceImpl
Returns:

getSystemOperationModesFor

public java.util.List<SystemOperationMode> getSystemOperationModesFor(ModeInstance mi)
get all SOMs that contain the mode instance

Specified by:
getSystemOperationModesFor in interface SystemInstance
Parameters:
mi - Mode Instance
Returns:
List of SOM that contains the mode instance

getInstantiatedObjects

public final java.util.List<SystemImplementation> getInstantiatedObjects()
Description copied from class: InstanceObjectImpl
Return the declarative objects that define this instance. Most of the time this will return a singleton list. But in the case of semantic connections, it will return a list of connection objects.

Specified by:
getInstantiatedObjects in interface InstanceObject
Overrides:
getInstantiatedObjects in class ComponentInstanceImpl
Returns:
A List of NamedElement objects that should be declarative model elements. Returns an empty list if no named declarative object exists, such as in the case of ModeTransitionInstances.

getInitialSystemOperationMode

public final SystemOperationMode getInitialSystemOperationMode()
Specified by:
getInitialSystemOperationMode in interface SystemInstance

isActive

public boolean isActive(SystemOperationMode som)
Specified by:
isActive in interface InstanceObject
Overrides:
isActive in class ComponentInstanceImpl