Commit 695e7361 authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '15-voltage-is-missing-inside-line' into 'master'

Resolve "Voltage is missing inside Line"

Closes #15

See merge request RiseClipseGroup/RiseClipseMetamodel_SCL2003!13
parents e41cd942 f52cdb02
......@@ -1013,3 +1013,5 @@ _UI_DOType_ReferredBySDO_feature = Referred By SDO
_UI_SDO_RefersToDOType_feature = Refers To DO Type
_UI_ExtRef_desc_feature = Desc
_UI_IEDName_value_feature = Value
_UI_Line_Voltage_feature = Voltage
_UI_Voltage_Line_feature = Line
......@@ -102,6 +102,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
super.getChildrenFeatures(object);
childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConnectivityNode());
childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConductingEquipment());
childrenFeatures.add(SclPackage.eINSTANCE.getLine_Voltage());
}
return childrenFeatures;
}
......@@ -162,6 +163,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
return;
case SclPackage.LINE__CONNECTIVITY_NODE:
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
case SclPackage.LINE__VOLTAGE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
......@@ -188,6 +190,11 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
(createChildParameter
(SclPackage.eINSTANCE.getLine_ConductingEquipment(),
SclFactory.eINSTANCE.createConductingEquipment()));
newChildDescriptors.add
(createChildParameter
(SclPackage.eINSTANCE.getLine_Voltage(),
SclFactory.eINSTANCE.createVoltage()));
}
}
......@@ -132,6 +132,8 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ConductingEquipment" ordered="false"
upperBound="-1" eType="#//ConductingEquipment" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//ConductingEquipment/Line"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="Voltage" eType="#//Voltage"
unsettable="true" containment="true" resolveProxies="false" eOpposite="#//Voltage/Line"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Naming" abstract="true" eSuperTypes="#//BaseElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
......@@ -1940,6 +1942,8 @@
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="simple"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="Line" eType="#//Line" transient="true"
unsettable="true" resolveProxies="false" eOpposite="#//Line/Voltage"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VoltageLevel" eSuperTypes="#//EquipmentContainer">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="nomFreq" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"
......
......@@ -156,6 +156,7 @@
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//Line/SCL"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//Line/ConnectivityNode"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//Line/ConductingEquipment"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//Line/Voltage"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//Naming">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//Naming/name"/>
......@@ -1008,7 +1009,9 @@
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//TransformerWinding/PowerTransformer"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//TransformerWinding/TapChanger"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//Voltage"/>
<genClasses ecoreClass="SCL.ecore#//Voltage">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//Voltage/Line"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//VoltageLevel">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/nomFreq"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/numPhases"/>
......
......@@ -34,6 +34,7 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getSCL <em>SCL</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getConnectivityNode <em>Connectivity Node</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getConductingEquipment <em>Conducting Equipment</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLine()
......@@ -232,4 +233,59 @@ public interface Line extends GeneralEquipmentContainer {
*/
boolean isSetConductingEquipment();
/**
* Returns the value of the '<em><b>Voltage</b></em>' containment reference.
* It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine <em>Line</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Voltage</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Voltage</em>' containment reference.
* @see #isSetVoltage()
* @see #unsetVoltage()
* @see #setVoltage(Voltage)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLine_Voltage()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine
* @model opposite="Line" containment="true" unsettable="true"
* @generated
*/
Voltage getVoltage();
/**
* Sets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Voltage</em>' containment reference.
* @see #isSetVoltage()
* @see #unsetVoltage()
* @see #getVoltage()
* @generated
*/
void setVoltage(Voltage value);
/**
* Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetVoltage()
* @see #getVoltage()
* @see #setVoltage(Voltage)
* @generated
*/
void unsetVoltage();
/**
* Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}' containment reference is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Voltage</em>' containment reference is set.
* @see #unsetVoltage()
* @see #getVoltage()
* @see #setVoltage(Voltage)
* @generated
*/
boolean isSetVoltage();
} // Line
......@@ -1202,6 +1202,15 @@ public interface SclPackage extends EPackage {
*/
int LINE__CONDUCTING_EQUIPMENT = GENERAL_EQUIPMENT_CONTAINER_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Voltage</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LINE__VOLTAGE = GENERAL_EQUIPMENT_CONTAINER_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Line</em>' class.
* <!-- begin-user-doc -->
......@@ -1209,7 +1218,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int LINE_FEATURE_COUNT = GENERAL_EQUIPMENT_CONTAINER_FEATURE_COUNT + 5;
int LINE_FEATURE_COUNT = GENERAL_EQUIPMENT_CONTAINER_FEATURE_COUNT + 6;
/**
* The number of operations of the '<em>Line</em>' class.
......@@ -17014,6 +17023,15 @@ public interface SclPackage extends EPackage {
*/
int VOLTAGE__UNIT = VALUE_WITH_UNIT__UNIT;
/**
* The feature id for the '<em><b>Line</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int VOLTAGE__LINE = VALUE_WITH_UNIT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Voltage</em>' class.
* <!-- begin-user-doc -->
......@@ -17021,7 +17039,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int VOLTAGE_FEATURE_COUNT = VALUE_WITH_UNIT_FEATURE_COUNT + 0;
int VOLTAGE_FEATURE_COUNT = VALUE_WITH_UNIT_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Voltage</em>' class.
......@@ -18292,6 +18310,17 @@ public interface SclPackage extends EPackage {
*/
EReference getLine_ConductingEquipment();
/**
* Returns the meta object for the containment reference '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Voltage</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage()
* @see #getLine()
* @generated
*/
EReference getLine_Voltage();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Naming <em>Naming</em>}'.
* <!-- begin-user-doc -->
......@@ -26293,6 +26322,17 @@ public interface SclPackage extends EPackage {
*/
EClass getVoltage();
/**
* Returns the meta object for the container reference '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine <em>Line</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Line</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine()
* @see #getVoltage()
* @generated
*/
EReference getVoltage_Line();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.VoltageLevel <em>Voltage Level</em>}'.
* <!-- begin-user-doc -->
......
......@@ -23,6 +23,12 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl;
* A representation of the model object '<em><b>Voltage</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine <em>Line</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getVoltage()
* @model extendedMetaData="kind='simple'"
......@@ -30,4 +36,32 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl;
*/
public interface Voltage extends ValueWithUnit {
/**
* Returns the value of the '<em><b>Line</b></em>' container reference.
* It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Line</em>' container reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Line</em>' container reference.
* @see #setLine(Line)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getVoltage_Line()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage
* @model opposite="Voltage" resolveProxies="false" unsettable="true"
* @generated
*/
Line getLine();
/**
* Sets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage#getLine <em>Line</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Line</em>' container reference.
* @see #getLine()
* @generated
*/
void setLine(Line value);
} // Voltage
......@@ -34,6 +34,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectivityNode;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.Line;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SCL;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage;
/**
* <!-- begin-user-doc -->
......@@ -48,6 +49,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LineImpl#getSCL <em>SCL</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LineImpl#getConnectivityNode <em>Connectivity Node</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LineImpl#getConductingEquipment <em>Conducting Equipment</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LineImpl#getVoltage <em>Voltage</em>}</li>
* </ul>
*
* @generated
......@@ -102,6 +104,25 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
*/
protected EList<ConductingEquipment> conductingEquipment;
/**
* The cached value of the '{@link #getVoltage() <em>Voltage</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getVoltage()
* @generated
* @ordered
*/
protected Voltage voltage;
/**
* This is true if the Voltage containment reference has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean voltageESet;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -310,6 +331,101 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return conductingEquipment != null && ((InternalEList.Unsettable<?>)conductingEquipment).isSet();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Voltage getVoltage() {
return voltage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetVoltage(Voltage newVoltage, NotificationChain msgs) {
Voltage oldVoltage = voltage;
voltage = newVoltage;
boolean oldVoltageESet = voltageESet;
voltageESet = true;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SclPackage.LINE__VOLTAGE, oldVoltage, newVoltage, !oldVoltageESet);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setVoltage(Voltage newVoltage) {
if (newVoltage != voltage) {
NotificationChain msgs = null;
if (voltage != null)
msgs = ((InternalEObject)voltage).eInverseRemove(this, SclPackage.VOLTAGE__LINE, Voltage.class, msgs);
if (newVoltage != null)
msgs = ((InternalEObject)newVoltage).eInverseAdd(this, SclPackage.VOLTAGE__LINE, Voltage.class, msgs);
msgs = basicSetVoltage(newVoltage, msgs);
if (msgs != null) msgs.dispatch();
}
else {
boolean oldVoltageESet = voltageESet;
voltageESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SclPackage.LINE__VOLTAGE, newVoltage, newVoltage, !oldVoltageESet));
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicUnsetVoltage(NotificationChain msgs) {
Voltage oldVoltage = voltage;
voltage = null;
boolean oldVoltageESet = voltageESet;
voltageESet = false;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, SclPackage.LINE__VOLTAGE, oldVoltage, null, oldVoltageESet);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void unsetVoltage() {
if (voltage != null) {
NotificationChain msgs = null;
msgs = ((InternalEObject)voltage).eInverseRemove(this, SclPackage.VOLTAGE__LINE, Voltage.class, msgs);
msgs = basicUnsetVoltage(msgs);
if (msgs != null) msgs.dispatch();
}
else {
boolean oldVoltageESet = voltageESet;
voltageESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, SclPackage.LINE__VOLTAGE, null, null, oldVoltageESet));
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetVoltage() {
return voltageESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -331,6 +447,10 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return ((InternalEList<InternalEObject>)(InternalEList<?>)getConnectivityNode()).basicAdd(otherEnd, msgs);
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getConductingEquipment()).basicAdd(otherEnd, msgs);
case SclPackage.LINE__VOLTAGE:
if (voltage != null)
msgs = ((InternalEObject)voltage).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SclPackage.LINE__VOLTAGE, null, msgs);
return basicSetVoltage((Voltage)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
......@@ -351,6 +471,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return ((InternalEList<?>)getConnectivityNode()).basicRemove(otherEnd, msgs);
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return ((InternalEList<?>)getConductingEquipment()).basicRemove(otherEnd, msgs);
case SclPackage.LINE__VOLTAGE:
return basicUnsetVoltage(msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
......@@ -389,6 +511,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return getConnectivityNode();
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return getConductingEquipment();
case SclPackage.LINE__VOLTAGE:
return getVoltage();
}
return super.eGet(featureID, resolve, coreType);
}
......@@ -419,6 +543,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
getConductingEquipment().clear();
getConductingEquipment().addAll((Collection<? extends ConductingEquipment>)newValue);
return;
case SclPackage.LINE__VOLTAGE:
setVoltage((Voltage)newValue);
return;
}
super.eSet(featureID, newValue);
}
......@@ -446,6 +573,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
unsetConductingEquipment();
return;
case SclPackage.LINE__VOLTAGE:
unsetVoltage();
return;
}
super.eUnset(featureID);
}
......@@ -468,6 +598,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return isSetConnectivityNode();
case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return isSetConductingEquipment();
case SclPackage.LINE__VOLTAGE:
return isSetVoltage();
}
return super.eIsSet(featureID);
}
......
......@@ -1705,6 +1705,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return (EReference)getLine().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getLine_Voltage() {
return (EReference)getLine().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -8782,6 +8791,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return voltageEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getVoltage_Line() {
return (EReference)getVoltage().getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -18,16 +18,28 @@
*/
package fr.centralesupelec.edf.riseclipse.iec61850.scl.impl;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.Line;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.UnitMultiplierEnum;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Voltage</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.VoltageImpl#getLine <em>Line</em>}</li>
* </ul>
*
* @generated
*/
......@@ -61,4 +73,147 @@ public class VoltageImpl extends ValueWithUnitImpl implements Voltage {
return SclPackage.eINSTANCE.getVoltage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Line getLine() {
if (eContainerFeatureID() != SclPackage.VOLTAGE__LINE) return null;
return (Line)eInternalContainer();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLine(Line newLine, NotificationChain msgs) {
msgs = eBasicSetContainer((InternalEObject)newLine, SclPackage.VOLTAGE__LINE, msgs);
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLine(Line newLine) {
if (newLine != eInternalContainer() || (eContainerFeatureID() != SclPackage.VOLTAGE__LINE && newLine != null)) {
if (EcoreUtil.isAncestor(this, newLine))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newLine != null)
msgs = ((InternalEObject)newLine).eInverseAdd(this, SclPackage.LINE__VOLTAGE, Line.class, msgs);
msgs = basicSetLine(newLine, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SclPackage.VOLTAGE__LINE, newLine, newLine));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SclPackage.VOLTAGE__LINE:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
return basicSetLine((Line)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SclPackage.VOLTAGE__LINE:
return basicSetLine(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
switch (eContainerFeatureID()) {
case SclPackage.VOLTAGE__LINE:
return eInternalContainer().eInverseRemove(this, SclPackage.LINE__VOLTAGE, Line.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SclPackage.VOLTAGE__LINE:
return getLine();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SclPackage.VOLTAGE__LINE:
setLine((Line)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch