Commit 9927dd26 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Add plug-ins for quantities (Indriya and City Units)

parent 7ac45c5d
...@@ -11,6 +11,8 @@ Bundle-Localization: plugin ...@@ -11,6 +11,8 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-15 Bundle-RequiredExecutionEnvironment: JavaSE-15
Export-Package: org.example.democatalog.provider Export-Package: org.example.democatalog.provider
Require-Bundle: org.eclipse.core.runtime, Require-Bundle: org.eclipse.core.runtime,
org.example.democatalog;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport, org.eclipse.emf.edit;visibility:=reexport,
org.example.democatalog.model;bundle-version="1.0.0" de.hftstuttgart.cityunits.model;visibility:=reexport,
de.hftstuttgart.cityunits.model.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
*/ */
package org.example.democatalog.provider; package org.example.democatalog.provider;
import de.hftstuttgart.cityunits.model.quantities.provider.QuantitiesEditPlugin;
import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.common.util.ResourceLocator;
...@@ -36,7 +37,7 @@ public final class DemocatalogEditPlugin extends EMFPlugin { ...@@ -36,7 +37,7 @@ public final class DemocatalogEditPlugin extends EMFPlugin {
* @generated * @generated
*/ */
public DemocatalogEditPlugin() { public DemocatalogEditPlugin() {
super(new ResourceLocator[] {}); super(new ResourceLocator[] { QuantitiesEditPlugin.INSTANCE, });
} }
/** /**
......
...@@ -63,7 +63,7 @@ public class InverterItemProvider extends ElectricalDeviceItemProvider { ...@@ -63,7 +63,7 @@ public class InverterItemProvider extends ElectricalDeviceItemProvider {
getString("_UI_PropertyDescriptor_description", "_UI_Inverter_maxDCVoltage_feature", getString("_UI_PropertyDescriptor_description", "_UI_Inverter_maxDCVoltage_feature",
"_UI_Inverter_type"), "_UI_Inverter_type"),
DemocatalogPackage.Literals.INVERTER__MAX_DC_VOLTAGE, true, false, false, DemocatalogPackage.Literals.INVERTER__MAX_DC_VOLTAGE, true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/** /**
...@@ -79,7 +79,7 @@ public class InverterItemProvider extends ElectricalDeviceItemProvider { ...@@ -79,7 +79,7 @@ public class InverterItemProvider extends ElectricalDeviceItemProvider {
getString("_UI_PropertyDescriptor_description", "_UI_Inverter_macDCCurrent_feature", getString("_UI_PropertyDescriptor_description", "_UI_Inverter_macDCCurrent_feature",
"_UI_Inverter_type"), "_UI_Inverter_type"),
DemocatalogPackage.Literals.INVERTER__MAC_DC_CURRENT, true, false, false, DemocatalogPackage.Literals.INVERTER__MAC_DC_CURRENT, true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/** /**
......
Manifest-Version: 1.0 Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.example.democatalog.model;singleton:=true Bundle-SymbolicName: org.example.democatalog;singleton:=true
Automatic-Module-Name: org.example.democatalog Automatic-Module-Name: org.example.democatalog
Bundle-Version: 1.0.0.qualifier Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: . Bundle-ClassPath: .
...@@ -12,5 +12,6 @@ Export-Package: org.example.democatalog, ...@@ -12,5 +12,6 @@ Export-Package: org.example.democatalog,
org.example.democatalog.impl, org.example.democatalog.impl,
org.example.democatalog.util org.example.democatalog.util
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport, Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
de.hftstuttgart.cityunits.model;visibility:=reexport,
org.eclipse.core.runtime org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
<viewpoint:DAnalysis uid="_HZnjoCHUEeuLPpz77IfmqA" selectedViews="_HikEQCHUEeuLPpz77IfmqA" version="14.3.1.202003261200"> <viewpoint:DAnalysis uid="_HZnjoCHUEeuLPpz77IfmqA" selectedViews="_HikEQCHUEeuLPpz77IfmqA" version="14.3.1.202003261200">
<semanticResources>democatalog.ecore</semanticResources> <semanticResources>democatalog.ecore</semanticResources>
<semanticResources>democatalog.genmodel</semanticResources> <semanticResources>democatalog.genmodel</semanticResources>
<semanticResources>platform:/resource/de.hftstuttgart.cityunits.model/model/Quantities.ecore</semanticResources>
<semanticResources>platform:/resource/de.hftstuttgart.cityunits.model/model/Quantities.genmodel</semanticResources>
<ownedViews xmi:type="viewpoint:DView" uid="_HikEQCHUEeuLPpz77IfmqA"> <ownedViews xmi:type="viewpoint:DView" uid="_HikEQCHUEeuLPpz77IfmqA">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_HkPfQCHUEeuLPpz77IfmqA" name="democatalog" repPath="#_Hji7sCHUEeuLPpz77IfmqA" changeId="19235c9b-0cc2-4f1a-9aa8-7069bd7e5fa2"> <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_HkPfQCHUEeuLPpz77IfmqA" name="democatalog" repPath="#_Hji7sCHUEeuLPpz77IfmqA" changeId="eeb8279a-74c0-4f63-8743-3f1144ab1d0a">
<description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
<target xmi:type="ecore:EPackage" href="democatalog.ecore#/"/> <target xmi:type="ecore:EPackage" href="democatalog.ecore#/"/>
</ownedRepresentationDescriptors> </ownedRepresentationDescriptors>
...@@ -505,7 +507,7 @@ ...@@ -505,7 +507,7 @@
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
</ownedStyle> </ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
<ownedElements xmi:type="diagram:DNodeListElement" uid="_h6CGcCIEEeuUrYII4OYxLg" name="maxDCVoltage : EDouble = 0.0" tooltipText=""> <ownedElements xmi:type="diagram:DNodeListElement" uid="_h6CGcCIEEeuUrYII4OYxLg" name="maxDCVoltage : QuantityDouble = 0.0 V" tooltipText="">
<target xmi:type="ecore:EAttribute" href="democatalog.ecore#//Inverter/maxDCVoltage"/> <target xmi:type="ecore:EAttribute" href="democatalog.ecore#//Inverter/maxDCVoltage"/>
<semanticElements xmi:type="ecore:EAttribute" href="democatalog.ecore#//Inverter/maxDCVoltage"/> <semanticElements xmi:type="ecore:EAttribute" href="democatalog.ecore#//Inverter/maxDCVoltage"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_sAIMsSIEEeuUrYII4OYxLg" labelAlignment="LEFT" description="_hEX5gCHzEeuUrYII4OYxLg"> <ownedStyle xmi:type="diagram:BundledImage" uid="_sAIMsSIEEeuUrYII4OYxLg" labelAlignment="LEFT" description="_hEX5gCHzEeuUrYII4OYxLg">
......
...@@ -35,9 +35,11 @@ ...@@ -35,9 +35,11 @@
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Inverter" eSuperTypes="#//ElectricalDevice"> <eClassifiers xsi:type="ecore:EClass" name="Inverter" eSuperTypes="#//ElectricalDevice">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="maxDCVoltage" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxDCVoltage" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0.0"/> eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble"
defaultValueLiteral="0.0 V"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="macDCCurrent" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="macDCCurrent" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" defaultValueLiteral="0.0"/> eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble"
defaultValueLiteral="100.0 mV"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Manufacturer"> <eClassifiers xsi:type="ecore:EClass" name="Manufacturer">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
editDirectory="/org.example.democatalog.edit/src-gen" editorDirectory="/org.example.democatalog.editor/src-gen" editDirectory="/org.example.democatalog.edit/src-gen" editorDirectory="/org.example.democatalog.editor/src-gen"
modelPluginID="org.example.democatalog" modelName="Democatalog" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" modelPluginID="org.example.democatalog" modelName="Democatalog" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="15.0" codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="15.0"
copyrightFields="false" operationReflection="true" importOrganizing="true"> copyrightFields="false" usedGenPackages="../../de.hftstuttgart.cityunits.model/model/Quantities.genmodel#//quantities"
operationReflection="true" importOrganizing="true">
<foreignModel>democatalog.ecore</foreignModel> <foreignModel>democatalog.ecore</foreignModel>
<testsDirectory xsi:nil="true"/> <testsDirectory xsi:nil="true"/>
<genPackages prefix="Democatalog" basePackage="org.example" disposableProviderFactory="true" <genPackages prefix="Democatalog" basePackage="org.example" disposableProviderFactory="true"
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
*/ */
package org.example.democatalog; package org.example.democatalog;
import de.hftstuttgart.cityunits.model.NullableQuantity;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* A representation of the model object '<em><b>Inverter</b></em>'. * A representation of the model object '<em><b>Inverter</b></em>'.
...@@ -22,16 +24,16 @@ package org.example.democatalog; ...@@ -22,16 +24,16 @@ package org.example.democatalog;
public interface Inverter extends ElectricalDevice { public interface Inverter extends ElectricalDevice {
/** /**
* Returns the value of the '<em><b>Max DC Voltage</b></em>' attribute. * Returns the value of the '<em><b>Max DC Voltage</b></em>' attribute.
* The default value is <code>"0.0"</code>. * The default value is <code>"0.0 V"</code>.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Max DC Voltage</em>' attribute. * @return the value of the '<em>Max DC Voltage</em>' attribute.
* @see #setMaxDCVoltage(double) * @see #setMaxDCVoltage(NullableQuantity)
* @see org.example.democatalog.DemocatalogPackage#getInverter_MaxDCVoltage() * @see org.example.democatalog.DemocatalogPackage#getInverter_MaxDCVoltage()
* @model default="0.0" required="true" * @model default="0.0 V" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true"
* @generated * @generated
*/ */
double getMaxDCVoltage(); NullableQuantity getMaxDCVoltage();
/** /**
* Sets the value of the '{@link org.example.democatalog.Inverter#getMaxDCVoltage <em>Max DC Voltage</em>}' attribute. * Sets the value of the '{@link org.example.democatalog.Inverter#getMaxDCVoltage <em>Max DC Voltage</em>}' attribute.
...@@ -41,20 +43,20 @@ public interface Inverter extends ElectricalDevice { ...@@ -41,20 +43,20 @@ public interface Inverter extends ElectricalDevice {
* @see #getMaxDCVoltage() * @see #getMaxDCVoltage()
* @generated * @generated
*/ */
void setMaxDCVoltage(double value); void setMaxDCVoltage(NullableQuantity value);
/** /**
* Returns the value of the '<em><b>Mac DC Current</b></em>' attribute. * Returns the value of the '<em><b>Mac DC Current</b></em>' attribute.
* The default value is <code>"0.0"</code>. * The default value is <code>"100.0 mV"</code>.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Mac DC Current</em>' attribute. * @return the value of the '<em>Mac DC Current</em>' attribute.
* @see #setMacDCCurrent(double) * @see #setMacDCCurrent(NullableQuantity)
* @see org.example.democatalog.DemocatalogPackage#getInverter_MacDCCurrent() * @see org.example.democatalog.DemocatalogPackage#getInverter_MacDCCurrent()
* @model default="0.0" required="true" * @model default="100.0 mV" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true"
* @generated * @generated
*/ */
double getMacDCCurrent(); NullableQuantity getMacDCCurrent();
/** /**
* Sets the value of the '{@link org.example.democatalog.Inverter#getMacDCCurrent <em>Mac DC Current</em>}' attribute. * Sets the value of the '{@link org.example.democatalog.Inverter#getMacDCCurrent <em>Mac DC Current</em>}' attribute.
...@@ -64,6 +66,6 @@ public interface Inverter extends ElectricalDevice { ...@@ -64,6 +66,6 @@ public interface Inverter extends ElectricalDevice {
* @see #getMacDCCurrent() * @see #getMacDCCurrent()
* @generated * @generated
*/ */
void setMacDCCurrent(double value); void setMacDCCurrent(NullableQuantity value);
} // Inverter } // Inverter
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
*/ */
package org.example.democatalog.impl; package org.example.democatalog.impl;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EEnum;
...@@ -150,6 +151,9 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP ...@@ -150,6 +151,9 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP
isInited = true; isInited = true;
// Initialize simple dependencies
QuantitiesPackage.eINSTANCE.eClass();
// Create package meta-data objects // Create package meta-data objects
theDemocatalogPackage.createPackageContents(); theDemocatalogPackage.createPackageContents();
...@@ -538,6 +542,10 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP ...@@ -538,6 +542,10 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP
setNsPrefix(eNS_PREFIX); setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI); setNsURI(eNS_URI);
// Obtain other dependent packages
QuantitiesPackage theQuantitiesPackage = (QuantitiesPackage) EPackage.Registry.INSTANCE
.getEPackage(QuantitiesPackage.eNS_URI);
// Create type parameters // Create type parameters
// Set bounds for type parameters // Set bounds for type parameters
...@@ -593,11 +601,11 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP ...@@ -593,11 +601,11 @@ public class DemocatalogPackageImpl extends EPackageImpl implements DemocatalogP
initEClass(inverterEClass, Inverter.class, "Inverter", !IS_ABSTRACT, !IS_INTERFACE, initEClass(inverterEClass, Inverter.class, "Inverter", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS); IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getInverter_MaxDCVoltage(), ecorePackage.getEDouble(), "maxDCVoltage", "0.0", 1, 1, initEAttribute(getInverter_MaxDCVoltage(), theQuantitiesPackage.getQuantityDouble(), "maxDCVoltage", "0.0 V", 1,
Inverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 1, Inverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
initEAttribute(getInverter_MacDCCurrent(), ecorePackage.getEDouble(), "macDCCurrent", "0.0", 1, 1, initEAttribute(getInverter_MacDCCurrent(), theQuantitiesPackage.getQuantityDouble(), "macDCCurrent", "100.0 mV",
Inverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 1, 1, Inverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
initEClass(manufacturerEClass, Manufacturer.class, "Manufacturer", !IS_ABSTRACT, !IS_INTERFACE, initEClass(manufacturerEClass, Manufacturer.class, "Manufacturer", !IS_ABSTRACT, !IS_INTERFACE,
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
*/ */
package org.example.democatalog.impl; package org.example.democatalog.impl;
import de.hftstuttgart.cityunits.model.NullableQuantity;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClass;
...@@ -34,7 +37,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -34,7 +37,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
* @ordered * @ordered
*/ */
protected static final double MAX_DC_VOLTAGE_EDEFAULT = 0.0; protected static final NullableQuantity MAX_DC_VOLTAGE_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "0.0 V");
/** /**
* The cached value of the '{@link #getMaxDCVoltage() <em>Max DC Voltage</em>}' attribute. * The cached value of the '{@link #getMaxDCVoltage() <em>Max DC Voltage</em>}' attribute.
...@@ -44,7 +48,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -44,7 +48,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
* @ordered * @ordered
*/ */
protected double maxDCVoltage = MAX_DC_VOLTAGE_EDEFAULT; protected NullableQuantity maxDCVoltage = MAX_DC_VOLTAGE_EDEFAULT;
/** /**
* The default value of the '{@link #getMacDCCurrent() <em>Mac DC Current</em>}' attribute. * The default value of the '{@link #getMacDCCurrent() <em>Mac DC Current</em>}' attribute.
...@@ -54,7 +58,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -54,7 +58,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
* @ordered * @ordered
*/ */
protected static final double MAC_DC_CURRENT_EDEFAULT = 0.0; protected static final NullableQuantity MAC_DC_CURRENT_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "100.0 mV");
/** /**
* The cached value of the '{@link #getMacDCCurrent() <em>Mac DC Current</em>}' attribute. * The cached value of the '{@link #getMacDCCurrent() <em>Mac DC Current</em>}' attribute.
...@@ -64,7 +69,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -64,7 +69,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
* @ordered * @ordered
*/ */
protected double macDCCurrent = MAC_DC_CURRENT_EDEFAULT; protected NullableQuantity macDCCurrent = MAC_DC_CURRENT_EDEFAULT;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -91,7 +96,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -91,7 +96,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
*/ */
@Override @Override
public double getMaxDCVoltage() { public NullableQuantity getMaxDCVoltage() {
return maxDCVoltage; return maxDCVoltage;
} }
...@@ -101,8 +106,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -101,8 +106,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
*/ */
@Override @Override
public void setMaxDCVoltage(double newMaxDCVoltage) { public void setMaxDCVoltage(NullableQuantity newMaxDCVoltage) {
double oldMaxDCVoltage = maxDCVoltage; NullableQuantity oldMaxDCVoltage = maxDCVoltage;
maxDCVoltage = newMaxDCVoltage; maxDCVoltage = newMaxDCVoltage;
if (eNotificationRequired()) if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE, eNotify(new ENotificationImpl(this, Notification.SET, DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE,
...@@ -115,7 +120,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -115,7 +120,7 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
*/ */
@Override @Override
public double getMacDCCurrent() { public NullableQuantity getMacDCCurrent() {
return macDCCurrent; return macDCCurrent;
} }
...@@ -125,8 +130,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -125,8 +130,8 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
* @generated * @generated
*/ */
@Override @Override
public void setMacDCCurrent(double newMacDCCurrent) { public void setMacDCCurrent(NullableQuantity newMacDCCurrent) {
double oldMacDCCurrent = macDCCurrent; NullableQuantity oldMacDCCurrent = macDCCurrent;
macDCCurrent = newMacDCCurrent; macDCCurrent = newMacDCCurrent;
if (eNotificationRequired()) if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DemocatalogPackage.INVERTER__MAC_DC_CURRENT, eNotify(new ENotificationImpl(this, Notification.SET, DemocatalogPackage.INVERTER__MAC_DC_CURRENT,
...@@ -158,10 +163,10 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -158,10 +163,10 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
public void eSet(int featureID, Object newValue) { public void eSet(int featureID, Object newValue) {
switch (featureID) { switch (featureID) {
case DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE: case DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE:
setMaxDCVoltage((Double) newValue); setMaxDCVoltage((NullableQuantity) newValue);
return; return;
case DemocatalogPackage.INVERTER__MAC_DC_CURRENT: case DemocatalogPackage.INVERTER__MAC_DC_CURRENT:
setMacDCCurrent((Double) newValue); setMacDCCurrent((NullableQuantity) newValue);
return; return;
} }
super.eSet(featureID, newValue); super.eSet(featureID, newValue);
...@@ -194,9 +199,11 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter { ...@@ -194,9 +199,11 @@ public class InverterImpl extends ElectricalDeviceImpl implements Inverter {
public boolean eIsSet(int featureID) { public boolean eIsSet(int featureID) {
switch (featureID) { switch (featureID) {
case DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE: case DemocatalogPackage.INVERTER__MAX_DC_VOLTAGE:
return maxDCVoltage != MAX_DC_VOLTAGE_EDEFAULT; return MAX_DC_VOLTAGE_EDEFAULT == null ? maxDCVoltage != null
: !MAX_DC_VOLTAGE_EDEFAULT.equals(maxDCVoltage);
case DemocatalogPackage.INVERTER__MAC_DC_CURRENT: case DemocatalogPackage.INVERTER__MAC_DC_CURRENT:
return macDCCurrent != MAC_DC_CURRENT_EDEFAULT; return MAC_DC_CURRENT_EDEFAULT == null ? macDCCurrent != null
: !MAC_DC_CURRENT_EDEFAULT.equals(macDCCurrent);
} }
return super.eIsSet(featureID); return super.eIsSet(featureID);
} }
......
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