From 615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 6 Feb 2019 18:28:18 +0100 Subject: Extract component fault tree model --- .../faulttree/model/ft/impl/BasicEventImpl.java | 177 +++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java') diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java new file mode 100644 index 00000000..8fd0f613 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java @@ -0,0 +1,177 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent; +import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution; +import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Basic Event'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class BasicEventImpl extends EventImpl implements BasicEvent { + /** + * The cached value of the '{@link #getDistribution() Distribution}' containment reference. + * + * + * @see #getDistribution() + * @generated + * @ordered + */ + protected Distribution distribution; + + /** + * + * + * @generated + */ + protected BasicEventImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FtPackage.Literals.BASIC_EVENT; + } + + /** + * + * + * @generated + */ + @Override + public Distribution getDistribution() { + return distribution; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDistribution(Distribution newDistribution, NotificationChain msgs) { + Distribution oldDistribution = distribution; + distribution = newDistribution; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FtPackage.BASIC_EVENT__DISTRIBUTION, oldDistribution, newDistribution); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setDistribution(Distribution newDistribution) { + if (newDistribution != distribution) { + NotificationChain msgs = null; + if (distribution != null) + msgs = ((InternalEObject)distribution).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FtPackage.BASIC_EVENT__DISTRIBUTION, null, msgs); + if (newDistribution != null) + msgs = ((InternalEObject)newDistribution).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FtPackage.BASIC_EVENT__DISTRIBUTION, null, msgs); + msgs = basicSetDistribution(newDistribution, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.BASIC_EVENT__DISTRIBUTION, newDistribution, newDistribution)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FtPackage.BASIC_EVENT__DISTRIBUTION: + return basicSetDistribution(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FtPackage.BASIC_EVENT__DISTRIBUTION: + return getDistribution(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FtPackage.BASIC_EVENT__DISTRIBUTION: + setDistribution((Distribution)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FtPackage.BASIC_EVENT__DISTRIBUTION: + setDistribution((Distribution)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FtPackage.BASIC_EVENT__DISTRIBUTION: + return distribution != null; + } + return super.eIsSet(featureID); + } + +} //BasicEventImpl -- cgit v1.2.3-70-g09d2