use of org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd in project osate2 by osate.
the class PropagationGraphPathImpl method basicSetPathDst.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPathDst(PropagationPathEnd newPathDst, NotificationChain msgs) {
PropagationPathEnd oldPathDst = pathDst;
pathDst = newPathDst;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropagationGraphPackage.PROPAGATION_GRAPH_PATH__PATH_DST, oldPathDst, newPathDst);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd in project osate2 by osate.
the class Util method getAllPropagationPaths.
/**
* return all propagation paths out of the outgoing error propagation we
* assume that any type token to be propagated meets the ep type constraint
*
* @param ci
* @param outEP
* @return
*/
public static EList<PropagationGraphPath> getAllPropagationPaths(PropagationGraph pg, ComponentInstance ci, ErrorPropagation outEP) {
EList<PropagationGraphPath> result = new BasicEList<PropagationGraphPath>();
for (PropagationGraphPath propagationPath : pg.getPropagationGraphPaths()) {
PropagationPathEnd src = propagationPath.getPathSrc();
if (src.getComponentInstance() == ci) {
if (src.getErrorPropagation() == outEP) {
result.add(propagationPath);
} else {
// check if one EP is in an ancestor feature instance
FeatureInstance outepfi = EMV2Util.findFeatureInstance(outEP, ci);
FeatureInstance srcfi = EMV2Util.findFeatureInstance(src.getErrorPropagation(), ci);
if (Aadl2InstanceUtil.containedIn(outepfi, srcfi) || Aadl2InstanceUtil.containedIn(srcfi, outepfi)) {
result.add(propagationPath);
}
}
}
}
return result;
}
use of org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd in project osate2 by osate.
the class PropagationGraphPackageImpl method initializePackageContents.
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
InstancePackage theInstancePackage = (InstancePackage) EPackage.Registry.INSTANCE.getEPackage(InstancePackage.eNS_URI);
ErrorModelPackage theErrorModelPackage = (ErrorModelPackage) EPackage.Registry.INSTANCE.getEPackage(ErrorModelPackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(propagationGraphEClass, PropagationGraph.class, "PropagationGraph", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPropagationGraph_Name(), ecorePackage.getEString(), "name", null, 0, 1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPropagationGraph_Description(), ecorePackage.getEString(), "description", null, 0, 1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraph_Components(), theInstancePackage.getComponentInstance(), null, "components", null, 0, -1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraph_PropagationGraphPaths(), this.getPropagationGraphPath(), null, "propagationGraphPaths", null, 0, -1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraph_Connections(), theInstancePackage.getConnectionInstance(), null, "connections", null, 0, -1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraph_Root(), theInstancePackage.getComponentInstance(), null, "root", null, 0, 1, PropagationGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(propagationGraphPathEClass, PropagationGraphPath.class, "PropagationGraphPath", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPropagationGraphPath_Name(), ecorePackage.getEString(), "name", null, 0, 1, PropagationGraphPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraphPath_PathSrc(), this.getPropagationPathEnd(), null, "pathSrc", null, 0, 1, PropagationGraphPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraphPath_PathDst(), this.getPropagationPathEnd(), null, "pathDst", null, 0, 1, PropagationGraphPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPropagationGraphPath_Highlight(), ecorePackage.getEBoolean(), "highlight", null, 0, 1, PropagationGraphPath.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPropagationGraphPath_Type(), this.getPropagationType(), "type", null, 0, 1, PropagationGraphPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationGraphPath_Connection(), theInstancePackage.getConnectionInstance(), null, "connection", null, 0, 1, PropagationGraphPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(propagationPathEndEClass, PropagationPathEnd.class, "PropagationPathEnd", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPropagationPathEnd_ConnectionInstance(), theInstancePackage.getConnectionInstance(), null, "connectionInstance", null, 0, 1, PropagationPathEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationPathEnd_ErrorPropagation(), theErrorModelPackage.getErrorPropagation(), null, "errorPropagation", null, 0, 1, PropagationPathEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPropagationPathEnd_ComponentInstance(), theInstancePackage.getComponentInstance(), null, "componentInstance", null, 0, 1, PropagationPathEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPropagationPathEnd_Highlight(), ecorePackage.getEBoolean(), "highlight", null, 0, 1, PropagationPathEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(propagationTypeEEnum, PropagationType.class, "PropagationType");
addEEnumLiteral(propagationTypeEEnum, PropagationType.CONNECTION);
addEEnumLiteral(propagationTypeEEnum, PropagationType.BINDING);
addEEnumLiteral(propagationTypeEEnum, PropagationType.USER_DEFINED);
// Create resource
createResource(eNS_URI);
}
use of org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd in project osate2 by osate.
the class PropagationGraphPathImpl method basicSetPathSrc.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPathSrc(PropagationPathEnd newPathSrc, NotificationChain msgs) {
PropagationPathEnd oldPathSrc = pathSrc;
pathSrc = newPathSrc;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropagationGraphPackage.PROPAGATION_GRAPH_PATH__PATH_SRC, oldPathSrc, newPathSrc);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.osate.aadl2.errormodel.PropagationGraph.PropagationPathEnd in project osate2 by osate.
the class Util method addPropagationpathRecord.
private static void addPropagationpathRecord(PropagationGraph pg, ComponentInstance srcCI, ErrorPropagation srcprop, ConnectionInstance dstConni) {
PropagationGraphPath path = PropagationGraphFactory.eINSTANCE.createPropagationGraphPath();
PropagationPathEnd srcPE = PropagationGraphFactory.eINSTANCE.createPropagationPathEnd();
PropagationPathEnd dstPE = PropagationGraphFactory.eINSTANCE.createPropagationPathEnd();
srcPE.setComponentInstance(srcCI);
srcPE.setErrorPropagation(srcprop);
dstPE.setConnectionInstance(dstConni);
dstPE.setErrorPropagation(null);
path.setPathSrc(srcPE);
path.setPathDst(dstPE);
// new PropagationPathRecord(srcCI, srcprop, dstCI, dstprop, connectionInstance);
pg.getPropagationGraphPaths().add(path);
pg.getComponents().add(srcCI);
}
Aggregations