Commit f52cdb02 authored by Dominique Marcadet's avatar Dominique Marcadet

Voltage inside Line added

parent e41cd942
...@@ -1013,3 +1013,5 @@ _UI_DOType_ReferredBySDO_feature = Referred By SDO ...@@ -1013,3 +1013,5 @@ _UI_DOType_ReferredBySDO_feature = Referred By SDO
_UI_SDO_RefersToDOType_feature = Refers To DO Type _UI_SDO_RefersToDOType_feature = Refers To DO Type
_UI_ExtRef_desc_feature = Desc _UI_ExtRef_desc_feature = Desc
_UI_IEDName_value_feature = Value _UI_IEDName_value_feature = Value
_UI_Line_Voltage_feature = Voltage
_UI_Voltage_Line_feature = Line
...@@ -102,6 +102,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider { ...@@ -102,6 +102,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
super.getChildrenFeatures(object); super.getChildrenFeatures(object);
childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConnectivityNode()); childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConnectivityNode());
childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConductingEquipment()); childrenFeatures.add(SclPackage.eINSTANCE.getLine_ConductingEquipment());
childrenFeatures.add(SclPackage.eINSTANCE.getLine_Voltage());
} }
return childrenFeatures; return childrenFeatures;
} }
...@@ -162,6 +163,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider { ...@@ -162,6 +163,7 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
return; return;
case SclPackage.LINE__CONNECTIVITY_NODE: case SclPackage.LINE__CONNECTIVITY_NODE:
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
case SclPackage.LINE__VOLTAGE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return; return;
} }
...@@ -188,6 +190,11 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider { ...@@ -188,6 +190,11 @@ public class LineItemProvider extends GeneralEquipmentContainerItemProvider {
(createChildParameter (createChildParameter
(SclPackage.eINSTANCE.getLine_ConductingEquipment(), (SclPackage.eINSTANCE.getLine_ConductingEquipment(),
SclFactory.eINSTANCE.createConductingEquipment())); SclFactory.eINSTANCE.createConductingEquipment()));
newChildDescriptors.add
(createChildParameter
(SclPackage.eINSTANCE.getLine_Voltage(),
SclFactory.eINSTANCE.createVoltage()));
} }
} }
...@@ -132,6 +132,8 @@ ...@@ -132,6 +132,8 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ConductingEquipment" ordered="false" <eStructuralFeatures xsi:type="ecore:EReference" name="ConductingEquipment" ordered="false"
upperBound="-1" eType="#//ConductingEquipment" unsettable="true" containment="true" upperBound="-1" eType="#//ConductingEquipment" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//ConductingEquipment/Line"/> 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>
<eClassifiers xsi:type="ecore:EClass" name="Naming" abstract="true" eSuperTypes="#//BaseElement"> <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" <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
...@@ -1940,6 +1942,8 @@ ...@@ -1940,6 +1942,8 @@
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="simple"/> <details key="kind" value="simple"/>
</eAnnotations> </eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="Line" eType="#//Line" transient="true"
unsettable="true" resolveProxies="false" eOpposite="#//Line/Voltage"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VoltageLevel" eSuperTypes="#//EquipmentContainer"> <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" <eStructuralFeatures xsi:type="ecore:EAttribute" name="nomFreq" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//Line/SCL"/> <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/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/ConductingEquipment"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//Line/Voltage"/>
</genClasses> </genClasses>
<genClasses ecoreClass="SCL.ecore#//Naming"> <genClasses ecoreClass="SCL.ecore#//Naming">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//Naming/name"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//Naming/name"/>
...@@ -1008,7 +1009,9 @@ ...@@ -1008,7 +1009,9 @@
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//TransformerWinding/PowerTransformer"/> <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"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//TransformerWinding/TapChanger"/>
</genClasses> </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"> <genClasses ecoreClass="SCL.ecore#//VoltageLevel">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/nomFreq"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/nomFreq"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/numPhases"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//VoltageLevel/numPhases"/>
......
...@@ -34,6 +34,7 @@ import org.eclipse.emf.common.util.EList; ...@@ -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#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#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#getConductingEquipment <em>Conducting Equipment</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Line#getVoltage <em>Voltage</em>}</li>
* </ul> * </ul>
* *
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLine() * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLine()
...@@ -232,4 +233,59 @@ public interface Line extends GeneralEquipmentContainer { ...@@ -232,4 +233,59 @@ public interface Line extends GeneralEquipmentContainer {
*/ */
boolean isSetConductingEquipment(); 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 } // Line
...@@ -1202,6 +1202,15 @@ public interface SclPackage extends EPackage { ...@@ -1202,6 +1202,15 @@ public interface SclPackage extends EPackage {
*/ */
int LINE__CONDUCTING_EQUIPMENT = GENERAL_EQUIPMENT_CONTAINER_FEATURE_COUNT + 4; 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. * The number of structural features of the '<em>Line</em>' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -1209,7 +1218,7 @@ public interface SclPackage extends EPackage { ...@@ -1209,7 +1218,7 @@ public interface SclPackage extends EPackage {
* @generated * @generated
* @ordered * @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. * The number of operations of the '<em>Line</em>' class.
...@@ -17014,6 +17023,15 @@ public interface SclPackage extends EPackage { ...@@ -17014,6 +17023,15 @@ public interface SclPackage extends EPackage {
*/ */
int VOLTAGE__UNIT = VALUE_WITH_UNIT__UNIT; 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. * The number of structural features of the '<em>Voltage</em>' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -17021,7 +17039,7 @@ public interface SclPackage extends EPackage { ...@@ -17021,7 +17039,7 @@ public interface SclPackage extends EPackage {
* @generated * @generated
* @ordered * @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. * The number of operations of the '<em>Voltage</em>' class.
...@@ -18292,6 +18310,17 @@ public interface SclPackage extends EPackage { ...@@ -18292,6 +18310,17 @@ public interface SclPackage extends EPackage {
*/ */
EReference getLine_ConductingEquipment(); 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>}'. * Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Naming <em>Naming</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -26293,6 +26322,17 @@ public interface SclPackage extends EPackage { ...@@ -26293,6 +26322,17 @@ public interface SclPackage extends EPackage {
*/ */
EClass getVoltage(); 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>}'. * Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.VoltageLevel <em>Voltage Level</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
......
...@@ -23,6 +23,12 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl; ...@@ -23,6 +23,12 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl;
* A representation of the model object '<em><b>Voltage</b></em>'. * A representation of the model object '<em><b>Voltage</b></em>'.
* <!-- end-user-doc --> * <!-- 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() * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getVoltage()
* @model extendedMetaData="kind='simple'" * @model extendedMetaData="kind='simple'"
...@@ -30,4 +36,32 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl; ...@@ -30,4 +36,32 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl;
*/ */
public interface Voltage extends ValueWithUnit { 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 } // Voltage
...@@ -34,6 +34,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectivityNode; ...@@ -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.Line;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SCL; import fr.centralesupelec.edf.riseclipse.iec61850.scl.SCL;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.Voltage;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -48,6 +49,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; ...@@ -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#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#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#getConductingEquipment <em>Conducting Equipment</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LineImpl#getVoltage <em>Voltage</em>}</li>
* </ul> * </ul>
* *
* @generated * @generated
...@@ -102,6 +104,25 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -102,6 +104,25 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
*/ */
protected EList<ConductingEquipment> conductingEquipment; 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 --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -310,6 +331,101 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -310,6 +331,101 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return conductingEquipment != null && ((InternalEList.Unsettable<?>)conductingEquipment).isSet(); 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 --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -331,6 +447,10 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -331,6 +447,10 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return ((InternalEList<InternalEObject>)(InternalEList<?>)getConnectivityNode()).basicAdd(otherEnd, msgs); return ((InternalEList<InternalEObject>)(InternalEList<?>)getConnectivityNode()).basicAdd(otherEnd, msgs);
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getConductingEquipment()).basicAdd(otherEnd, msgs); 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); return super.eInverseAdd(otherEnd, featureID, msgs);
} }
...@@ -351,6 +471,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -351,6 +471,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return ((InternalEList<?>)getConnectivityNode()).basicRemove(otherEnd, msgs); return ((InternalEList<?>)getConnectivityNode()).basicRemove(otherEnd, msgs);
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return ((InternalEList<?>)getConductingEquipment()).basicRemove(otherEnd, msgs); return ((InternalEList<?>)getConductingEquipment()).basicRemove(otherEnd, msgs);
case SclPackage.LINE__VOLTAGE:
return basicUnsetVoltage(msgs);
} }
return super.eInverseRemove(otherEnd, featureID, msgs); return super.eInverseRemove(otherEnd, featureID, msgs);
} }
...@@ -389,6 +511,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -389,6 +511,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return getConnectivityNode(); return getConnectivityNode();
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return getConductingEquipment(); return getConductingEquipment();
case SclPackage.LINE__VOLTAGE:
return getVoltage();
} }
return super.eGet(featureID, resolve, coreType); return super.eGet(featureID, resolve, coreType);
} }
...@@ -419,6 +543,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -419,6 +543,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
getConductingEquipment().clear(); getConductingEquipment().clear();
getConductingEquipment().addAll((Collection<? extends ConductingEquipment>)newValue); getConductingEquipment().addAll((Collection<? extends ConductingEquipment>)newValue);
return; return;
case SclPackage.LINE__VOLTAGE:
setVoltage((Voltage)newValue);
return;
} }
super.eSet(featureID, newValue); super.eSet(featureID, newValue);
} }
...@@ -446,6 +573,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -446,6 +573,9 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
unsetConductingEquipment(); unsetConductingEquipment();
return; return;
case SclPackage.LINE__VOLTAGE:
unsetVoltage();
return;
} }
super.eUnset(featureID); super.eUnset(featureID);
} }
...@@ -468,6 +598,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line { ...@@ -468,6 +598,8 @@ public class LineImpl extends GeneralEquipmentContainerImpl implements Line {
return isSetConnectivityNode(); return isSetConnectivityNode();
case SclPackage.LINE__CONDUCTING_EQUIPMENT: case SclPackage.LINE__CONDUCTING_EQUIPMENT:
return isSetConductingEquipment(); return isSetConductingEquipment();
case SclPackage.LINE__VOLTAGE:
return isSetVoltage();
} }
return super.eIsSet(featureID); return super.eIsSet(featureID);
} }
......
...@@ -1705,6 +1705,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage { ...@@ -1705,6 +1705,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return (EReference)getLine().getEStructuralFeatures().get(4); 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 --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -8782,6 +8791,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage { ...@@ -8782,6 +8791,15 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return voltageEClass; return voltageEClass;
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getVoltage_Line() {
return (EReference)getVoltage().getEStructuralFeatures().get(0);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
......
...@@ -18,16 +18,28 @@ ...@@ -18,16 +18,28 @@
*/ */
package fr.centralesupelec.edf.riseclipse.iec61850.scl.impl; 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.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;