From 9b83e33c055660f6de218d1b672f67734675f1f6 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 7 May 2019 11:53:38 -0400 Subject: Try to restructure satellite case study --- .../satellite/impl/CommSubsystemImpl.java | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java index cf8f1fe8..70ee268e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java @@ -4,13 +4,16 @@ package satellite.impl; 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; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import satellite.AntennaGain; import satellite.CommSubsystem; +import satellite.DirectedCommunicationLink; import satellite.SatellitePackage; import satellite.TransceiverBand; @@ -24,6 +27,7 @@ import satellite.TransceiverBand; * * * @generated @@ -69,6 +73,16 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C */ protected AntennaGain gain = GAIN_EDEFAULT; + /** + * The cached value of the '{@link #getCommunicationLink() Communication Link}' containment reference. + * + * + * @see #getCommunicationLink() + * @generated + * @ordered + */ + protected DirectedCommunicationLink communicationLink; + /** * * @@ -136,6 +150,73 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C gain)); } + /** + * + * + * @generated + */ + @Override + public DirectedCommunicationLink getCommunicationLink() { + return communicationLink; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCommunicationLink(DirectedCommunicationLink newCommunicationLink, + NotificationChain msgs) { + DirectedCommunicationLink oldCommunicationLink = communicationLink; + communicationLink = newCommunicationLink; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, oldCommunicationLink, newCommunicationLink); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setCommunicationLink(DirectedCommunicationLink newCommunicationLink) { + if (newCommunicationLink != communicationLink) { + NotificationChain msgs = null; + if (communicationLink != null) + msgs = ((InternalEObject) communicationLink).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, null, msgs); + if (newCommunicationLink != null) + msgs = ((InternalEObject) newCommunicationLink).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, null, msgs); + msgs = basicSetCommunicationLink(newCommunicationLink, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, + newCommunicationLink, newCommunicationLink)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: + return basicSetCommunicationLink(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + /** * * @@ -148,6 +229,8 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C return getBand(); case SatellitePackage.COMM_SUBSYSTEM__GAIN: return getGain(); + case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: + return getCommunicationLink(); } return super.eGet(featureID, resolve, coreType); } @@ -166,6 +249,9 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C case SatellitePackage.COMM_SUBSYSTEM__GAIN: setGain((AntennaGain) newValue); return; + case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: + setCommunicationLink((DirectedCommunicationLink) newValue); + return; } super.eSet(featureID, newValue); } @@ -184,6 +270,9 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C case SatellitePackage.COMM_SUBSYSTEM__GAIN: setGain(GAIN_EDEFAULT); return; + case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: + setCommunicationLink((DirectedCommunicationLink) null); + return; } super.eUnset(featureID); } @@ -200,6 +289,8 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C return band != BAND_EDEFAULT; case SatellitePackage.COMM_SUBSYSTEM__GAIN: return gain != GAIN_EDEFAULT; + case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: + return communicationLink != null; } return super.eIsSet(featureID); } -- cgit v1.2.3-70-g09d2