diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/plugin.properties b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/plugin.properties index 41bca8b9db5d2846bd20dc3e5626e96f407b4966..a87b6118c1fbdbbc7349ed908831cd214e346af7 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/plugin.properties +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/plugin.properties @@ -1290,3 +1290,5 @@ _UI_SDI_RefersToSDO_feature = Refers To SDO _UI_SDI_RefersToAbstractDataAttribute_feature = Refers To Abstract Data Attribute _UI_IRiseClipseConsole_type = IRise Clipse Console _UI_SclObject_explicitLinksBuilt_feature = Explicit Links Built +_UI_LNodeType_ReferredByLNode_feature = Referred By LNode +_UI_LNode_RefersToLNodeType_feature = Refers To LNode Type diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeItemProvider.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeItemProvider.java index 6890070b05d0fc7be987a7a4ad61a7f4584a2930..626dedaaa7f6b189de60640603300c23c0fb92a2 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeItemProvider.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeItemProvider.java @@ -66,6 +66,7 @@ public class LNodeItemProvider extends UnNamingItemProvider { addLnTypePropertyDescriptor(object); addPrefixPropertyDescriptor(object); addRefersToAnyLNPropertyDescriptor(object); + addRefersToLNodeTypePropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -224,6 +225,28 @@ public class LNodeItemProvider extends UnNamingItemProvider { null)); } + /** + * This adds a property descriptor for the Refers To LNode Type feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addRefersToLNodeTypePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_LNode_RefersToLNodeType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LNode_RefersToLNodeType_feature", "_UI_LNode_type"), + SclPackage.eINSTANCE.getLNode_RefersToLNodeType(), + true, + false, + true, + null, + null, + null)); + } + /** * This returns LNode.gif. * <!-- begin-user-doc --> diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeTypeItemProvider.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeTypeItemProvider.java index 56e930fa9d472228599ae6e84c900246ea9f7ee3..dbb1f11ef0979bc79120a6a7b79f158f76cac1f8 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeTypeItemProvider.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/LNodeTypeItemProvider.java @@ -64,6 +64,7 @@ public class LNodeTypeItemProvider extends IDNamingItemProvider { addIedTypePropertyDescriptor(object); addLnClassPropertyDescriptor(object); addReferredByAnyLNPropertyDescriptor(object); + addReferredByLNodePropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -134,6 +135,28 @@ public class LNodeTypeItemProvider extends IDNamingItemProvider { null)); } + /** + * This adds a property descriptor for the Referred By LNode feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addReferredByLNodePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_LNodeType_ReferredByLNode_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LNodeType_ReferredByLNode_feature", "_UI_LNodeType_type"), + SclPackage.eINSTANCE.getLNodeType_ReferredByLNode(), + true, + false, + true, + null, + null, + null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.ecore b/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.ecore index bf10183131c8083b527d47a470a37a8efe3d5758..e412298fba1b8cbe1d62d8e4bc135b68fc3c2958 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.ecore +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.ecore @@ -508,6 +508,9 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByAnyLN" ordered="false" upperBound="-1" eType="#//AnyLN" transient="true" unsettable="true" resolveProxies="false" eOpposite="#//AnyLN/RefersToLNodeType"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByLNode" ordered="false" + upperBound="-1" eType="#//LNode" transient="true" unsettable="true" resolveProxies="false" + eOpposite="#//LNode/RefersToLNodeType"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="ProtNs" eSuperTypes="#//SclObject"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> @@ -1866,6 +1869,9 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="ParentLNodeContainer" ordered="false" eType="#//LNodeContainer" transient="true" unsettable="true" resolveProxies="false" eOpposite="#//LNodeContainer/LNode"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="RefersToLNodeType" ordered="false" + eType="#//LNodeType" transient="true" unsettable="true" resolveProxies="false" + eOpposite="#//LNodeType/ReferredByLNode"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="LNodeContainer" eSuperTypes="#//Naming"> <eStructuralFeatures xsi:type="ecore:EReference" name="LNode" ordered="false" diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.genmodel b/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.genmodel index d6a1dd8ffa6c1c1132c2d0489235dad74b741b07..bc112d7c9352bbe0df62641d82a08d406c14e5c1 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.genmodel +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/model/SCL.genmodel @@ -319,6 +319,7 @@ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/DO"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ParentDataTypeTemplates"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ReferredByAnyLN"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ReferredByLNode"/> </genClasses> <genClasses ecoreClass="SCL.ecore#//ProtNs"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//ProtNs/type"/> @@ -942,6 +943,7 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//LNode/prefix"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNode/RefersToAnyLN"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//LNode/ParentLNodeContainer"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNode/RefersToLNodeType"/> </genClasses> <genClasses ecoreClass="SCL.ecore#//LNodeContainer"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeContainer/LNode"/> diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNode.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNode.java index c5beb7e18f0fc8ffae7c1606e5620a75faaab787..230c3b9d1ae390757f2f3a412ef6fc5139054b7e 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNode.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNode.java @@ -35,6 +35,7 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl; * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getPrefix <em>Prefix</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToAnyLN <em>Refers To Any LN</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getParentLNodeContainer <em>Parent LNode Container</em>}</li> + * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}</li> * </ul> * * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNode() @@ -439,4 +440,55 @@ public interface LNode extends UnNaming { */ void setParentLNodeContainer(LNodeContainer value); + /** + * Returns the value of the '<em><b>Refers To LNode Type</b></em>' reference. + * It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Refers To LNode Type</em>' reference. + * @see #isSetRefersToLNodeType() + * @see #unsetRefersToLNodeType() + * @see #setRefersToLNodeType(LNodeType) + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNode_RefersToLNodeType() + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode + * @model opposite="ReferredByLNode" resolveProxies="false" unsettable="true" transient="true" ordered="false" + * @generated + */ + LNodeType getRefersToLNodeType(); + + /** + * Sets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Refers To LNode Type</em>' reference. + * @see #isSetRefersToLNodeType() + * @see #unsetRefersToLNodeType() + * @see #getRefersToLNodeType() + * @generated + */ + void setRefersToLNodeType(LNodeType value); + + /** + * Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isSetRefersToLNodeType() + * @see #getRefersToLNodeType() + * @see #setRefersToLNodeType(LNodeType) + * @generated + */ + void unsetRefersToLNodeType(); + + /** + * Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference is set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return whether the value of the '<em>Refers To LNode Type</em>' reference is set. + * @see #unsetRefersToLNodeType() + * @see #getRefersToLNodeType() + * @see #setRefersToLNodeType(LNodeType) + * @generated + */ + boolean isSetRefersToLNodeType(); + } // LNode diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNodeType.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNodeType.java index 6dee217e6b28dd907ce89f3c0f015a8eb49dc300..2fa7e1fe4c14ee53fc5b659b466a6f8fc0449468 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNodeType.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/LNodeType.java @@ -34,6 +34,7 @@ import org.eclipse.emf.common.util.EList; * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getDO <em>DO</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getParentDataTypeTemplates <em>Parent Data Type Templates</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByAnyLN <em>Referred By Any LN</em>}</li> + * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}</li> * </ul> * * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNodeType() @@ -254,4 +255,41 @@ public interface LNodeType extends IDNaming { */ boolean isSetReferredByAnyLN(); + /** + * Returns the value of the '<em><b>Referred By LNode</b></em>' reference list. + * The list contents are of type {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode}. + * It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Referred By LNode</em>' reference list. + * @see #isSetReferredByLNode() + * @see #unsetReferredByLNode() + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNodeType_ReferredByLNode() + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType + * @model opposite="RefersToLNodeType" resolveProxies="false" unsettable="true" transient="true" ordered="false" + * @generated + */ + EList<LNode> getReferredByLNode(); + + /** + * Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isSetReferredByLNode() + * @see #getReferredByLNode() + * @generated + */ + void unsetReferredByLNode(); + + /** + * Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}' reference list is set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return whether the value of the '<em>Referred By LNode</em>' reference list is set. + * @see #unsetReferredByLNode() + * @see #getReferredByLNode() + * @generated + */ + boolean isSetReferredByLNode(); + } // LNodeType diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/SclPackage.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/SclPackage.java index b5da82600644cb3a4ea09f894b7eb367d6c77d91..0a337c54210c801e3b756f633e5714cd211476c5 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/SclPackage.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/SclPackage.java @@ -6356,6 +6356,15 @@ public interface SclPackage extends EPackage { */ int LNODE_TYPE__REFERRED_BY_ANY_LN = ID_NAMING_FEATURE_COUNT + 4; + /** + * The feature id for the '<em><b>Referred By LNode</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LNODE_TYPE__REFERRED_BY_LNODE = ID_NAMING_FEATURE_COUNT + 5; + /** * The number of structural features of the '<em>LNode Type</em>' class. * <!-- begin-user-doc --> @@ -6363,7 +6372,7 @@ public interface SclPackage extends EPackage { * @generated * @ordered */ - int LNODE_TYPE_FEATURE_COUNT = ID_NAMING_FEATURE_COUNT + 5; + int LNODE_TYPE_FEATURE_COUNT = ID_NAMING_FEATURE_COUNT + 6; /** * The operation id for the '<em>Build Explicit Links</em>' operation. @@ -18515,6 +18524,15 @@ public interface SclPackage extends EPackage { */ int LNODE__PARENT_LNODE_CONTAINER = UN_NAMING_FEATURE_COUNT + 7; + /** + * The feature id for the '<em><b>Refers To LNode Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LNODE__REFERS_TO_LNODE_TYPE = UN_NAMING_FEATURE_COUNT + 8; + /** * The number of structural features of the '<em>LNode</em>' class. * <!-- begin-user-doc --> @@ -18522,7 +18540,7 @@ public interface SclPackage extends EPackage { * @generated * @ordered */ - int LNODE_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 8; + int LNODE_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 9; /** * The operation id for the '<em>Build Explicit Links</em>' operation. @@ -23705,6 +23723,17 @@ public interface SclPackage extends EPackage { */ EReference getLNodeType_ReferredByAnyLN(); + /** + * Returns the meta object for the reference list '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Referred By LNode</em>'. + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode() + * @see #getLNodeType() + * @generated + */ + EReference getLNodeType_ReferredByLNode(); + /** * Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ProtNs <em>Prot Ns</em>}'. * <!-- begin-user-doc --> @@ -30170,6 +30199,17 @@ public interface SclPackage extends EPackage { */ EReference getLNode_ParentLNodeContainer(); + /** + * Returns the meta object for the reference '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Refers To LNode Type</em>'. + * @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType() + * @see #getLNode() + * @generated + */ + EReference getLNode_RefersToLNodeType(); + /** * Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeContainer <em>LNode Container</em>}'. * <!-- begin-user-doc --> diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeImpl.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeImpl.java index 90262628bc710d14d54fa07766ffababcc8d660f..304b72110d70d6083690c92096239e5c81f11467 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeImpl.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeImpl.java @@ -19,14 +19,19 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl.impl; import fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN; +import fr.centralesupelec.edf.riseclipse.iec61850.scl.DataTypeTemplates; import fr.centralesupelec.edf.riseclipse.iec61850.scl.IED; import fr.centralesupelec.edf.riseclipse.iec61850.scl.LDevice; import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode; import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeContainer; +import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType; import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; import fr.centralesupelec.edf.riseclipse.iec61850.scl.util.SclUtilities; import fr.centralesupelec.edf.riseclipse.util.IRiseClipseConsole; +import java.util.List; +import java.util.stream.Collectors; + import org.apache.commons.lang3.tuple.Pair; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -51,6 +56,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeImpl#getPrefix <em>Prefix</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeImpl#getRefersToAnyLN <em>Refers To Any LN</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeImpl#getParentLNodeContainer <em>Parent LNode Container</em>}</li> + * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeImpl#getRefersToLNodeType <em>Refers To LNode Type</em>}</li> * </ul> * * @generated @@ -249,6 +255,25 @@ public class LNodeImpl extends UnNamingImpl implements LNode { */ protected boolean refersToAnyLNESet; + /** + * The cached value of the '{@link #getRefersToLNodeType() <em>Refers To LNode Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRefersToLNodeType() + * @generated + * @ordered + */ + protected LNodeType refersToLNodeType; + + /** + * This is true if the Refers To LNode Type reference has been set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + protected boolean refersToLNodeTypeESet; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -710,6 +735,105 @@ public class LNodeImpl extends UnNamingImpl implements LNode { eNotify(new ENotificationImpl(this, Notification.SET, SclPackage.LNODE__PARENT_LNODE_CONTAINER, newParentLNodeContainer, newParentLNodeContainer)); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public LNodeType getRefersToLNodeType() { + return refersToLNodeType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetRefersToLNodeType(LNodeType newRefersToLNodeType, NotificationChain msgs) { + LNodeType oldRefersToLNodeType = refersToLNodeType; + refersToLNodeType = newRefersToLNodeType; + boolean oldRefersToLNodeTypeESet = refersToLNodeTypeESet; + refersToLNodeTypeESet = true; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SclPackage.LNODE__REFERS_TO_LNODE_TYPE, oldRefersToLNodeType, newRefersToLNodeType, !oldRefersToLNodeTypeESet); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setRefersToLNodeType(LNodeType newRefersToLNodeType) { + if (newRefersToLNodeType != refersToLNodeType) { + NotificationChain msgs = null; + if (refersToLNodeType != null) + msgs = ((InternalEObject)refersToLNodeType).eInverseRemove(this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, LNodeType.class, msgs); + if (newRefersToLNodeType != null) + msgs = ((InternalEObject)newRefersToLNodeType).eInverseAdd(this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, LNodeType.class, msgs); + msgs = basicSetRefersToLNodeType(newRefersToLNodeType, msgs); + if (msgs != null) msgs.dispatch(); + } + else { + boolean oldRefersToLNodeTypeESet = refersToLNodeTypeESet; + refersToLNodeTypeESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SclPackage.LNODE__REFERS_TO_LNODE_TYPE, newRefersToLNodeType, newRefersToLNodeType, !oldRefersToLNodeTypeESet)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicUnsetRefersToLNodeType(NotificationChain msgs) { + LNodeType oldRefersToLNodeType = refersToLNodeType; + refersToLNodeType = null; + boolean oldRefersToLNodeTypeESet = refersToLNodeTypeESet; + refersToLNodeTypeESet = false; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, SclPackage.LNODE__REFERS_TO_LNODE_TYPE, oldRefersToLNodeType, null, oldRefersToLNodeTypeESet); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void unsetRefersToLNodeType() { + if (refersToLNodeType != null) { + NotificationChain msgs = null; + msgs = ((InternalEObject)refersToLNodeType).eInverseRemove(this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, LNodeType.class, msgs); + msgs = basicUnsetRefersToLNodeType(msgs); + if (msgs != null) msgs.dispatch(); + } + else { + boolean oldRefersToLNodeTypeESet = refersToLNodeTypeESet; + refersToLNodeTypeESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, SclPackage.LNODE__REFERS_TO_LNODE_TYPE, null, null, oldRefersToLNodeTypeESet)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean isSetRefersToLNodeType() { + return refersToLNodeTypeESet; + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -726,6 +850,10 @@ public class LNodeImpl extends UnNamingImpl implements LNode { if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetParentLNodeContainer((LNodeContainer)otherEnd, msgs); + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + if (refersToLNodeType != null) + msgs = ((InternalEObject)refersToLNodeType).eInverseRemove(this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, LNodeType.class, msgs); + return basicSetRefersToLNodeType((LNodeType)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } @@ -742,6 +870,8 @@ public class LNodeImpl extends UnNamingImpl implements LNode { return basicUnsetRefersToAnyLN(msgs); case SclPackage.LNODE__PARENT_LNODE_CONTAINER: return basicSetParentLNodeContainer(null, msgs); + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + return basicUnsetRefersToLNodeType(msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -784,6 +914,8 @@ public class LNodeImpl extends UnNamingImpl implements LNode { return getRefersToAnyLN(); case SclPackage.LNODE__PARENT_LNODE_CONTAINER: return getParentLNodeContainer(); + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + return getRefersToLNodeType(); } return super.eGet(featureID, resolve, coreType); } @@ -820,6 +952,9 @@ public class LNodeImpl extends UnNamingImpl implements LNode { case SclPackage.LNODE__PARENT_LNODE_CONTAINER: setParentLNodeContainer((LNodeContainer)newValue); return; + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + setRefersToLNodeType((LNodeType)newValue); + return; } super.eSet(featureID, newValue); } @@ -856,6 +991,9 @@ public class LNodeImpl extends UnNamingImpl implements LNode { case SclPackage.LNODE__PARENT_LNODE_CONTAINER: setParentLNodeContainer((LNodeContainer)null); return; + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + unsetRefersToLNodeType(); + return; } super.eUnset(featureID); } @@ -884,6 +1022,8 @@ public class LNodeImpl extends UnNamingImpl implements LNode { return isSetRefersToAnyLN(); case SclPackage.LNODE__PARENT_LNODE_CONTAINER: return getParentLNodeContainer() != null; + case SclPackage.LNODE__REFERS_TO_LNODE_TYPE: + return isSetRefersToLNodeType(); } return super.eIsSet(featureID); } @@ -919,6 +1059,15 @@ public class LNodeImpl extends UnNamingImpl implements LNode { // see Issue #13 super.doBuildExplicitLinks( console ); + String messagePrefix = "while resolving link from LNode on line " + getLineNumber() + ": "; + doBuildExplicitAnyLNLink( console, messagePrefix ); + doBuildExplicitLNodeTypeLink( console, messagePrefix ); + } + + private void doBuildExplicitAnyLNLink( IRiseClipseConsole console, String mPrefix ) { + + String messagePrefix = mPrefix + "(looking for LN) "; + // lnInst The LN instance identification. Can only be missing for lnClass=LLN0, meaning as value here the empty string // lnClass The LN class as defined in IEC 61850-7-x // iedName The name of the IED which contains the LN, none if used for specification (default if attribute is not specified) @@ -926,9 +1075,6 @@ public class LNodeImpl extends UnNamingImpl implements LNode { // result in unique LN instance identification, i.e. may contain the LD name // prefix The LN prefix used in the IED (if needed; default, if not specified, is the empty string). Can be used for more // detailed function specification than possible by LN class alone, if the LN is not allocated to an IED - // lnType The logical node type definition containing more detailed functional specification. Might be missing, if the LN is allocated to an IED. - - String messagePrefix = "while resolving link from LNode on line " + getLineNumber() + ": "; // Resolve only if attribute is not None // Default value is None @@ -981,4 +1127,40 @@ public class LNodeImpl extends UnNamingImpl implements LNode { console.info( "LNode on line " + getLineNumber() + " refers to " + mess3 + " on line " + getRefersToAnyLN().getLineNumber() ); } + private void doBuildExplicitLNodeTypeLink( IRiseClipseConsole console, String mPrefix ) { + + String messagePrefix = mPrefix + "(looking for LNodeType) "; + + // lnType The logical node type definition containing more detailed functional specification. Might be missing, if the LN is allocated to an IED. + + if(( getLnType() == null ) || getLnType().isEmpty() ) { + console.verbose( messagePrefix + "link not resolved because lnType is missing" ); + return; + } + DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates(); + if( dtt == null ) { + console.warning( messagePrefix + "DataTypeTemplates is missing" ); + return; + } + + List< LNodeType > res = + dtt + .getLNodeType() + .stream() + .filter( lnt -> getLnType().equals( lnt.getId() )) + .collect( Collectors.toList() ); + + String mess = "LNodeType( id = " + getLnType() + " )"; + if( res.size() != 1 ) { + SclUtilities.displayNotFoundWarning( console, messagePrefix, mess, res.size() ); + return; + } + setRefersToLNodeType( res.get( 0 ) ); + console.info( "AnyLN on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToLNodeType().getLineNumber() ); + + if(( getLnClass() != null ) && ! getLnClass().equals( getRefersToLNodeType().getLnClass() )) { + console.warning( messagePrefix + "lnClass in " + mess + "(" + getRefersToLNodeType().getLnClass() + ") is not " + getLnClass() ); + } + } + } //LNodeImpl diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeTypeImpl.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeTypeImpl.java index 457c0a50d8192589b892bebeee6e1b21bf113105..96dd946be93d4b8de3b584d98862ebe7aa2caae2 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeTypeImpl.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/LNodeTypeImpl.java @@ -33,6 +33,7 @@ import org.eclipse.emf.ecore.util.InternalEList; import fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN; import fr.centralesupelec.edf.riseclipse.iec61850.scl.DO; import fr.centralesupelec.edf.riseclipse.iec61850.scl.DataTypeTemplates; +import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode; import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType; import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; @@ -49,6 +50,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getDO <em>DO</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getParentDataTypeTemplates <em>Parent Data Type Templates</em>}</li> * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getReferredByAnyLN <em>Referred By Any LN</em>}</li> + * <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getReferredByLNode <em>Referred By LNode</em>}</li> * </ul> * * @generated @@ -132,6 +134,16 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { */ protected EList<AnyLN> referredByAnyLN; + /** + * The cached value of the '{@link #getReferredByLNode() <em>Referred By LNode</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getReferredByLNode() + * @generated + * @ordered + */ + protected EList<LNode> referredByLNode; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -360,6 +372,39 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { return referredByAnyLN != null && ((InternalEList.Unsettable<?>)referredByAnyLN).isSet(); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EList<LNode> getReferredByLNode() { + if (referredByLNode == null) { + referredByLNode = new EObjectWithInverseEList.Unsettable<LNode>(LNode.class, this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, SclPackage.LNODE__REFERS_TO_LNODE_TYPE); + } + return referredByLNode; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void unsetReferredByLNode() { + if (referredByLNode != null) ((InternalEList.Unsettable<?>)referredByLNode).unset(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean isSetReferredByLNode() { + return referredByLNode != null && ((InternalEList.Unsettable<?>)referredByLNode).isSet(); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -377,6 +422,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { return basicSetParentDataTypeTemplates((DataTypeTemplates)otherEnd, msgs); case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN: return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferredByAnyLN()).basicAdd(otherEnd, msgs); + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferredByLNode()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } @@ -395,6 +442,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { return basicSetParentDataTypeTemplates(null, msgs); case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN: return ((InternalEList<?>)getReferredByAnyLN()).basicRemove(otherEnd, msgs); + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + return ((InternalEList<?>)getReferredByLNode()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -431,6 +480,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { return getParentDataTypeTemplates(); case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN: return getReferredByAnyLN(); + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + return getReferredByLNode(); } return super.eGet(featureID, resolve, coreType); } @@ -461,6 +512,10 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { getReferredByAnyLN().clear(); getReferredByAnyLN().addAll((Collection<? extends AnyLN>)newValue); return; + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + getReferredByLNode().clear(); + getReferredByLNode().addAll((Collection<? extends LNode>)newValue); + return; } super.eSet(featureID, newValue); } @@ -488,6 +543,9 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN: unsetReferredByAnyLN(); return; + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + unsetReferredByLNode(); + return; } super.eUnset(featureID); } @@ -510,6 +568,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType { return getParentDataTypeTemplates() != null; case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN: return isSetReferredByAnyLN(); + case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE: + return isSetReferredByLNode(); } return super.eIsSet(featureID); } diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/SclPackageImpl.java b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/SclPackageImpl.java index cceb3d4e57a3c51281bad1cdc09a1ba47807c817..194011ce043ca5bb45ef450d56b9eb8a7d0e834d 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/SclPackageImpl.java +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/SclPackageImpl.java @@ -3249,6 +3249,16 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage { return (EReference)getLNodeType().getEStructuralFeatures().get(4); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EReference getLNodeType_ReferredByLNode() { + return (EReference)getLNodeType().getEStructuralFeatures().get(5); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -9565,6 +9575,16 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage { return (EReference)getLNode().getEStructuralFeatures().get(7); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EReference getLNode_RefersToLNodeType() { + return (EReference)getLNode().getEStructuralFeatures().get(8); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/scl.ecore b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/scl.ecore index bf10183131c8083b527d47a470a37a8efe3d5758..e412298fba1b8cbe1d62d8e4bc135b68fc3c2958 100644 --- a/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/scl.ecore +++ b/fr.centralesupelec.edf.riseclipse.iec61850.scl/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/impl/scl.ecore @@ -508,6 +508,9 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByAnyLN" ordered="false" upperBound="-1" eType="#//AnyLN" transient="true" unsettable="true" resolveProxies="false" eOpposite="#//AnyLN/RefersToLNodeType"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByLNode" ordered="false" + upperBound="-1" eType="#//LNode" transient="true" unsettable="true" resolveProxies="false" + eOpposite="#//LNode/RefersToLNodeType"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="ProtNs" eSuperTypes="#//SclObject"> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> @@ -1866,6 +1869,9 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="ParentLNodeContainer" ordered="false" eType="#//LNodeContainer" transient="true" unsettable="true" resolveProxies="false" eOpposite="#//LNodeContainer/LNode"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="RefersToLNodeType" ordered="false" + eType="#//LNodeType" transient="true" unsettable="true" resolveProxies="false" + eOpposite="#//LNodeType/ReferredByLNode"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="LNodeContainer" eSuperTypes="#//Naming"> <eStructuralFeatures xsi:type="ecore:EReference" name="LNode" ordered="false"