From 2531cfb60d747c261a20201415728beb0e24ab9b Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Mon, 15 Apr 2019 16:23:19 +0200 Subject: Satellite constellation case study WIP --- .../domains/satellite/impl/SpacecraftImpl.java | 184 +++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java new file mode 100644 index 00000000..caefd377 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java @@ -0,0 +1,184 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.satellite.impl; + +import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload; +import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; + +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 'Spacecraft'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class SpacecraftImpl extends CommunicatingElementImpl implements Spacecraft { + /** + * The cached value of the '{@link #getPayload() Payload}' containment reference. + * + * + * @see #getPayload() + * @generated + * @ordered + */ + protected Payload payload; + + /** + * + * + * @generated + */ + protected SpacecraftImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SatellitePackage.Literals.SPACECRAFT; + } + + /** + * + * + * @generated + */ + @Override + public Payload getPayload() { + return payload; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetPayload(Payload newPayload, NotificationChain msgs) { + Payload oldPayload = payload; + payload = newPayload; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SatellitePackage.SPACECRAFT__PAYLOAD, oldPayload, newPayload); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setPayload(Payload newPayload) { + if (newPayload != payload) { + NotificationChain msgs = null; + if (payload != null) + msgs = ((InternalEObject) payload).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); + if (newPayload != null) + msgs = ((InternalEObject) newPayload).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.SPACECRAFT__PAYLOAD, null, msgs); + msgs = basicSetPayload(newPayload, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__PAYLOAD, newPayload, + newPayload)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SatellitePackage.SPACECRAFT__PAYLOAD: + return basicSetPayload(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SatellitePackage.SPACECRAFT__PAYLOAD: + return getPayload(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SatellitePackage.SPACECRAFT__PAYLOAD: + setPayload((Payload) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SatellitePackage.SPACECRAFT__PAYLOAD: + setPayload((Payload) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SatellitePackage.SPACECRAFT__PAYLOAD: + return payload != null; + } + return super.eIsSet(featureID); + } + +} //SpacecraftImpl -- cgit v1.2.3-70-g09d2