diff --git a/de.hftstuttgart.buildingphysics.application/.classpath b/de.hftstuttgart.buildingphysics.application/.classpath index eabb7bcf36f82dda5d6f14a60a76a6acc5fad082..d116359246ee6800ba985bf91b14957149f7db34 100644 --- a/de.hftstuttgart.buildingphysics.application/.classpath +++ b/de.hftstuttgart.buildingphysics.application/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="src/"/> <classpathentry kind="output" path="target/classes"/> </classpath> diff --git a/de.hftstuttgart.buildingphysics.edit/.classpath b/de.hftstuttgart.buildingphysics.edit/.classpath index 1f0469022c306ea5fefe4b29b6d0eee95d3db009..d116359246ee6800ba985bf91b14957149f7db34 100644 --- a/de.hftstuttgart.buildingphysics.edit/.classpath +++ b/de.hftstuttgart.buildingphysics.edit/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src/"/> <classpathentry kind="output" path="target/classes"/> diff --git a/de.hftstuttgart.buildingphysics.edit/icons/full/obj16/LifeCycle.gif b/de.hftstuttgart.buildingphysics.edit/icons/full/obj16/LifeCycle.gif new file mode 100644 index 0000000000000000000000000000000000000000..48e3cf2268736efbb8bc3c5bd29315702f2b38c4 Binary files /dev/null and b/de.hftstuttgart.buildingphysics.edit/icons/full/obj16/LifeCycle.gif differ diff --git a/de.hftstuttgart.buildingphysics.edit/plugin.properties b/de.hftstuttgart.buildingphysics.edit/plugin.properties index bac858c20301563217604243f67e2633d8cd5b6c..6ad3d146e533b054adbb421adbc22e6ff173be1f 100644 --- a/de.hftstuttgart.buildingphysics.edit/plugin.properties +++ b/de.hftstuttgart.buildingphysics.edit/plugin.properties @@ -47,3 +47,11 @@ _UI_Material_conductivity_feature = Conductivity _UI_Unknown_feature = Unspecified _UI_Catalog_xxx_feature = Xxx +_UI_LifeCycle_type = Life Cycle +_UI_WindowType_lifeCycle_feature = Life Cycle +_UI_LifeCycle_embodiedEnergy_feature = Embodied Energy +_UI_LifeCycle_embodiedCarbon_feature = Embodied Carbon +_UI_LifeCycle_constructionDescription_feature = Construction Description +_UI_LifeCycle_disposalEnergy_feature = Disposal Energy +_UI_LifeCycle_disposalCarbon_feature = Disposal Carbon +_UI_LifeCycle_disposalDescription_feature = Disposal Description diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/BuildingPhysicsItemProviderAdapterFactory.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/BuildingPhysicsItemProviderAdapterFactory.java index 757bc7f17fea6af387ed21d7a6cdc8e6635c9db3..2a2644cc78cce033339379bfd7215bba75191600 100644 --- a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/BuildingPhysicsItemProviderAdapterFactory.java +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/BuildingPhysicsItemProviderAdapterFactory.java @@ -210,6 +210,29 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd return materialItemProvider; } + /** + * This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.LifeCycle} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LifeCycleItemProvider lifeCycleItemProvider; + + /** + * This creates an adapter for a {@link de.hftstuttgart.buildingphysics.LifeCycle}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createLifeCycleAdapter() { + if (lifeCycleItemProvider == null) { + lifeCycleItemProvider = new LifeCycleItemProvider(this); + } + + return lifeCycleItemProvider; + } + /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> @@ -327,6 +350,8 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd materialCategoryItemProvider.dispose(); if (materialItemProvider != null) materialItemProvider.dispose(); + if (lifeCycleItemProvider != null) + lifeCycleItemProvider.dispose(); } } diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/LifeCycleItemProvider.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/LifeCycleItemProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..b17042c24d6a8987e0ae850627e71b14764b22ee --- /dev/null +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/LifeCycleItemProvider.java @@ -0,0 +1,246 @@ +/** + */ +package de.hftstuttgart.buildingphysics.provider; + +import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; +import de.hftstuttgart.buildingphysics.LifeCycle; + +import de.hftstuttgart.cityunits.model.NullableQuantity; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link de.hftstuttgart.buildingphysics.LifeCycle} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class LifeCycleItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LifeCycleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addEmbodiedEnergyPropertyDescriptor(object); + addEmbodiedCarbonPropertyDescriptor(object); + addConstructionDescriptionPropertyDescriptor(object); + addDisposalEnergyPropertyDescriptor(object); + addDisposalCarbonPropertyDescriptor(object); + addDisposalDescriptionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Embodied Energy feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addEmbodiedEnergyPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_LifeCycle_embodiedEnergy_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_embodiedEnergy_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__EMBODIED_ENERGY, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Embodied Carbon feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addEmbodiedCarbonPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_LifeCycle_embodiedCarbon_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_embodiedCarbon_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__EMBODIED_CARBON, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Construction Description feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addConstructionDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_LifeCycle_constructionDescription_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_constructionDescription_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Disposal Energy feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addDisposalEnergyPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_LifeCycle_disposalEnergy_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_disposalEnergy_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__DISPOSAL_ENERGY, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Disposal Carbon feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addDisposalCarbonPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_LifeCycle_disposalCarbon_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_disposalCarbon_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__DISPOSAL_CARBON, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Disposal Description feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addDisposalDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_LifeCycle_disposalDescription_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LifeCycle_disposalDescription_feature", + "_UI_LifeCycle_type"), + BuildingPhysicsPackage.Literals.LIFE_CYCLE__DISPOSAL_DESCRIPTION, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns LifeCycle.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/LifeCycle")); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + NullableQuantity labelValue = ((LifeCycle) object).getEmbodiedEnergy(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_LifeCycle_type") + : getString("_UI_LifeCycle_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(LifeCycle.class)) { + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY: + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON: + case BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION: + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY: + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON: + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return BuildingPhysicsEditPlugin.INSTANCE; + } + +} diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java index e00773231f4ba449f06a1932f8b760ca04ed23a4..a172b8f748230798303b2208fd71dabc1ac03b7d 100644 --- a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java @@ -2,6 +2,7 @@ */ package de.hftstuttgart.buildingphysics.provider; +import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.WindowType; @@ -13,6 +14,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -159,6 +161,36 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, 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 + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(BuildingPhysicsPackage.Literals.WINDOW_TYPE__LIFE_CYCLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + /** * This returns WindowType.gif. * <!-- begin-user-doc --> @@ -213,6 +245,9 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; } super.notifyChanged(notification); } @@ -227,6 +262,9 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(BuildingPhysicsPackage.Literals.WINDOW_TYPE__LIFE_CYCLE, + BuildingPhysicsFactory.eINSTANCE.createLifeCycle())); } /** diff --git a/de.hftstuttgart.buildingphysics.viewmodel/.classpath b/de.hftstuttgart.buildingphysics.viewmodel/.classpath index a9f4be78775fb2ba0b07e158301ada9c3be319a1..140ee67a687f573598c16ef72216d2817519b929 100644 --- a/de.hftstuttgart.buildingphysics.viewmodel/.classpath +++ b/de.hftstuttgart.buildingphysics.viewmodel/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="target/classes"/> </classpath> diff --git a/de.hftstuttgart.buildingphysics.viewmodel/plugin.xml b/de.hftstuttgart.buildingphysics.viewmodel/plugin.xml index ba7c6927c017ce7cd637119cda76705fe2a5ba7e..1c3645be7f91915f6f3d1651b3c05737fd241161 100644 --- a/de.hftstuttgart.buildingphysics.viewmodel/plugin.xml +++ b/de.hftstuttgart.buildingphysics.viewmodel/plugin.xml @@ -2,7 +2,11 @@ <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.emf.ecp.view.model.provider.xmi.file"> + + + + <file filePath="viewmodels/MaterialCategory.view"/> <file filePath="viewmodels/BuildingPhysicsCatalog.view"/> </extension> -</plugin> +</plugin> \ No newline at end of file diff --git a/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/MaterialCategory.view b/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/MaterialCategory.view index a973780f6b4ee456dc4936646e172fd8c1b45a71..0943beecb2a48e79299205979d4dd9e708ac5c0e 100644 --- a/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/MaterialCategory.view +++ b/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/MaterialCategory.view @@ -2,9 +2,11 @@ <org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model/150" xmi:id="_ZY8TECUNEeux0PTSTJn6xg" name="MaterialCategory"> <rootEClass href="http://www.hftstuttgart.de/buildingphysics#//MaterialCategory"/> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_cQS6sCUNEeux0PTSTJn6xg" detailEditing="WithPanel"> - <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_gQbIQCUNEeux0PTSTJn6xg"> - <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_gQbIQSUNEeux0PTSTJn6xg"> - <domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//MaterialCategory/material"/> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_6djXAKg0EeuFa-L9J4DlVg"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_6djXAag0EeuFa-L9J4DlVg"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6djXAqg0EeuFa-L9J4DlVg"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//MaterialCategory/material"/> + </domainModelReference> </domainModelReference> </domainModelReference> </children> diff --git a/de.hftstuttgart.buildingphysics/.classpath b/de.hftstuttgart.buildingphysics/.classpath index 1f0469022c306ea5fefe4b29b6d0eee95d3db009..d116359246ee6800ba985bf91b14957149f7db34 100644 --- a/de.hftstuttgart.buildingphysics/.classpath +++ b/de.hftstuttgart.buildingphysics/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src/"/> <classpathentry kind="output" path="target/classes"/> diff --git a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore index bdd65722e80f9903335f6a3e98230a903e55f618..6ab9fcb7761f20b678719bb936f11da49e58e60b 100644 --- a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore +++ b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore @@ -27,6 +27,8 @@ <details key="documentation" value="In % (between 0 and 100)"/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="lifeCycle" eType="#//LifeCycle" + containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="Catalog" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> @@ -58,4 +60,22 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivity" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LifeCycle"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="embodiedEnergy" lowerBound="1" + eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble" + defaultValueLiteral="kWh"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="embodiedCarbon" lowerBound="1" + eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble" + defaultValueLiteral="kg"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="constructionDescription" + lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="disposalEnergy" lowerBound="1" + eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble" + defaultValueLiteral="kWh"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="disposalCarbon" lowerBound="1" + eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble" + defaultValueLiteral="kg"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="disposalDescription" lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> </ecore:EPackage> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsFactory.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsFactory.java index 2c9a779521f37edc8bc1a276759e04205e9ff624..233688cc92a9d7dc1e769ef6ffe5451f0392d8bf 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsFactory.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsFactory.java @@ -75,6 +75,15 @@ public interface BuildingPhysicsFactory extends EFactory { */ Material createMaterial(); + /** + * Returns a new object of class '<em>Life Cycle</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Life Cycle</em>'. + * @generated + */ + LifeCycle createLifeCycle(); + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsPackage.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsPackage.java index 88c40064b987bc95a91ac7789e03900d2d0fac84..65743de418c68f7a1d0b7c6b61e3cacd99e515a3 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsPackage.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/BuildingPhysicsPackage.java @@ -175,6 +175,15 @@ public interface BuildingPhysicsPackage extends EPackage { */ int WINDOW_TYPE__FRAME_RATIO = 5; + /** + * The feature id for the '<em><b>Life Cycle</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int WINDOW_TYPE__LIFE_CYCLE = 6; + /** * The number of structural features of the '<em>Window Type</em>' class. * <!-- begin-user-doc --> @@ -182,7 +191,7 @@ public interface BuildingPhysicsPackage extends EPackage { * @generated * @ordered */ - int WINDOW_TYPE_FEATURE_COUNT = 6; + int WINDOW_TYPE_FEATURE_COUNT = 7; /** * The number of operations of the '<em>Window Type</em>' class. @@ -495,6 +504,88 @@ public interface BuildingPhysicsPackage extends EPackage { */ int MATERIAL_OPERATION_COUNT = 0; + /** + * The meta object id for the '{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl <em>Life Cycle</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see de.hftstuttgart.buildingphysics.impl.LifeCycleImpl + * @see de.hftstuttgart.buildingphysics.impl.BuildingPhysicsPackageImpl#getLifeCycle() + * @generated + */ + int LIFE_CYCLE = 7; + + /** + * The feature id for the '<em><b>Embodied Energy</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__EMBODIED_ENERGY = 0; + + /** + * The feature id for the '<em><b>Embodied Carbon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__EMBODIED_CARBON = 1; + + /** + * The feature id for the '<em><b>Construction Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__CONSTRUCTION_DESCRIPTION = 2; + + /** + * The feature id for the '<em><b>Disposal Energy</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__DISPOSAL_ENERGY = 3; + + /** + * The feature id for the '<em><b>Disposal Carbon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__DISPOSAL_CARBON = 4; + + /** + * The feature id for the '<em><b>Disposal Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE__DISPOSAL_DESCRIPTION = 5; + + /** + * The number of structural features of the '<em>Life Cycle</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE_FEATURE_COUNT = 6; + + /** + * The number of operations of the '<em>Life Cycle</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LIFE_CYCLE_OPERATION_COUNT = 0; + /** * Returns the meta object for class '{@link de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog <em>Catalog</em>}'. * <!-- begin-user-doc --> @@ -614,6 +705,17 @@ public interface BuildingPhysicsPackage extends EPackage { */ EAttribute getWindowType_FrameRatio(); + /** + * Returns the meta object for the containment reference '{@link de.hftstuttgart.buildingphysics.WindowType#getLifeCycle <em>Life Cycle</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Life Cycle</em>'. + * @see de.hftstuttgart.buildingphysics.WindowType#getLifeCycle() + * @see #getWindowType() + * @generated + */ + EReference getWindowType_LifeCycle(); + /** * Returns the meta object for class '{@link de.hftstuttgart.buildingphysics.Catalog <em>Catalog</em>}'. * <!-- begin-user-doc --> @@ -796,6 +898,82 @@ public interface BuildingPhysicsPackage extends EPackage { */ EAttribute getMaterial_Conductivity(); + /** + * Returns the meta object for class '{@link de.hftstuttgart.buildingphysics.LifeCycle <em>Life Cycle</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Life Cycle</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle + * @generated + */ + EClass getLifeCycle(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedEnergy <em>Embodied Energy</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Embodied Energy</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedEnergy() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_EmbodiedEnergy(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedCarbon <em>Embodied Carbon</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Embodied Carbon</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedCarbon() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_EmbodiedCarbon(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getConstructionDescription <em>Construction Description</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Construction Description</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getConstructionDescription() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_ConstructionDescription(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalEnergy <em>Disposal Energy</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Disposal Energy</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getDisposalEnergy() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_DisposalEnergy(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalCarbon <em>Disposal Carbon</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Disposal Carbon</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getDisposalCarbon() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_DisposalCarbon(); + + /** + * Returns the meta object for the attribute '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalDescription <em>Disposal Description</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Disposal Description</em>'. + * @see de.hftstuttgart.buildingphysics.LifeCycle#getDisposalDescription() + * @see #getLifeCycle() + * @generated + */ + EAttribute getLifeCycle_DisposalDescription(); + /** * Returns the factory that creates the instances of the model. * <!-- begin-user-doc --> @@ -911,6 +1089,14 @@ public interface BuildingPhysicsPackage extends EPackage { */ EAttribute WINDOW_TYPE__FRAME_RATIO = eINSTANCE.getWindowType_FrameRatio(); + /** + * The meta object literal for the '<em><b>Life Cycle</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference WINDOW_TYPE__LIFE_CYCLE = eINSTANCE.getWindowType_LifeCycle(); + /** * The meta object literal for the '{@link de.hftstuttgart.buildingphysics.impl.CatalogImpl <em>Catalog</em>}' class. * <!-- begin-user-doc --> @@ -1057,6 +1243,64 @@ public interface BuildingPhysicsPackage extends EPackage { */ EAttribute MATERIAL__CONDUCTIVITY = eINSTANCE.getMaterial_Conductivity(); + /** + * The meta object literal for the '{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl <em>Life Cycle</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see de.hftstuttgart.buildingphysics.impl.LifeCycleImpl + * @see de.hftstuttgart.buildingphysics.impl.BuildingPhysicsPackageImpl#getLifeCycle() + * @generated + */ + EClass LIFE_CYCLE = eINSTANCE.getLifeCycle(); + + /** + * The meta object literal for the '<em><b>Embodied Energy</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__EMBODIED_ENERGY = eINSTANCE.getLifeCycle_EmbodiedEnergy(); + + /** + * The meta object literal for the '<em><b>Embodied Carbon</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__EMBODIED_CARBON = eINSTANCE.getLifeCycle_EmbodiedCarbon(); + + /** + * The meta object literal for the '<em><b>Construction Description</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__CONSTRUCTION_DESCRIPTION = eINSTANCE.getLifeCycle_ConstructionDescription(); + + /** + * The meta object literal for the '<em><b>Disposal Energy</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__DISPOSAL_ENERGY = eINSTANCE.getLifeCycle_DisposalEnergy(); + + /** + * The meta object literal for the '<em><b>Disposal Carbon</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__DISPOSAL_CARBON = eINSTANCE.getLifeCycle_DisposalCarbon(); + + /** + * The meta object literal for the '<em><b>Disposal Description</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LIFE_CYCLE__DISPOSAL_DESCRIPTION = eINSTANCE.getLifeCycle_DisposalDescription(); + } } //BuildingPhysicsPackage diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/LifeCycle.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/LifeCycle.java new file mode 100644 index 0000000000000000000000000000000000000000..1dd86a6c1a6254728dce9ede3c36b6556b32ad4f --- /dev/null +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/LifeCycle.java @@ -0,0 +1,167 @@ +/** + */ +package de.hftstuttgart.buildingphysics; + +import de.hftstuttgart.cityunits.model.NullableQuantity; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Life Cycle</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedEnergy <em>Embodied Energy</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedCarbon <em>Embodied Carbon</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getConstructionDescription <em>Construction Description</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalEnergy <em>Disposal Energy</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalCarbon <em>Disposal Carbon</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalDescription <em>Disposal Description</em>}</li> + * </ul> + * + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle() + * @model + * @generated + */ +public interface LifeCycle extends EObject { + /** + * Returns the value of the '<em><b>Embodied Energy</b></em>' attribute. + * The default value is <code>"kWh"</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Embodied Energy</em>' attribute. + * @see #setEmbodiedEnergy(NullableQuantity) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_EmbodiedEnergy() + * @model default="kWh" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true" + * @generated + */ + NullableQuantity getEmbodiedEnergy(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedEnergy <em>Embodied Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Embodied Energy</em>' attribute. + * @see #getEmbodiedEnergy() + * @generated + */ + void setEmbodiedEnergy(NullableQuantity value); + + /** + * Returns the value of the '<em><b>Embodied Carbon</b></em>' attribute. + * The default value is <code>"kg"</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Embodied Carbon</em>' attribute. + * @see #setEmbodiedCarbon(NullableQuantity) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_EmbodiedCarbon() + * @model default="kg" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true" + * @generated + */ + NullableQuantity getEmbodiedCarbon(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getEmbodiedCarbon <em>Embodied Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Embodied Carbon</em>' attribute. + * @see #getEmbodiedCarbon() + * @generated + */ + void setEmbodiedCarbon(NullableQuantity value); + + /** + * Returns the value of the '<em><b>Construction Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Construction Description</em>' attribute. + * @see #setConstructionDescription(String) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_ConstructionDescription() + * @model required="true" + * @generated + */ + String getConstructionDescription(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getConstructionDescription <em>Construction Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Construction Description</em>' attribute. + * @see #getConstructionDescription() + * @generated + */ + void setConstructionDescription(String value); + + /** + * Returns the value of the '<em><b>Disposal Energy</b></em>' attribute. + * The default value is <code>"kWh"</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Disposal Energy</em>' attribute. + * @see #setDisposalEnergy(NullableQuantity) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_DisposalEnergy() + * @model default="kWh" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true" + * @generated + */ + NullableQuantity getDisposalEnergy(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalEnergy <em>Disposal Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Disposal Energy</em>' attribute. + * @see #getDisposalEnergy() + * @generated + */ + void setDisposalEnergy(NullableQuantity value); + + /** + * Returns the value of the '<em><b>Disposal Carbon</b></em>' attribute. + * The default value is <code>"kg"</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Disposal Carbon</em>' attribute. + * @see #setDisposalCarbon(NullableQuantity) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_DisposalCarbon() + * @model default="kg" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true" + * @generated + */ + NullableQuantity getDisposalCarbon(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalCarbon <em>Disposal Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Disposal Carbon</em>' attribute. + * @see #getDisposalCarbon() + * @generated + */ + void setDisposalCarbon(NullableQuantity value); + + /** + * Returns the value of the '<em><b>Disposal Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Disposal Description</em>' attribute. + * @see #setDisposalDescription(String) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getLifeCycle_DisposalDescription() + * @model required="true" + * @generated + */ + String getDisposalDescription(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.LifeCycle#getDisposalDescription <em>Disposal Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Disposal Description</em>' attribute. + * @see #getDisposalDescription() + * @generated + */ + void setDisposalDescription(String value); + +} // LifeCycle diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java index a7eaa92bbe2a85c03459e1279b4f13b3f5117be3..4f48494a40dd14c33a698ad44e2015e9dd6c6a1c 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java @@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject; * <li>{@link de.hftstuttgart.buildingphysics.WindowType#getGValue <em>GValue</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.WindowType#getGlazingNumber <em>Glazing Number</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.WindowType#getFrameRatio <em>Frame Ratio</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.WindowType#getLifeCycle <em>Life Cycle</em>}</li> * </ul> * * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType() @@ -164,4 +165,26 @@ public interface WindowType extends EObject { */ void setFrameRatio(int value); + /** + * Returns the value of the '<em><b>Life Cycle</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Life Cycle</em>' containment reference. + * @see #setLifeCycle(LifeCycle) + * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_LifeCycle() + * @model containment="true" + * @generated + */ + LifeCycle getLifeCycle(); + + /** + * Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getLifeCycle <em>Life Cycle</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Life Cycle</em>' containment reference. + * @see #getLifeCycle() + * @generated + */ + void setLifeCycle(LifeCycle value); + } // WindowType diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsFactoryImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsFactoryImpl.java index 51f21ce400f57fc7749a02d79ef40d67241ca284..63ac1d17c496d5603603eabd19d6467f85318787 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsFactoryImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsFactoryImpl.java @@ -68,6 +68,8 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building return createMaterialCategory(); case BuildingPhysicsPackage.MATERIAL: return createMaterial(); + case BuildingPhysicsPackage.LIFE_CYCLE: + return createLifeCycle(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -139,6 +141,17 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building return material; } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public LifeCycle createLifeCycle() { + LifeCycleImpl lifeCycle = new LifeCycleImpl(); + return lifeCycle; + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java index 3a2226ea14f7b805adce9d2a25371535f94ebaab..205c3f8067cf9305438c1b0b1243b7ab64e9cb8e 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java @@ -6,6 +6,7 @@ import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog; import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.Catalog; +import de.hftstuttgart.buildingphysics.LifeCycle; import de.hftstuttgart.buildingphysics.Material; import de.hftstuttgart.buildingphysics.MaterialCatalog; import de.hftstuttgart.buildingphysics.MaterialCategory; @@ -77,6 +78,13 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building */ private EClass materialEClass = null; + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass lifeCycleEClass = null; + /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package @@ -254,6 +262,16 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(5); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EReference getWindowType_LifeCycle() { + return (EReference) windowTypeEClass.getEStructuralFeatures().get(6); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -424,6 +442,76 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building return (EAttribute) materialEClass.getEStructuralFeatures().get(4); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EClass getLifeCycle() { + return lifeCycleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_EmbodiedEnergy() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_EmbodiedCarbon() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_ConstructionDescription() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_DisposalEnergy() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_DisposalCarbon() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EAttribute getLifeCycle_DisposalDescription() { + return (EAttribute) lifeCycleEClass.getEStructuralFeatures().get(5); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -466,6 +554,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building createEAttribute(windowTypeEClass, WINDOW_TYPE__GVALUE); createEAttribute(windowTypeEClass, WINDOW_TYPE__GLAZING_NUMBER); createEAttribute(windowTypeEClass, WINDOW_TYPE__FRAME_RATIO); + createEReference(windowTypeEClass, WINDOW_TYPE__LIFE_CYCLE); catalogEClass = createEClass(CATALOG); createEAttribute(catalogEClass, CATALOG__NAME); @@ -488,6 +577,14 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building createEAttribute(materialEClass, MATERIAL__DENSITY); createEAttribute(materialEClass, MATERIAL__HEAT_CAPACITY); createEAttribute(materialEClass, MATERIAL__CONDUCTIVITY); + + lifeCycleEClass = createEClass(LIFE_CYCLE); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__EMBODIED_ENERGY); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__EMBODIED_CARBON); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__CONSTRUCTION_DESCRIPTION); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__DISPOSAL_ENERGY); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__DISPOSAL_CARBON); + createEAttribute(lifeCycleEClass, LIFE_CYCLE__DISPOSAL_DESCRIPTION); } /** @@ -555,6 +652,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building !IS_DERIVED, IS_ORDERED); initEAttribute(getWindowType_FrameRatio(), ecorePackage.getEInt(), "frameRatio", null, 1, 1, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getWindowType_LifeCycle(), this.getLifeCycle(), null, "lifeCycle", null, 0, 1, WindowType.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(catalogEClass, Catalog.class, "Catalog", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getCatalog_Name(), ecorePackage.getEString(), "name", null, 1, 1, Catalog.class, !IS_TRANSIENT, @@ -600,6 +700,27 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(lifeCycleEClass, LifeCycle.class, "LifeCycle", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLifeCycle_EmbodiedEnergy(), theQuantitiesPackage.getQuantityDouble(), "embodiedEnergy", "kWh", + 1, 1, LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getLifeCycle_EmbodiedCarbon(), theQuantitiesPackage.getQuantityDouble(), "embodiedCarbon", "kg", + 1, 1, LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getLifeCycle_ConstructionDescription(), ecorePackage.getEString(), "constructionDescription", + null, 1, 1, LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLifeCycle_DisposalEnergy(), theQuantitiesPackage.getQuantityDouble(), "disposalEnergy", "kWh", + 1, 1, LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getLifeCycle_DisposalCarbon(), theQuantitiesPackage.getQuantityDouble(), "disposalCarbon", "kg", + 1, 1, LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getLifeCycle_DisposalDescription(), ecorePackage.getEString(), "disposalDescription", null, 1, 1, + LifeCycle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + // Create resource createResource(eNS_URI); } diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/LifeCycleImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/LifeCycleImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..73ed45ee87209a2d324982b6049e8fa4d548eb2f --- /dev/null +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/LifeCycleImpl.java @@ -0,0 +1,469 @@ +/** + */ +package de.hftstuttgart.buildingphysics.impl; + +import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; +import de.hftstuttgart.buildingphysics.LifeCycle; + +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.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Life Cycle</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getEmbodiedEnergy <em>Embodied Energy</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getEmbodiedCarbon <em>Embodied Carbon</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getConstructionDescription <em>Construction Description</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getDisposalEnergy <em>Disposal Energy</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getDisposalCarbon <em>Disposal Carbon</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.LifeCycleImpl#getDisposalDescription <em>Disposal Description</em>}</li> + * </ul> + * + * @generated + */ +public class LifeCycleImpl extends MinimalEObjectImpl.Container implements LifeCycle { + /** + * The default value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmbodiedEnergy() + * @generated + * @ordered + */ + protected static final NullableQuantity EMBODIED_ENERGY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE + .createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kWh"); + + /** + * The cached value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmbodiedEnergy() + * @generated + * @ordered + */ + protected NullableQuantity embodiedEnergy = EMBODIED_ENERGY_EDEFAULT; + + /** + * The default value of the '{@link #getEmbodiedCarbon() <em>Embodied Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmbodiedCarbon() + * @generated + * @ordered + */ + protected static final NullableQuantity EMBODIED_CARBON_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE + .createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg"); + + /** + * The cached value of the '{@link #getEmbodiedCarbon() <em>Embodied Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmbodiedCarbon() + * @generated + * @ordered + */ + protected NullableQuantity embodiedCarbon = EMBODIED_CARBON_EDEFAULT; + + /** + * The default value of the '{@link #getConstructionDescription() <em>Construction Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConstructionDescription() + * @generated + * @ordered + */ + protected static final String CONSTRUCTION_DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConstructionDescription() <em>Construction Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConstructionDescription() + * @generated + * @ordered + */ + protected String constructionDescription = CONSTRUCTION_DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getDisposalEnergy() <em>Disposal Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalEnergy() + * @generated + * @ordered + */ + protected static final NullableQuantity DISPOSAL_ENERGY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE + .createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kWh"); + + /** + * The cached value of the '{@link #getDisposalEnergy() <em>Disposal Energy</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalEnergy() + * @generated + * @ordered + */ + protected NullableQuantity disposalEnergy = DISPOSAL_ENERGY_EDEFAULT; + + /** + * The default value of the '{@link #getDisposalCarbon() <em>Disposal Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalCarbon() + * @generated + * @ordered + */ + protected static final NullableQuantity DISPOSAL_CARBON_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE + .createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg"); + + /** + * The cached value of the '{@link #getDisposalCarbon() <em>Disposal Carbon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalCarbon() + * @generated + * @ordered + */ + protected NullableQuantity disposalCarbon = DISPOSAL_CARBON_EDEFAULT; + + /** + * The default value of the '{@link #getDisposalDescription() <em>Disposal Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalDescription() + * @generated + * @ordered + */ + protected static final String DISPOSAL_DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisposalDescription() <em>Disposal Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDisposalDescription() + * @generated + * @ordered + */ + protected String disposalDescription = DISPOSAL_DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LifeCycleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return BuildingPhysicsPackage.Literals.LIFE_CYCLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NullableQuantity getEmbodiedEnergy() { + return embodiedEnergy; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setEmbodiedEnergy(NullableQuantity newEmbodiedEnergy) { + NullableQuantity oldEmbodiedEnergy = embodiedEnergy; + embodiedEnergy = newEmbodiedEnergy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY, + oldEmbodiedEnergy, embodiedEnergy)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NullableQuantity getEmbodiedCarbon() { + return embodiedCarbon; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setEmbodiedCarbon(NullableQuantity newEmbodiedCarbon) { + NullableQuantity oldEmbodiedCarbon = embodiedCarbon; + embodiedCarbon = newEmbodiedCarbon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON, + oldEmbodiedCarbon, embodiedCarbon)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getConstructionDescription() { + return constructionDescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setConstructionDescription(String newConstructionDescription) { + String oldConstructionDescription = constructionDescription; + constructionDescription = newConstructionDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION, oldConstructionDescription, + constructionDescription)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NullableQuantity getDisposalEnergy() { + return disposalEnergy; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setDisposalEnergy(NullableQuantity newDisposalEnergy) { + NullableQuantity oldDisposalEnergy = disposalEnergy; + disposalEnergy = newDisposalEnergy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY, + oldDisposalEnergy, disposalEnergy)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NullableQuantity getDisposalCarbon() { + return disposalCarbon; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setDisposalCarbon(NullableQuantity newDisposalCarbon) { + NullableQuantity oldDisposalCarbon = disposalCarbon; + disposalCarbon = newDisposalCarbon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON, + oldDisposalCarbon, disposalCarbon)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getDisposalDescription() { + return disposalDescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setDisposalDescription(String newDisposalDescription) { + String oldDisposalDescription = disposalDescription; + disposalDescription = newDisposalDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION, oldDisposalDescription, + disposalDescription)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY: + return getEmbodiedEnergy(); + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON: + return getEmbodiedCarbon(); + case BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION: + return getConstructionDescription(); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY: + return getDisposalEnergy(); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON: + return getDisposalCarbon(); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION: + return getDisposalDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY: + setEmbodiedEnergy((NullableQuantity) newValue); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON: + setEmbodiedCarbon((NullableQuantity) newValue); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION: + setConstructionDescription((String) newValue); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY: + setDisposalEnergy((NullableQuantity) newValue); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON: + setDisposalCarbon((NullableQuantity) newValue); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION: + setDisposalDescription((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY: + setEmbodiedEnergy(EMBODIED_ENERGY_EDEFAULT); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON: + setEmbodiedCarbon(EMBODIED_CARBON_EDEFAULT); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION: + setConstructionDescription(CONSTRUCTION_DESCRIPTION_EDEFAULT); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY: + setDisposalEnergy(DISPOSAL_ENERGY_EDEFAULT); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON: + setDisposalCarbon(DISPOSAL_CARBON_EDEFAULT); + return; + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION: + setDisposalDescription(DISPOSAL_DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_ENERGY: + return EMBODIED_ENERGY_EDEFAULT == null ? embodiedEnergy != null + : !EMBODIED_ENERGY_EDEFAULT.equals(embodiedEnergy); + case BuildingPhysicsPackage.LIFE_CYCLE__EMBODIED_CARBON: + return EMBODIED_CARBON_EDEFAULT == null ? embodiedCarbon != null + : !EMBODIED_CARBON_EDEFAULT.equals(embodiedCarbon); + case BuildingPhysicsPackage.LIFE_CYCLE__CONSTRUCTION_DESCRIPTION: + return CONSTRUCTION_DESCRIPTION_EDEFAULT == null ? constructionDescription != null + : !CONSTRUCTION_DESCRIPTION_EDEFAULT.equals(constructionDescription); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_ENERGY: + return DISPOSAL_ENERGY_EDEFAULT == null ? disposalEnergy != null + : !DISPOSAL_ENERGY_EDEFAULT.equals(disposalEnergy); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_CARBON: + return DISPOSAL_CARBON_EDEFAULT == null ? disposalCarbon != null + : !DISPOSAL_CARBON_EDEFAULT.equals(disposalCarbon); + case BuildingPhysicsPackage.LIFE_CYCLE__DISPOSAL_DESCRIPTION: + return DISPOSAL_DESCRIPTION_EDEFAULT == null ? disposalDescription != null + : !DISPOSAL_DESCRIPTION_EDEFAULT.equals(disposalDescription); + } + 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(" (embodiedEnergy: "); + result.append(embodiedEnergy); + result.append(", embodiedCarbon: "); + result.append(embodiedCarbon); + result.append(", constructionDescription: "); + result.append(constructionDescription); + result.append(", disposalEnergy: "); + result.append(disposalEnergy); + result.append(", disposalCarbon: "); + result.append(disposalCarbon); + result.append(", disposalDescription: "); + result.append(disposalDescription); + result.append(')'); + return result.toString(); + } + +} //LifeCycleImpl diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java index 09ce3cf05727ac77ba9a80dd1293253b156914bf..6414adcbe421cda1bb8a4653e8cf6fe241d06b4d 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java @@ -3,14 +3,17 @@ package de.hftstuttgart.buildingphysics.impl; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; +import de.hftstuttgart.buildingphysics.LifeCycle; import de.hftstuttgart.buildingphysics.WindowType; 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.NotificationChain; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; @@ -28,6 +31,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; * <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getGValue <em>GValue</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getGlazingNumber <em>Glazing Number</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getFrameRatio <em>Frame Ratio</em>}</li> + * <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getLifeCycle <em>Life Cycle</em>}</li> * </ul> * * @generated @@ -154,6 +158,16 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind */ protected int frameRatio = FRAME_RATIO_EDEFAULT; + /** + * The cached value of the '{@link #getLifeCycle() <em>Life Cycle</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLifeCycle() + * @generated + * @ordered + */ + protected LifeCycle lifeCycle; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -316,6 +330,72 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind oldFrameRatio, frameRatio)); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public LifeCycle getLifeCycle() { + return lifeCycle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetLifeCycle(LifeCycle newLifeCycle, NotificationChain msgs) { + LifeCycle oldLifeCycle = lifeCycle; + lifeCycle = newLifeCycle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, oldLifeCycle, newLifeCycle); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setLifeCycle(LifeCycle newLifeCycle) { + if (newLifeCycle != lifeCycle) { + NotificationChain msgs = null; + if (lifeCycle != null) + msgs = ((InternalEObject) lifeCycle).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, null, msgs); + if (newLifeCycle != null) + msgs = ((InternalEObject) newLifeCycle).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, null, msgs); + msgs = basicSetLifeCycle(newLifeCycle, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, + newLifeCycle, newLifeCycle)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + return basicSetLifeCycle(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -336,6 +416,8 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind return getGlazingNumber(); case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: return getFrameRatio(); + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + return getLifeCycle(); } return super.eGet(featureID, resolve, coreType); } @@ -366,6 +448,9 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: setFrameRatio((Integer) newValue); return; + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + setLifeCycle((LifeCycle) newValue); + return; } super.eSet(featureID, newValue); } @@ -396,6 +481,9 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: setFrameRatio(FRAME_RATIO_EDEFAULT); return; + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + setLifeCycle((LifeCycle) null); + return; } super.eUnset(featureID); } @@ -420,6 +508,8 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind return glazingNumber != GLAZING_NUMBER_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: return frameRatio != FRAME_RATIO_EDEFAULT; + case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: + return lifeCycle != null; } return super.eIsSet(featureID); } diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsAdapterFactory.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsAdapterFactory.java index 7689aac51bcf74e6e07373d6545f0887066dd100..24aa686a2caa338ced869406709e09ee584ca698 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsAdapterFactory.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsAdapterFactory.java @@ -101,6 +101,11 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl { return createMaterialAdapter(); } + @Override + public Adapter caseLifeCycle(LifeCycle object) { + return createLifeCycleAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -218,6 +223,20 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl { return null; } + /** + * Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.LifeCycle <em>Life Cycle</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see de.hftstuttgart.buildingphysics.LifeCycle + * @generated + */ + public Adapter createLifeCycleAdapter() { + return null; + } + /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsSwitch.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsSwitch.java index bf8b322f6ddc8e3b7a0e89617e94784698d841fe..c123bb98247bcf4cb7edfbc6d2ddfac6c195e6b8 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsSwitch.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/util/BuildingPhysicsSwitch.java @@ -119,6 +119,13 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> { result = defaultCase(theEObject); return result; } + case BuildingPhysicsPackage.LIFE_CYCLE: { + LifeCycle lifeCycle = (LifeCycle) theEObject; + T result = caseLifeCycle(lifeCycle); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -229,6 +236,21 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> { return null; } + /** + * Returns the result of interpreting the object as an instance of '<em>Life Cycle</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Life Cycle</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLifeCycle(LifeCycle object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc -->