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 --- .../satellite/impl/ConstellationMissionImpl.java | 237 +++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/ConstellationMissionImpl.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/ConstellationMissionImpl.java') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/ConstellationMissionImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/ConstellationMissionImpl.java new file mode 100644 index 00000000..710b5982 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/ConstellationMissionImpl.java @@ -0,0 +1,237 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.satellite.impl; + +import hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission; +import hu.bme.mit.inf.dslreasoner.domains.satellite.GroundStationNetwork; +import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +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 org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Constellation Mission'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public abstract class ConstellationMissionImpl extends MinimalEObjectImpl.Container implements ConstellationMission { + /** + * The cached value of the '{@link #getGroundStationNetwork() Ground Station Network}' containment reference. + * + * + * @see #getGroundStationNetwork() + * @generated + * @ordered + */ + protected GroundStationNetwork groundStationNetwork; + + /** + * The cached value of the '{@link #getSpacecraft() Spacecraft}' containment reference list. + * + * + * @see #getSpacecraft() + * @generated + * @ordered + */ + protected EList spacecraft; + + /** + * + * + * @generated + */ + protected ConstellationMissionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SatellitePackage.Literals.CONSTELLATION_MISSION; + } + + /** + * + * + * @generated + */ + @Override + public GroundStationNetwork getGroundStationNetwork() { + return groundStationNetwork; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGroundStationNetwork(GroundStationNetwork newGroundStationNetwork, + NotificationChain msgs) { + GroundStationNetwork oldGroundStationNetwork = groundStationNetwork; + groundStationNetwork = newGroundStationNetwork; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, oldGroundStationNetwork, + newGroundStationNetwork); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setGroundStationNetwork(GroundStationNetwork newGroundStationNetwork) { + if (newGroundStationNetwork != groundStationNetwork) { + NotificationChain msgs = null; + if (groundStationNetwork != null) + msgs = ((InternalEObject) groundStationNetwork).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, null, + msgs); + if (newGroundStationNetwork != null) + msgs = ((InternalEObject) newGroundStationNetwork).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, null, + msgs); + msgs = basicSetGroundStationNetwork(newGroundStationNetwork, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK, newGroundStationNetwork, + newGroundStationNetwork)); + } + + /** + * + * + * @generated + */ + @Override + public EList getSpacecraft() { + if (spacecraft == null) { + spacecraft = new EObjectContainmentEList(Spacecraft.class, this, + SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT); + } + return spacecraft; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK: + return basicSetGroundStationNetwork(null, msgs); + case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT: + return ((InternalEList) getSpacecraft()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK: + return getGroundStationNetwork(); + case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT: + return getSpacecraft(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK: + setGroundStationNetwork((GroundStationNetwork) newValue); + return; + case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT: + getSpacecraft().clear(); + getSpacecraft().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK: + setGroundStationNetwork((GroundStationNetwork) null); + return; + case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT: + getSpacecraft().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SatellitePackage.CONSTELLATION_MISSION__GROUND_STATION_NETWORK: + return groundStationNetwork != null; + case SatellitePackage.CONSTELLATION_MISSION__SPACECRAFT: + return spacecraft != null && !spacecraft.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ConstellationMissionImpl -- cgit v1.2.3-70-g09d2