Commit 1ca112a2 authored by Dominique Marcadet's avatar Dominique Marcadet

remove use of FeatureMap in LN0

parent 006879b8
......@@ -1166,32 +1166,17 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LN0" eSuperTypes="#//AnyLN">
<eStructuralFeatures xsi:type="ecore:EReference" name="GSEControl" ordered="false"
upperBound="-1" eType="#//GSEControl" volatile="true" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//GSEControl/ParentLN0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlWithIEDName"/>
</eAnnotations>
</eStructuralFeatures>
upperBound="-1" eType="#//GSEControl" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//GSEControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentLDevice" ordered="false"
eType="#//LDevice" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LDevice/LN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SampledValueControl" ordered="false"
upperBound="-1" eType="#//SampledValueControl" volatile="true" unsettable="true"
containment="true" resolveProxies="false" eOpposite="#//SampledValueControl/ParentLN0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlWithIEDName"/>
</eAnnotations>
</eStructuralFeatures>
upperBound="-1" eType="#//SampledValueControl" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//SampledValueControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SettingControl" ordered="false"
eType="#//SettingControl" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SettingControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithIEDName" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Log" eSuperTypes="#//UnNaming">
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentAnyLN" ordered="false"
......
......@@ -646,7 +646,6 @@
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//LN0/ParentLDevice"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LN0/SampledValueControl"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LN0/SettingControl"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//LN0/ControlWithIEDName"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//Log">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//Log/ParentAnyLN"/>
......
......@@ -21,7 +21,6 @@
package fr.centralesupelec.edf.riseclipse.iec61850.scl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.FeatureMap;
/**
* <!-- begin-user-doc -->
......@@ -36,7 +35,6 @@ import org.eclipse.emf.ecore.util.FeatureMap;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getParentLDevice <em>Parent LDevice</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getSampledValueControl <em>Sampled Value Control</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getSettingControl <em>Setting Control</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getControlWithIEDName <em>Control With IED Name</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLN0()
......@@ -59,8 +57,7 @@ public interface LN0 extends AnyLN {
* @see #unsetGSEControl()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLN0_GSEControl()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.GSEControl#getParentLN0
* @model opposite="ParentLN0" containment="true" unsettable="true" volatile="true" ordered="false"
* extendedMetaData="group='#ControlWithIEDName'"
* @model opposite="ParentLN0" containment="true" unsettable="true" ordered="false"
* @generated
*/
EList< GSEControl > getGSEControl();
......@@ -126,8 +123,7 @@ public interface LN0 extends AnyLN {
* @see #unsetSampledValueControl()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLN0_SampledValueControl()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SampledValueControl#getParentLN0
* @model opposite="ParentLN0" containment="true" unsettable="true" volatile="true" ordered="false"
* extendedMetaData="group='#ControlWithIEDName'"
* @model opposite="ParentLN0" containment="true" unsettable="true" ordered="false"
* @generated
*/
EList< SampledValueControl > getSampledValueControl();
......@@ -208,40 +204,4 @@ public interface LN0 extends AnyLN {
*/
boolean isSetSettingControl();
/**
* Returns the value of the '<em><b>Control With IED Name</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Control With IED Name</em>' attribute list.
* @see #isSetControlWithIEDName()
* @see #unsetControlWithIEDName()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLN0_ControlWithIEDName()
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" ordered="false"
* extendedMetaData="kind='group'"
* @generated
*/
FeatureMap getControlWithIEDName();
/**
* Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getControlWithIEDName <em>Control With IED Name</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetControlWithIEDName()
* @see #getControlWithIEDName()
* @generated
*/
void unsetControlWithIEDName();
/**
* Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getControlWithIEDName <em>Control With IED Name</em>}' attribute list is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Control With IED Name</em>' attribute list is set.
* @see #unsetControlWithIEDName()
* @see #getControlWithIEDName()
* @generated
*/
boolean isSetControlWithIEDName();
} // LN0
......@@ -12991,15 +12991,6 @@ public interface SclPackage extends EPackage {
*/
int LN0__SETTING_CONTROL = ANY_LN_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Control With IED Name</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LN0__CONTROL_WITH_IED_NAME = ANY_LN_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>LN0</em>' class.
* <!-- begin-user-doc -->
......@@ -13007,7 +12998,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int LN0_FEATURE_COUNT = ANY_LN_FEATURE_COUNT + 5;
int LN0_FEATURE_COUNT = ANY_LN_FEATURE_COUNT + 4;
/**
* The operation id for the '<em>Build Explicit Links</em>' operation.
......@@ -27437,17 +27428,6 @@ public interface SclPackage extends EPackage {
*/
EReference getLN0_SettingControl();
/**
* Returns the meta object for the attribute list '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getControlWithIEDName <em>Control With IED Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Control With IED Name</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LN0#getControlWithIEDName()
* @see #getLN0()
* @generated
*/
EAttribute getLN0_ControlWithIEDName();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.Log <em>Log</em>}'.
* <!-- begin-user-doc -->
......@@ -27,9 +27,8 @@ 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.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.GSEControl;
......@@ -51,40 +50,49 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.SettingControl;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LN0Impl#getParentLDevice <em>Parent LDevice</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LN0Impl#getSampledValueControl <em>Sampled Value Control</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LN0Impl#getSettingControl <em>Setting Control</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LN0Impl#getControlWithIEDName <em>Control With IED Name</em>}</li>
* </ul>
*
* @generated
*/
public class LN0Impl extends AnyLNImpl implements LN0 {
/**
* The cached value of the '{@link #getSettingControl() <em>Setting Control</em>}' containment reference.
* The cached value of the '{@link #getGSEControl() <em>GSE Control</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSettingControl()
* @see #getGSEControl()
* @generated
* @ordered
*/
protected SettingControl settingControl;
protected EList< GSEControl > gseControl;
/**
* This is true if the Setting Control containment reference has been set.
* The cached value of the '{@link #getSampledValueControl() <em>Sampled Value Control</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSampledValueControl()
* @generated
* @ordered
*/
protected boolean settingControlESet;
protected EList< SampledValueControl > sampledValueControl;
/**
* The cached value of the '{@link #getSettingControl() <em>Setting Control</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSettingControl()
* @generated
* @ordered
*/
protected SettingControl settingControl;
/**
* The cached value of the '{@link #getControlWithIEDName() <em>Control With IED Name</em>}' attribute list.
* This is true if the Setting Control containment reference has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControlWithIEDName()
* @generated
* @ordered
*/
protected FeatureMap controlWithIEDName;
protected boolean settingControlESet;
/**
* <!-- begin-user-doc -->
......@@ -112,7 +120,11 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public EList< GSEControl > getGSEControl() {
return getControlWithIEDName().list( SclPackage.eINSTANCE.getLN0_GSEControl() );
if( gseControl == null ) {
gseControl = new EObjectContainmentWithInverseEList.Unsettable< GSEControl >( GSEControl.class, this,
SclPackage.LN0__GSE_CONTROL, SclPackage.GSE_CONTROL__PARENT_LN0 );
}
return gseControl;
}
/**
......@@ -122,7 +134,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public void unsetGSEControl() {
( ( FeatureMap.Internal ) getControlWithIEDName() ).clear( SclPackage.eINSTANCE.getLN0_GSEControl() );
if( gseControl != null ) ( ( InternalEList.Unsettable< ? > ) gseControl ).unset();
}
/**
......@@ -132,7 +144,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public boolean isSetGSEControl() {
return !( ( FeatureMap.Internal ) getControlWithIEDName() ).isEmpty( SclPackage.eINSTANCE.getLN0_GSEControl() );
return gseControl != null && ( ( InternalEList.Unsettable< ? > ) gseControl ).isSet();
}
/**
......@@ -188,7 +200,12 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public EList< SampledValueControl > getSampledValueControl() {
return getControlWithIEDName().list( SclPackage.eINSTANCE.getLN0_SampledValueControl() );
if( sampledValueControl == null ) {
sampledValueControl = new EObjectContainmentWithInverseEList.Unsettable< SampledValueControl >(
SampledValueControl.class, this, SclPackage.LN0__SAMPLED_VALUE_CONTROL,
SclPackage.SAMPLED_VALUE_CONTROL__PARENT_LN0 );
}
return sampledValueControl;
}
/**
......@@ -198,7 +215,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public void unsetSampledValueControl() {
( ( FeatureMap.Internal ) getControlWithIEDName() ).clear( SclPackage.eINSTANCE.getLN0_SampledValueControl() );
if( sampledValueControl != null ) ( ( InternalEList.Unsettable< ? > ) sampledValueControl ).unset();
}
/**
......@@ -208,8 +225,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public boolean isSetSampledValueControl() {
return !( ( FeatureMap.Internal ) getControlWithIEDName() )
.isEmpty( SclPackage.eINSTANCE.getLN0_SampledValueControl() );
return sampledValueControl != null && ( ( InternalEList.Unsettable< ? > ) sampledValueControl ).isSet();
}
/**
......@@ -324,39 +340,6 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
return settingControlESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FeatureMap getControlWithIEDName() {
if( controlWithIEDName == null ) {
controlWithIEDName = new BasicFeatureMap( this, SclPackage.LN0__CONTROL_WITH_IED_NAME );
}
return controlWithIEDName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void unsetControlWithIEDName() {
if( controlWithIEDName != null ) ( ( InternalEList.Unsettable< ? > ) controlWithIEDName ).unset();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isSetControlWithIEDName() {
return controlWithIEDName != null && ( ( InternalEList.Unsettable< ? > ) controlWithIEDName ).isSet();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -401,8 +384,6 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
return ( ( InternalEList< ? > ) getSampledValueControl() ).basicRemove( otherEnd, msgs );
case SclPackage.LN0__SETTING_CONTROL:
return basicUnsetSettingControl( msgs );
case SclPackage.LN0__CONTROL_WITH_IED_NAME:
return ( ( InternalEList< ? > ) getControlWithIEDName() ).basicRemove( otherEnd, msgs );
}
return super.eInverseRemove( otherEnd, featureID, msgs );
}
......@@ -437,9 +418,6 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
return getSampledValueControl();
case SclPackage.LN0__SETTING_CONTROL:
return getSettingControl();
case SclPackage.LN0__CONTROL_WITH_IED_NAME:
if( coreType ) return getControlWithIEDName();
return ( ( FeatureMap.Internal ) getControlWithIEDName() ).getWrapper();
}
return super.eGet( featureID, resolve, coreType );
}
......@@ -467,9 +445,6 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
case SclPackage.LN0__SETTING_CONTROL:
setSettingControl( ( SettingControl ) newValue );
return;
case SclPackage.LN0__CONTROL_WITH_IED_NAME:
( ( FeatureMap.Internal ) getControlWithIEDName() ).set( newValue );
return;
}
super.eSet( featureID, newValue );
}
......@@ -494,9 +469,6 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
case SclPackage.LN0__SETTING_CONTROL:
unsetSettingControl();
return;
case SclPackage.LN0__CONTROL_WITH_IED_NAME:
unsetControlWithIEDName();
return;
}
super.eUnset( featureID );
}
......@@ -517,26 +489,8 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
return isSetSampledValueControl();
case SclPackage.LN0__SETTING_CONTROL:
return isSetSettingControl();
case SclPackage.LN0__CONTROL_WITH_IED_NAME:
return isSetControlWithIEDName();
}
return super.eIsSet( featureID );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if( eIsProxy() ) return super.toString();
StringBuilder result = new StringBuilder( super.toString() );
result.append( " (ControlWithIEDName: " );
result.append( controlWithIEDName );
result.append( ')' );
return result.toString();
}
} //LN0Impl
......@@ -6998,16 +6998,6 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return ( EReference ) getLN0().getEStructuralFeatures().get( 3 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getLN0_ControlWithIEDName() {
return ( EAttribute ) getLN0().getEStructuralFeatures().get( 4 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -1166,32 +1166,17 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LN0" eSuperTypes="#//AnyLN">
<eStructuralFeatures xsi:type="ecore:EReference" name="GSEControl" ordered="false"
upperBound="-1" eType="#//GSEControl" volatile="true" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//GSEControl/ParentLN0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlWithIEDName"/>
</eAnnotations>
</eStructuralFeatures>
upperBound="-1" eType="#//GSEControl" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//GSEControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentLDevice" ordered="false"
eType="#//LDevice" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LDevice/LN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SampledValueControl" ordered="false"
upperBound="-1" eType="#//SampledValueControl" volatile="true" unsettable="true"
containment="true" resolveProxies="false" eOpposite="#//SampledValueControl/ParentLN0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlWithIEDName"/>
</eAnnotations>
</eStructuralFeatures>
upperBound="-1" eType="#//SampledValueControl" unsettable="true" containment="true"
resolveProxies="false" eOpposite="#//SampledValueControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SettingControl" ordered="false"
eType="#//SettingControl" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SettingControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithIEDName" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Log" eSuperTypes="#//UnNaming">
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentAnyLN" ordered="false"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment