......@@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
......
......@@ -4,21 +4,22 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.buildingphysics.MaterialCategory;
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.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
/**
......
......@@ -3,7 +3,7 @@
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.WindowCategory;
import de.hftstuttgart.buildingphysics.WindowType;
import java.util.Collection;
......@@ -15,23 +15,25 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Window Catalog</b></em>'.
* An implementation of the model object '<em><b>Window Category</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowCatalogImpl#getWindowTypes <em>Window Types</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowCategoryImpl#getWindowTypes <em>Window Types</em>}</li>
* </ul>
*
* @generated
*/
public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
public class WindowCategoryImpl extends MinimalEObjectImpl.Container implements WindowCategory {
/**
* The cached value of the '{@link #getWindowTypes() <em>Window Types</em>}' containment reference list.
* <!-- begin-user-doc -->
......@@ -47,7 +49,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
* <!-- end-user-doc -->
* @generated
*/
protected WindowCatalogImpl() {
protected WindowCategoryImpl() {
super();
}
......@@ -58,7 +60,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.WINDOW_CATALOG;
return BuildingPhysicsPackage.Literals.WINDOW_CATEGORY;
}
/**
......@@ -70,7 +72,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
public EList<WindowType> getWindowTypes() {
if (windowTypes == null) {
windowTypes = new EObjectContainmentEList<WindowType>(WindowType.class, this,
BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES);
BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES);
}
return windowTypes;
}
......@@ -83,7 +85,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return ((InternalEList<?>) getWindowTypes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
......@@ -97,7 +99,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return getWindowTypes();
}
return super.eGet(featureID, resolve, coreType);
......@@ -112,7 +114,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
getWindowTypes().clear();
getWindowTypes().addAll((Collection<? extends WindowType>) newValue);
return;
......@@ -128,7 +130,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
getWindowTypes().clear();
return;
}
......@@ -143,10 +145,10 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return windowTypes != null && !windowTypes.isEmpty();
}
return super.eIsSet(featureID);
}
} //WindowCatalogImpl
} //WindowCategoryImpl
......@@ -77,18 +77,8 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
}
@Override
public Adapter caseCatalog(Catalog object) {
return createCatalogAdapter();
}
@Override
public Adapter caseWindowCatalog(WindowCatalog object) {
return createWindowCatalogAdapter();
}
@Override
public Adapter caseMaterialCatalog(MaterialCatalog object) {
return createMaterialCatalogAdapter();
public Adapter caseWindowCategory(WindowCategory object) {
return createWindowCategoryAdapter();
}
@Override
......@@ -107,8 +97,8 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
}
@Override
public Adapter caseMounting(Mounting object) {
return createMountingAdapter();
public Adapter caseConstruction(Construction object) {
return createConstructionAdapter();
}
@Override
......@@ -164,44 +154,16 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.Catalog <em>Catalog</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.Catalog
* @generated
*/
public Adapter createCatalogAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.WindowCatalog <em>Window Catalog</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.WindowCatalog
* @generated
*/
public Adapter createWindowCatalogAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.MaterialCatalog <em>Material Catalog</em>}'.
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.WindowCategory <em>Window Category</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.MaterialCatalog
* @see de.hftstuttgart.buildingphysics.WindowCategory
* @generated
*/
public Adapter createMaterialCatalogAdapter() {
public Adapter createWindowCategoryAdapter() {
return null;
}
......@@ -248,16 +210,16 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.Mounting <em>Mounting</em>}'.
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.Construction <em>Construction</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.Mounting
* @see de.hftstuttgart.buildingphysics.Construction
* @generated
*/
public Adapter createMountingAdapter() {
public Adapter createConstructionAdapter() {
return null;
}
......
......@@ -80,27 +80,9 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> {
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.CATALOG: {
Catalog catalog = (Catalog) theEObject;
T result = caseCatalog(catalog);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.WINDOW_CATALOG: {
WindowCatalog windowCatalog = (WindowCatalog) theEObject;
T result = caseWindowCatalog(windowCatalog);
if (result == null)
result = caseCatalog(windowCatalog);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.MATERIAL_CATALOG: {
MaterialCatalog materialCatalog = (MaterialCatalog) theEObject;
T result = caseMaterialCatalog(materialCatalog);
if (result == null)
result = caseCatalog(materialCatalog);
case BuildingPhysicsPackage.WINDOW_CATEGORY: {
WindowCategory windowCategory = (WindowCategory) theEObject;
T result = caseWindowCategory(windowCategory);
if (result == null)
result = defaultCase(theEObject);
return result;
......@@ -126,9 +108,9 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> {
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.MOUNTING: {
Mounting mounting = (Mounting) theEObject;
T result = caseMounting(mounting);
case BuildingPhysicsPackage.CONSTRUCTION: {
Construction construction = (Construction) theEObject;
T result = caseConstruction(construction);
if (result == null)
result = defaultCase(theEObject);
return result;
......@@ -176,47 +158,17 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> {
}
/**
* Returns the result of interpreting the object as an instance of '<em>Catalog</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>Catalog</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCatalog(Catalog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Window Catalog</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>Window Catalog</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseWindowCatalog(WindowCatalog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Material Catalog</em>'.
* Returns the result of interpreting the object as an instance of '<em>Window Category</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>Material Catalog</em>'.
* @return the result of interpreting the object as an instance of '<em>Window Category</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMaterialCatalog(MaterialCatalog object) {
public T caseWindowCategory(WindowCategory object) {
return null;
}
......@@ -266,17 +218,17 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> {
}
/**
* Returns the result of interpreting the object as an instance of '<em>Mounting</em>'.
* Returns the result of interpreting the object as an instance of '<em>Construction</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>Mounting</em>'.
* @return the result of interpreting the object as an instance of '<em>Construction</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMounting(Mounting object) {
public T caseConstruction(Construction object) {
return null;
}
......