From 3f5aaab5025b8eb243f414b1c789085327df04f4 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 20 Mar 2019 16:09:09 +0100 Subject: Fault tree transformation for partial models WIP --- .../faulttree/model/cft/impl/ConnectionImpl.java | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java') diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java index 7506e4d7..aea86ed4 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java @@ -5,6 +5,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; +import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; import org.eclipse.emf.common.notify.Notification; @@ -26,6 +27,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * The following features are implemented: *

* @@ -33,6 +35,26 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * @generated */ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Connection { + /** + * The default value of the '{@link #getExists() Exists}' attribute. + * + * + * @see #getExists() + * @generated + * @ordered + */ + protected static final Modality EXISTS_EDEFAULT = Modality.MUST; + + /** + * The cached value of the '{@link #getExists() Exists}' attribute. + * + * + * @see #getExists() + * @generated + * @ordered + */ + protected Modality exists = EXISTS_EDEFAULT; + /** * The cached value of the '{@link #getOutput() Output}' reference. * @@ -167,6 +189,29 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__OUTPUT, newOutput, newOutput)); } + /** + * + * + * @generated + */ + @Override + public Modality getExists() { + return exists; + } + + /** + * + * + * @generated + */ + @Override + public void setExists(Modality newExists) { + Modality oldExists = exists; + exists = newExists == null ? EXISTS_EDEFAULT : newExists; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__EXISTS, oldExists, exists)); + } + /** * * @@ -225,6 +270,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { + case CftPackage.CONNECTION__EXISTS: + return getExists(); case CftPackage.CONNECTION__INPUT: return getInput(); case CftPackage.CONNECTION__OUTPUT: @@ -242,6 +289,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn @Override public void eSet(int featureID, Object newValue) { switch (featureID) { + case CftPackage.CONNECTION__EXISTS: + setExists((Modality)newValue); + return; case CftPackage.CONNECTION__INPUT: setInput((Input)newValue); return; @@ -260,6 +310,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn @Override public void eUnset(int featureID) { switch (featureID) { + case CftPackage.CONNECTION__EXISTS: + setExists(EXISTS_EDEFAULT); + return; case CftPackage.CONNECTION__INPUT: setInput((Input)null); return; @@ -278,6 +331,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn @Override public boolean eIsSet(int featureID) { switch (featureID) { + case CftPackage.CONNECTION__EXISTS: + return exists != EXISTS_EDEFAULT; case CftPackage.CONNECTION__INPUT: return getInput() != null; case CftPackage.CONNECTION__OUTPUT: @@ -286,4 +341,20 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn return super.eIsSet(featureID); } + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (exists: "); + result.append(exists); + result.append(')'); + return result.toString(); + } + } //ConnectionImpl -- cgit v1.2.3-70-g09d2