edu.cmu.sei.aadl.model.instance
Interface ComponentInstance

All Superinterfaces:
AObject, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, InstanceObject, NamedElement, org.eclipse.emf.common.notify.Notifier, PropertyHolder
All Known Subinterfaces:
SystemInstance
All Known Implementing Classes:
ComponentInstanceImpl, SystemInstanceImpl

public interface ComponentInstance
extends InstanceObject

A representation of the model object 'Component Instance'.

The following features are supported:

See Also:
InstancePackage.getComponentInstance()

Field Summary
static java.lang.String copyright
           
 
Method Summary
 void addComponentInstance(ComponentInstance value)
          Adds to the list the value of the 'Component Instance' containment reference list
 void addEndToEndFlowInstance(EndToEndFlowInstance value)
          Adds to the list the value of the 'End To End Flow Instance' containment reference list
 void addFeatureInstance(FeatureInstance value)
          Adds to the list the value of the 'Feature Instance' containment reference list
 void addFlowSpecInstance(FlowSpecInstance value)
          Adds to the list the value of the 'Flow Spec Instance' containment reference list
 void addInModes(ModeInstance value)
          Adds to the list the value of the 'In Modes' reference list
 void addModeInstance(ModeInstance value)
          Adds to the list the value of the 'Mode Instance' containment reference list
 void addModeTransitionInstance(ModeTransitionInstance value)
          Adds to the list the value of the 'Mode Transition Instance' containment reference list
 void addSrcAccessConnection(AccessConnectionInstance value)
          Adds to the list the value of the 'Src Access Connection' reference list
 void doFlowSpecInstances()
          add flowspec instances to the component instance
 boolean exists()
          Does the component exist in the current system operation mode of its containing system instance?
 org.eclipse.emf.common.util.EList findConnectionInstance(Connection conn)
          Find the semantic connection instances that pass through this component instance that utilize the given connection.
 EndToEndFlowInstance findEndToEndFlowInstance(EndToEndFlow ete)
          Find the end to end flow instance of this component that corresponds to the given end to end flow.
 FeatureInstance findFeatureInstance(Feature feature)
          find the feature instance of this component instance
 FlowSpecInstance findFlowSpecInstance(FeatureInstance srcFeatureInstance)
          find the flowspec instance of this component instance
 FlowSpecInstance findFlowSpecInstance(FlowSpec flowspec)
          find the flowspec instance of this component instance
 java.util.Collection findInstanceObject(org.eclipse.emf.common.util.EList referencePath)
          Find the instance object based on the referencePath relative to this component instance.
 ModeInstance findModeInstance(Mode mode)
          find the mode instance of this component instance
 ModeTransitionInstance findModeTransitionInstance(ModeTransition mt)
          find the mode transition instance of this component instance
 ComponentInstance findSubcomponentInstance(Subcomponent sc)
          find the subcomponent instance of this component instance This method is sensitive to the current system operation mode of the containing system instance.
 org.eclipse.emf.common.util.EList getAllComponentInstances()
          Return all component instances in the containment structure rooted at this component, including this component.
 ComponentCategory getCategory()
          Returns the value of the 'Category' attribute.
 org.eclipse.emf.common.util.EList getChildren()
          get the children of a ComponentInstance object This will be the content or in case of a modal ComponentInstance the subset of children that is active in a given mode.
 org.eclipse.emf.common.util.EList getChildren(ModeInstance mode)
          Get the child of a component instance object that exist in the given mode.
 org.eclipse.emf.common.util.EList getComponentInstance()
          Returns the value of the 'Component Instance' containment reference list.
 org.eclipse.emf.common.util.EList getComponentInstance(ModeInstance mode)
          retrieve the subset of sub-component instances that are part of the specified mode
 ModeInstance getCurrentMode()
          Get the mode this component is currently projected into.
 org.eclipse.emf.common.util.EList getEndToEndFlowInstance()
          Returns the value of the 'End To End Flow Instance' containment reference list.
 org.eclipse.emf.common.util.EList getFeatureInstance()
          Returns the value of the 'Feature Instance' containment reference list.
 org.eclipse.emf.common.util.EList getFlowSpecInstance()
          Returns the value of the 'Flow Spec Instance' containment reference list.
 org.eclipse.emf.common.util.EList getIncomingConnection(Feature feature)
          get incoming connections for specified feature
 org.eclipse.emf.common.util.EList getIngoingConnection(Feature feature)
          get ingoing connections for specified feature connections to within the ocmponent for which this feature is the source
 org.eclipse.emf.common.util.EList getInModes()
          Returns the value of the 'In Modes' reference list.
 org.eclipse.emf.common.util.EList getModeInstance()
          Returns the value of the 'Mode Instance' containment reference list.
 org.eclipse.emf.common.util.EList getModeTransitionInstance()
          Returns the value of the 'Mode Transition Instance' containment reference list.
 org.eclipse.emf.common.util.EList getOutcomingConnection(Feature feature)
          get outcoming connections for specified feature connections from within the ocmponent for which this feature is the destination
 org.eclipse.emf.common.util.EList getOutgoingAccessConnection()
          get outgoing access connections for bus/data component
 org.eclipse.emf.common.util.EList getOutgoingConnection(Feature feature)
          get outgoing connections for specified feature
 org.eclipse.emf.common.util.EList getPreOrderComponentInstance(ComponentCategory cat)
          returns preorder list of component instances of the specified category.
 java.util.List getReferencePathTo()
          Get a List containing the subcomponent path that references the subcomponent associated the component instance.
 ReferenceValue getReferenceTo()
          Create a ReferenceValue that references the subcomponent associated with the component instance.
 org.eclipse.emf.common.util.EList getSrcAccessConnection()
          Returns the value of the 'Src Access Connection' reference list.
 Subcomponent getSubcomponent()
          Returns the value of the 'Subcomponent' reference
 ComponentClassifier getXComponentClassifier()
          Get the ComponentClassifierassociated with this component instance.
 ComponentImpl getXComponentImpl()
          Get the ComponentImplassociated with this component instance.
 ComponentType getXComponentType()
          Get the ComponentTypeassociated with this component instance.
 boolean isModal()
          Is the component modal?
 boolean isModalSubcomponent()
          Is the component a modal subcompnent?
 void setCategory(ComponentCategory value)
          Sets the value of the 'Category' attribute
 void setCurrentMode(ModeInstance mode)
          Project this component into the given mode.
 void setSubcomponent(Subcomponent value)
          Sets the value of the 'Subcomponent' reference
 boolean testClassifier(java.util.Set classifiers)
          Test a component against a set of ComponentClassifiers.
 
Methods inherited from interface edu.cmu.sei.aadl.model.instance.InstanceObject
getComponentInstanceList, getComponentInstancePath, getContainingComponentInstance, getInstanceObjectPath, getInstantiatedObjects, getSystemInstance
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.PropertyHolder
acceptsProperty, addProperty, addPropertyValue, checkPropertyAssociation, findPropertyAssociation, getProperties, getPropertyAssociation, getPropertyValue, getPropertyValueInternal, getPropertyValueList, getSimplePropertyValue, isModalPropertyValue, removeContainedPropertyAssociations, removeContainedPropertyAssociations, removePropertyAssociations, removePropertyAssociations, setContainedPropertyValue, setContainedPropertyValue, setContainedPropertyValue, setContainedPropertyValue, setProperties, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.NamedElement
getName, setName
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.AObject
addComment, getAadlSpec, getAObjectRoot, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, setLocationReference, setLocationReference
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

copyright

static final java.lang.String copyright

See Also:
Constant Field Values
Method Detail

getFeatureInstance

org.eclipse.emf.common.util.EList getFeatureInstance()
Returns the value of the 'Feature Instance' containment reference list. The list contents are of type FeatureInstance.

If the meaning of the 'Feature Instance' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Feature Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_FeatureInstance()

addFeatureInstance

void addFeatureInstance(FeatureInstance value)
Adds to the list the value of the 'Feature Instance' containment reference list.

Parameters:
value - the value to add to 'Feature Instance' containment reference list.

getComponentInstance

org.eclipse.emf.common.util.EList getComponentInstance()
Returns the value of the 'Component Instance' containment reference list. The list contents are of type ComponentInstance.

Get the component instances for the subcomponents that are part of this component instance. This method is sensitive to the current system operation mode. The assumption is that this component instance {exists in the current system operation mode if it is being queried. If this object is not part of a system instance, then all the component instances are returned; modifying the returned list in this case will change the model. If this object is part of a system instance and the current SOM is set, then this method only returns those component instances that exist in the current SOM. Modifying the returned list in this case will not change the model. If the current SOM is not set, then it returns all the component instances; modifying the returned list in this case will change the model.

Returns:
the value of the 'Component Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_ComponentInstance()

getAllComponentInstances

org.eclipse.emf.common.util.EList getAllComponentInstances()
Return all component instances in the containment structure rooted at this component, including this component. This method is sensitive to the current system operation mode. The assumption is that this component instance {exists in the current system operation mode if it is being queried. If this object is not part of a system instance, then all the component instances are returned. If this object is part of a system instance and the current SOM is set, then this method only returns those component instances that exist in the current SOM. If the current SOM is not set, then it returns all the component instances.


addComponentInstance

void addComponentInstance(ComponentInstance value)
Adds to the list the value of the 'Component Instance' containment reference list.

Parameters:
value - the value to add to 'Component Instance' containment reference list.

getSubcomponent

Subcomponent getSubcomponent()
Returns the value of the 'Subcomponent' reference.

If the meaning of the 'Subcomponent' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Subcomponent' reference.
See Also:
setSubcomponent(Subcomponent), InstancePackage.getComponentInstance_Subcomponent()

setSubcomponent

void setSubcomponent(Subcomponent value)
Sets the value of the 'Subcomponent' reference.

Parameters:
value - the new value of the 'Subcomponent' reference.
See Also:
getSubcomponent()

getSrcAccessConnection

org.eclipse.emf.common.util.EList getSrcAccessConnection()
Returns the value of the 'Src Access Connection' reference list. The list contents are of type AccessConnectionInstance. It is bidirectional and its opposite is 'Src'.

Get the access connection instances that begin at this component instance. This method is sensitive to the current system operation mode. The assumption is that this component instance {exists in the current system operation mode if it is being queried. If this object is not part of a system instance, then all the connections are returned; modifying the returned list in this case will change the model. If this object is part of a system instance and the current SOM is set, then this method only returns those connections instances that exist in the current SOM. Modifying the returned list in this case will not change the model. If the current SOM is not set, then it returns all the connection instances; modifying the returned list in this case will change the model.

Returns:
the value of the 'Src Access Connection' reference list.
See Also:
InstancePackage.getComponentInstance_SrcAccessConnection(), AccessConnectionInstance.getSrc()

addSrcAccessConnection

void addSrcAccessConnection(AccessConnectionInstance value)
Adds to the list the value of the 'Src Access Connection' reference list.

Parameters:
value - the value to add to 'Src Access Connection' reference list.

getModeInstance

org.eclipse.emf.common.util.EList getModeInstance()
Returns the value of the 'Mode Instance' containment reference list. The list contents are of type ModeInstance.

If the meaning of the 'Mode Instance' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Mode Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_ModeInstance()

addModeInstance

void addModeInstance(ModeInstance value)
Adds to the list the value of the 'Mode Instance' containment reference list.

Parameters:
value - the value to add to 'Mode Instance' containment reference list.

getModeTransitionInstance

org.eclipse.emf.common.util.EList getModeTransitionInstance()
Returns the value of the 'Mode Transition Instance' containment reference list. The list contents are of type ModeTransitionInstance.

If the meaning of the 'Mode Transition Instance' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Mode Transition Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_ModeTransitionInstance()

addModeTransitionInstance

void addModeTransitionInstance(ModeTransitionInstance value)
Adds to the list the value of the 'Mode Transition Instance' containment reference list.

Parameters:
value - the value to add to 'Mode Transition Instance' containment reference list.

getCategory

ComponentCategory getCategory()
Returns the value of the 'Category' attribute. The default value is "DATA". The literals are from the enumeration ComponentCategory.

If the meaning of the 'Category' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Category' attribute.
See Also:
ComponentCategory, setCategory(ComponentCategory), InstancePackage.getComponentInstance_Category()

setCategory

void setCategory(ComponentCategory value)
Sets the value of the 'Category' attribute.

Parameters:
value - the new value of the 'Category' attribute.
See Also:
ComponentCategory, getCategory()

getInModes

org.eclipse.emf.common.util.EList getInModes()
Returns the value of the 'In Modes' reference list. The list contents are of type ModeInstance.

If the meaning of the 'In Modes' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'In Modes' reference list.
See Also:
InstancePackage.getComponentInstance_InModes()

addInModes

void addInModes(ModeInstance value)
Adds to the list the value of the 'In Modes' reference list.

Parameters:
value - the value to add to 'In Modes' reference list.

getFlowSpecInstance

org.eclipse.emf.common.util.EList getFlowSpecInstance()
Returns the value of the 'Flow Spec Instance' containment reference list. The list contents are of type FlowSpecInstance.

If the meaning of the 'Flow Spec Instance' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Flow Spec Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_FlowSpecInstance()

addFlowSpecInstance

void addFlowSpecInstance(FlowSpecInstance value)
Adds to the list the value of the 'Flow Spec Instance' containment reference list.

Parameters:
value - the value to add to 'Flow Spec Instance' containment reference list.

getEndToEndFlowInstance

org.eclipse.emf.common.util.EList getEndToEndFlowInstance()
Returns the value of the 'End To End Flow Instance' containment reference list. The list contents are of type EndToEndFlowInstance.

Get the end-to-end flow instances that are part of this component instance. This method is sensitive to the current system operation mode. The assumption is that this component instance {exists in the current system operation mode if it is being queried. If this object is not part of a system instance, then all the end to end flows are returned; modifying the returned list in this case will change the model. If this object is part of a system instance and the current SOM is set, then this method only returns those end to end flow instances that exist in the current SOM. Modifying the returned list in this case will not change the model. If the current SOM is not set, then it returns all the end to end flow instances; modifying the returned list in this case will change the model.

Returns:
the value of the 'End To End Flow Instance' containment reference list.
See Also:
InstancePackage.getComponentInstance_EndToEndFlowInstance()

addEndToEndFlowInstance

void addEndToEndFlowInstance(EndToEndFlowInstance value)
Adds to the list the value of the 'End To End Flow Instance' containment reference list.

Parameters:
value - the value to add to 'End To End Flow Instance' containment reference list.

getXComponentImpl

ComponentImpl getXComponentImpl()
Get the ComponentImplassociated with this component instance.

Returns:
The component implementation associated with this instance, or null if one cannot be found.

getXComponentType

ComponentType getXComponentType()
Get the ComponentTypeassociated with this component instance.

Returns:
The component type associated with this instance, or null if one cannot be found.

getXComponentClassifier

ComponentClassifier getXComponentClassifier()
Get the ComponentClassifierassociated with this component instance.

Returns:
The component classsifier associated with this instance, or null if one cannot be found.

findSubcomponentInstance

ComponentInstance findSubcomponentInstance(Subcomponent sc)
find the subcomponent instance of this component instance

This method is sensitive to the current system operation mode of the containing system instance. The component instance corresponding ot the subcomponent is only returned if it exists in the current som.

Parameters:
sc - subcomponent
Returns:
component instance with the specified subcomponent, or null

findFeatureInstance

FeatureInstance findFeatureInstance(Feature feature)
find the feature instance of this component instance

Parameters:
feature - feature whose instance is to be found
Returns:
feature instance with the specified feature, or null

findFlowSpecInstance

FlowSpecInstance findFlowSpecInstance(FlowSpec flowspec)
find the flowspec instance of this component instance

Parameters:
flowspec - flowspec whose instance is to be found
Returns:
flowspec instance with the specified flowspec, or null

findEndToEndFlowInstance

EndToEndFlowInstance findEndToEndFlowInstance(EndToEndFlow ete)
Find the end to end flow instance of this component that corresponds to the given end to end flow.

This method is sensitive to the current system operation mode. It only returns the end to end flow instance if it exists in the current mode.

Parameters:
ete - endtoendflow whose instance is to be found
Returns:
endtoendflow instance with the specified endtoendflow, or null

findModeInstance

ModeInstance findModeInstance(Mode mode)
find the mode instance of this component instance

Parameters:
mode - mode whose instance is to be found
Returns:
mode instance with the specified mode, or null

findModeTransitionInstance

ModeTransitionInstance findModeTransitionInstance(ModeTransition mt)
find the mode transition instance of this component instance

Parameters:
mt - mode transition whose instance is to be found
Returns:
mode transition instance with the specified mode transition, or null

findConnectionInstance

org.eclipse.emf.common.util.EList findConnectionInstance(Connection conn)
Find the semantic connection instances that pass through this component instance that utilize the given connection. Returns a list because a connection can be in multiple semantic connections if there are multiple connections coming in or going out of a port.

This method is sensitive to the current system operation mode. It only returns those connection instances that exist in the current SOM.

Parameters:
conn - Connection whose instance is to be found
Returns:
Connection instance list with the specified Connection

getComponentInstance

org.eclipse.emf.common.util.EList getComponentInstance(ModeInstance mode)
retrieve the subset of sub-component instances that are part of the specified mode

Parameters:
mode - ModeInstance to be used to select the subset
Returns:
EList of ComponentInstance of the subcomponent subset

getPreOrderComponentInstance

org.eclipse.emf.common.util.EList getPreOrderComponentInstance(ComponentCategory cat)
returns preorder list of component instances of the specified category. Takes into account SOMIterator when traversing the content hierarchy of model instances

Parameters:
cat - component category
Returns:
result EList of component instance of the given category

getChildren

org.eclipse.emf.common.util.EList getChildren()
get the children of a ComponentInstance object This will be the content or in case of a modal ComponentInstance the subset of children that is active in a given mode. The method assumes the component exists in the current system operation mode because otherwise how would the caller have a reference to it.

Specified by:
getChildren in interface AObject
Returns:
EList AObject

getChildren

org.eclipse.emf.common.util.EList getChildren(ModeInstance mode)
Get the child of a component instance object that exist in the given mode.

Parameters:
mode - The mode instance
Returns:
The list of children that exist in the given mode.

testClassifier

boolean testClassifier(java.util.Set classifiers)
Test a component against a set of ComponentClassifiers.

Returns:
Whether the component's classifier type is a descendent of any of the given component classifiers. Returns true if the given set is empty!

getReferenceTo

ReferenceValue getReferenceTo()
Create a ReferenceValue that references the subcomponent associated with the component instance. The reference is rooted at the system implementation associated with the system instance that contains the component instance. Returns null if ci is a SystemInstance. The resulting value is useful, for example, for being use the value of a contained property association.


getReferencePathTo

java.util.List getReferencePathTo()
Get a List containing the subcomponent path that references the subcomponent associated the component instance. The reference is rooted at the system implementation associated with the system instance that contains the component instance. The resulting list is useful for setting the "applies to" clause of a contained property association.

Returns:
A list of Subcomponent objects describing the path to the component.

findInstanceObject

java.util.Collection findInstanceObject(org.eclipse.emf.common.util.EList referencePath)
Find the instance object based on the referencePath relative to this component instance.

This method is sensitive to the current system operation mode of the containing system instance. The object is only returned if it exists in the current som.

Parameters:
referencePath - sequence of pointers into the declarative model to subcomponents, features, etc.
Returns:
InstanceObject collection

getOutgoingConnection

org.eclipse.emf.common.util.EList getOutgoingConnection(Feature feature)
get outgoing connections for specified feature

Parameters:
feature - component feature that is the source of a connection
Returns:
EList Connection connections with feature as source for ConnectionInstances see methods on FeatureInstance

getOutgoingAccessConnection

org.eclipse.emf.common.util.EList getOutgoingAccessConnection()
get outgoing access connections for bus/data component

Returns:
EList Connection access connections with subcomponent as source

getIncomingConnection

org.eclipse.emf.common.util.EList getIncomingConnection(Feature feature)
get incoming connections for specified feature

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

getOutcomingConnection

org.eclipse.emf.common.util.EList getOutcomingConnection(Feature feature)
get outcoming connections for specified feature connections from within the ocmponent for which this feature is the destination

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

getIngoingConnection

org.eclipse.emf.common.util.EList getIngoingConnection(Feature feature)
get ingoing connections for specified feature connections to within the ocmponent for which this feature is the source

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

findFlowSpecInstance

FlowSpecInstance findFlowSpecInstance(FeatureInstance srcFeatureInstance)
find the flowspec instance of this component instance

Parameters:
srcFeatureInstance - feature instance that is the source of the flowspecinstance
Returns:
flowspec instance with the specified flowspec, or null

doFlowSpecInstances

void doFlowSpecInstances()
add flowspec instances to the component instance


setCurrentMode

void setCurrentMode(ModeInstance mode)
Project this component into the given mode. The mode must be an element of getModeInstance(). This method is only intended to be used internally. 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.

Parameters:
mode - The mode to project this component into, or null if it is not projected into any mode.

getCurrentMode

ModeInstance getCurrentMode()
Get the mode this component is currently projected into.

Returns:
The mode this component is projected into, or null if it is not projected into any mode.

isModal

boolean isModal()
Is the component modal? That is, does the component have modes? A component is modal if it has a non-empty set of ModeInstances. This method is equivalent to !getModeInstance().isEmpty(), but communicates a clearer semantic message and the model.


isModalSubcomponent

boolean isModalSubcomponent()
Is the component a modal subcompnent? That is, does the existence of this component depend on the current mode of its parent? A component is a modal subcomponent if it has a non-empty set of "inModes". This methods is equivalent to !getInModes().isEmpty(), but communicates a clearer semantic message about the model.


exists

boolean exists()
Does the component exist in the current system operation mode of its containing system instance? A component exists if it is the system instance, or if its parent exists and the component exists in the current mode of its parent. A component exists in the current mode of its parent if the component is not a modal subcomponent or if the current mode of the parent is contained in the component's mode list.

If the containing system instance does not have a current system operation mode set, then this returns true.