Commit 85ba9f99 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Simplify catalog hierarchy

parent 7d014334
/**
*/
package de.hftstuttgart.buildingphysics;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Catalog</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.Catalog#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.Catalog#getDescription <em>Description</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.Catalog#getSource <em>Source</em>}</li>
* </ul>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getCatalog()
* @model abstract="true"
* @generated
*/
public interface Catalog extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getCatalog_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.Catalog#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getCatalog_Description()
* @model
* @generated
*/
String getDescription();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.Catalog#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
* @generated
*/
void setDescription(String value);
/**
* Returns the value of the '<em><b>Source</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Source</em>' attribute.
* @see #setSource(String)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getCatalog_Source()
* @model
* @generated
*/
String getSource();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.Catalog#getSource <em>Source</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Source</em>' attribute.
* @see #getSource()
* @generated
*/
void setSource(String value);
} // Catalog
/**
*/
package de.hftstuttgart.buildingphysics;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Material Catalog</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.MaterialCatalog#getMaterialCategories <em>Material Categories</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.MaterialCatalog#getConstructionCategories <em>Construction Categories</em>}</li>
* </ul>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCatalog()
* @model
* @generated
*/
public interface MaterialCatalog extends Catalog {
/**
* Returns the value of the '<em><b>Material Categories</b></em>' containment reference list.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.MaterialCategory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Material Categories</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCatalog_MaterialCategories()
* @model containment="true"
* @generated
*/
EList<MaterialCategory> getMaterialCategories();
/**
* Returns the value of the '<em><b>Construction Categories</b></em>' containment reference list.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.ConstructionCategory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Construction Categories</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCatalog_ConstructionCategories()
* @model containment="true"
* @generated
*/
EList<ConstructionCategory> getConstructionCategories();
} // MaterialCatalog
...@@ -4,33 +4,35 @@ package de.hftstuttgart.buildingphysics; ...@@ -4,33 +4,35 @@ package de.hftstuttgart.buildingphysics;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* A representation of the model object '<em><b>Window Catalog</b></em>'. * A representation of the model object '<em><b>Window Category</b></em>'.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* *
* <p> * <p>
* The following features are supported: * The following features are supported:
* </p> * </p>
* <ul> * <ul>
* <li>{@link de.hftstuttgart.buildingphysics.WindowCatalog#getWindowTypes <em>Window Types</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.WindowCategory#getWindowTypes <em>Window Types</em>}</li>
* </ul> * </ul>
* *
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCatalog() * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCategory()
* @model * @model
* @generated * @generated
*/ */
public interface WindowCatalog extends Catalog { public interface WindowCategory extends EObject {
/** /**
* Returns the value of the '<em><b>Window Types</b></em>' containment reference list. * Returns the value of the '<em><b>Window Types</b></em>' containment reference list.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.WindowType}. * The list contents are of type {@link de.hftstuttgart.buildingphysics.WindowType}.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Window Types</em>' containment reference list. * @return the value of the '<em>Window Types</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCatalog_WindowTypes() * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCategory_WindowTypes()
* @model containment="true" * @model containment="true"
* @generated * @generated
*/ */
EList<WindowType> getWindowTypes(); EList<WindowType> getWindowTypes();
} // WindowCatalog } // WindowCategory
...@@ -4,17 +4,22 @@ package de.hftstuttgart.buildingphysics.impl; ...@@ -4,17 +4,22 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog; import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCatalog; import de.hftstuttgart.buildingphysics.ConstructionCategory;
import de.hftstuttgart.buildingphysics.WindowCatalog; import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.buildingphysics.WindowCategory;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -24,81 +29,114 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; ...@@ -24,81 +29,114 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
* The following features are implemented: * The following features are implemented:
* </p> * </p>
* <ul> * <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getAuthor <em>Author</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getWindows <em>Windows</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getWindowCatalog <em>Window Catalog</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getMaterialCatalog <em>Material Catalog</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getDescription <em>Description</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getSource <em>Source</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getMaterialCategories <em>Material Categories</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getConstructionCategories <em>Construction Categories</em>}</li>
* </ul> * </ul>
* *
* @generated * @generated
*/ */
public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container implements BuildingPhysicsCatalog { public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container implements BuildingPhysicsCatalog {
/** /**
* The default value of the '{@link #getAuthor() <em>Author</em>}' attribute. * The cached value of the '{@link #getWindows() <em>Windows</em>}' containment reference.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getAuthor() * @see #getWindows()
* @generated * @generated
* @ordered * @ordered
*/ */
protected static final String AUTHOR_EDEFAULT = null; protected WindowCategory windows;
/** /**
* The cached value of the '{@link #getAuthor() <em>Author</em>}' attribute. * The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getAuthor() * @see #getName()
* @generated * @generated
* @ordered * @ordered
*/ */
protected String author = AUTHOR_EDEFAULT; protected static final String NAME_EDEFAULT = null;
/** /**
* The cached value of the '{@link #getWindowCatalog() <em>Window Catalog</em>}' containment reference. * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getWindowCatalog() * @see #getName()
* @generated * @generated
* @ordered * @ordered
*/ */
protected WindowCatalog windowCatalog; protected String name = NAME_EDEFAULT;
/** /**
* The cached value of the '{@link #getMaterialCatalog() <em>Material Catalog</em>}' containment reference. * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getMaterialCatalog() * @see #getDescription()
* @generated * @generated
* @ordered * @ordered
*/ */
protected MaterialCatalog materialCatalog; protected static final String DESCRIPTION_EDEFAULT = null;
/** /**
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getDescription()
* @generated * @generated
* @ordered
*/ */
protected BuildingPhysicsCatalogImpl() { protected String description = DESCRIPTION_EDEFAULT;
super();
}
/** /**
* The default value of the '{@link #getSource() <em>Source</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getSource()
* @generated * @generated
* @ordered
*/ */
@Override protected static final String SOURCE_EDEFAULT = null;
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG;
}
/** /**
* The cached value of the '{@link #getSource() <em>Source</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #getSource()
* @generated * @generated
* @ordered
*/ */
@Override protected String source = SOURCE_EDEFAULT;
public String getAuthor() {
return author; /**
* The cached value of the '{@link #getMaterialCategories() <em>Material Categories</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMaterialCategories()
* @generated
* @ordered
*/
protected EList<MaterialCategory> materialCategories;
/**
* The cached value of the '{@link #getConstructionCategories() <em>Construction Categories</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConstructionCategories()
* @generated
* @ordered
*/
protected EList<ConstructionCategory> constructionCategories;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BuildingPhysicsCatalogImpl() {
super();
} }
/** /**
...@@ -107,12 +145,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -107,12 +145,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated * @generated
*/ */
@Override @Override
public void setAuthor(String newAuthor) { protected EClass eStaticClass() {
String oldAuthor = author; return BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG;
author = newAuthor;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR, oldAuthor, author));
} }
/** /**
...@@ -121,8 +155,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -121,8 +155,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated * @generated
*/ */
@Override @Override
public WindowCatalog getWindowCatalog() { public WindowCategory getWindows() {
return windowCatalog; return windows;
} }
/** /**
...@@ -130,13 +164,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -130,13 +164,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
public NotificationChain basicSetWindowCatalog(WindowCatalog newWindowCatalog, NotificationChain msgs) { public NotificationChain basicSetWindows(WindowCategory newWindows, NotificationChain msgs) {
WindowCatalog oldWindowCatalog = windowCatalog; WindowCategory oldWindows = windows;
windowCatalog = newWindowCatalog; windows = newWindows;
if (eNotificationRequired()) { if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, oldWindowCatalog, BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, oldWindows, newWindows);
newWindowCatalog);
if (msgs == null) if (msgs == null)
msgs = notification; msgs = notification;
else else
...@@ -151,24 +184,21 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -151,24 +184,21 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated * @generated
*/ */
@Override @Override
public void setWindowCatalog(WindowCatalog newWindowCatalog) { public void setWindows(WindowCategory newWindows) {
if (newWindowCatalog != windowCatalog) { if (newWindows != windows) {
NotificationChain msgs = null; NotificationChain msgs = null;
if (windowCatalog != null) if (windows != null)
msgs = ((InternalEObject) windowCatalog).eInverseRemove(this, msgs = ((InternalEObject) windows).eInverseRemove(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, null, EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, null, msgs);
msgs); if (newWindows != null)
if (newWindowCatalog != null) msgs = ((InternalEObject) newWindows).eInverseAdd(this,
msgs = ((InternalEObject) newWindowCatalog).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, null, msgs);
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, null, msgs = basicSetWindows(newWindows, msgs);
msgs);
msgs = basicSetWindowCatalog(newWindowCatalog, msgs);
if (msgs != null) if (msgs != null)
msgs.dispatch(); msgs.dispatch();
} else if (eNotificationRequired()) } else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, newWindowCatalog, BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, newWindows, newWindows));
newWindowCatalog));
} }
/** /**
...@@ -177,8 +207,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -177,8 +207,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated * @generated
*/ */
@Override @Override
public MaterialCatalog getMaterialCatalog() { public String getName() {
return materialCatalog; return name;
} }
/** /**
...@@ -186,19 +216,13 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -186,19 +216,13 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
public NotificationChain basicSetMaterialCatalog(MaterialCatalog newMaterialCatalog, NotificationChain msgs) { @Override
MaterialCatalog oldMaterialCatalog = materialCatalog; public void setName(String newName) {
materialCatalog = newMaterialCatalog; String oldName = name;
if (eNotificationRequired()) { name = newName;
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, if (eNotificationRequired())
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, oldMaterialCatalog, eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME,
newMaterialCatalog); oldName, name));
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
} }
/** /**
...@@ -207,24 +231,74 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -207,24 +231,74 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated * @generated
*/ */
@Override @Override
public void setMaterialCatalog(MaterialCatalog newMaterialCatalog) { public String getDescription() {
if (newMaterialCatalog != materialCatalog) { return description;
NotificationChain msgs = null; }
if (materialCatalog != null)
msgs = ((InternalEObject) materialCatalog).eInverseRemove(this, /**
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, * <!-- begin-user-doc -->
null, msgs); * <!-- end-user-doc -->
if (newMaterialCatalog != null) * @generated
msgs = ((InternalEObject) newMaterialCatalog).eInverseAdd(this, */
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, @Override
null, msgs); public void setDescription(String newDescription) {
msgs = basicSetMaterialCatalog(newMaterialCatalog, msgs); String oldDescription = description;
if (msgs != null) description = newDescription;
msgs.dispatch(); if (eNotificationRequired())
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, newMaterialCatalog, BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION, oldDescription, description));
newMaterialCatalog)); }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getSource() {
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setSource(String newSource) {
String oldSource = source;
source = newSource;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE, oldSource, source));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<ConstructionCategory> getConstructionCategories() {
if (constructionCategories == null) {
constructionCategories = new EObjectContainmentEList<ConstructionCategory>(ConstructionCategory.class, this,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES);
}
return constructionCategories;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<MaterialCategory> getMaterialCategories() {
if (materialCategories == null) {
materialCategories = new EObjectContainmentEList<MaterialCategory>(MaterialCategory.class, this,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES);
}
return materialCategories;
} }
/** /**
...@@ -235,10 +309,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -235,10 +309,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override @Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return basicSetWindowCatalog(null, msgs); return basicSetWindows(null, msgs);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
return basicSetMaterialCatalog(null, msgs); return ((InternalEList<?>) getMaterialCategories()).basicRemove(otherEnd, msgs);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
return ((InternalEList<?>) getConstructionCategories()).basicRemove(otherEnd, msgs);
} }
return super.eInverseRemove(otherEnd, featureID, msgs); return super.eInverseRemove(otherEnd, featureID, msgs);
} }
...@@ -251,12 +327,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -251,12 +327,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) { public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return getAuthor(); return getWindows();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
return getWindowCatalog(); return getName();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
return getMaterialCatalog(); return getDescription();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE:
return getSource();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
return getMaterialCategories();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
return getConstructionCategories();
} }
return super.eGet(featureID, resolve, coreType); return super.eGet(featureID, resolve, coreType);
} }
...@@ -266,17 +348,29 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -266,17 +348,29 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
@SuppressWarnings("unchecked")
@Override @Override
public void eSet(int featureID, Object newValue) { public void eSet(int featureID, Object newValue) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
setAuthor((String) newValue); setWindows((WindowCategory) newValue);
return; return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
setWindowCatalog((WindowCatalog) newValue); setName((String) newValue);
return; return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
setMaterialCatalog((MaterialCatalog) newValue); setDescription((String) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE:
setSource((String) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
getMaterialCategories().clear();
getMaterialCategories().addAll((Collection<? extends MaterialCategory>) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
getConstructionCategories().clear();
getConstructionCategories().addAll((Collection<? extends ConstructionCategory>) newValue);
return; return;
} }
super.eSet(featureID, newValue); super.eSet(featureID, newValue);
...@@ -290,14 +384,23 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -290,14 +384,23 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override @Override
public void eUnset(int featureID) { public void eUnset(int featureID) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
setAuthor(AUTHOR_EDEFAULT); setWindows((WindowCategory) null);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
setName(NAME_EDEFAULT);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE:
setSource(SOURCE_EDEFAULT);
return; return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
setWindowCatalog((WindowCatalog) null); getMaterialCategories().clear();
return; return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
setMaterialCatalog((MaterialCatalog) null); getConstructionCategories().clear();
return; return;
} }
super.eUnset(featureID); super.eUnset(featureID);
...@@ -311,12 +414,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -311,12 +414,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override @Override
public boolean eIsSet(int featureID) { public boolean eIsSet(int featureID) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return AUTHOR_EDEFAULT == null ? author != null : !AUTHOR_EDEFAULT.equals(author); return windows != null;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
return windowCatalog != null; return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
return materialCatalog != null; return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE:
return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
return materialCategories != null && !materialCategories.isEmpty();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
return constructionCategories != null && !constructionCategories.isEmpty();
} }
return super.eIsSet(featureID); return super.eIsSet(featureID);
} }
...@@ -332,8 +441,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp ...@@ -332,8 +441,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
return super.toString(); return super.toString();
StringBuilder result = new StringBuilder(super.toString()); StringBuilder result = new StringBuilder(super.toString());
result.append(" (author: "); result.append(" (name: ");
result.append(author); result.append(name);
result.append(", description: ");
result.append(description);
result.append(", source: ");
result.append(source);
result.append(')'); result.append(')');
return result.toString(); return result.toString();
} }
......
...@@ -60,10 +60,8 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building ...@@ -60,10 +60,8 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building
return createBuildingPhysicsCatalog(); return createBuildingPhysicsCatalog();
case BuildingPhysicsPackage.WINDOW_TYPE: case BuildingPhysicsPackage.WINDOW_TYPE:
return createWindowType(); return createWindowType();
case BuildingPhysicsPackage.WINDOW_CATALOG: case BuildingPhysicsPackage.WINDOW_CATEGORY:
return createWindowCatalog(); return createWindowCategory();
case BuildingPhysicsPackage.MATERIAL_CATALOG:
return createMaterialCatalog();
case BuildingPhysicsPackage.MATERIAL_CATEGORY: case BuildingPhysicsPackage.MATERIAL_CATEGORY:
return createMaterialCategory(); return createMaterialCategory();
case BuildingPhysicsPackage.MATERIAL: case BuildingPhysicsPackage.MATERIAL:
...@@ -107,20 +105,9 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building ...@@ -107,20 +105,9 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public WindowCatalog createWindowCatalog() { public WindowCategory createWindowCategory() {
WindowCatalogImpl windowCatalog = new WindowCatalogImpl(); WindowCategoryImpl windowCategory = new WindowCategoryImpl();
return windowCatalog; return windowCategory;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public MaterialCatalog createMaterialCatalog() {
MaterialCatalogImpl materialCatalog = new MaterialCatalogImpl();
return materialCatalog;
} }
/** /**
......
...@@ -5,14 +5,12 @@ package de.hftstuttgart.buildingphysics.impl; ...@@ -5,14 +5,12 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog; import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory; import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Catalog;
import de.hftstuttgart.buildingphysics.Construction; import de.hftstuttgart.buildingphysics.Construction;
import de.hftstuttgart.buildingphysics.ConstructionCategory; import de.hftstuttgart.buildingphysics.ConstructionCategory;
import de.hftstuttgart.buildingphysics.Layer; import de.hftstuttgart.buildingphysics.Layer;
import de.hftstuttgart.buildingphysics.Material; import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import de.hftstuttgart.buildingphysics.MaterialCategory; import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.buildingphysics.WindowCatalog; import de.hftstuttgart.buildingphysics.WindowCategory;
import de.hftstuttgart.buildingphysics.WindowType; import de.hftstuttgart.buildingphysics.WindowType;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage; import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
...@@ -50,21 +48,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -50,21 +48,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
private EClass catalogEClass = null; private EClass windowCategoryEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass windowCatalogEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass materialCatalogEClass = null;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -184,8 +168,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -184,8 +168,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public EAttribute getBuildingPhysicsCatalog_Author() { public EReference getBuildingPhysicsCatalog_Windows() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(0); return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getBuildingPhysicsCatalog_Name() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getBuildingPhysicsCatalog_Description() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(2);
} }
/** /**
...@@ -194,8 +198,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -194,8 +198,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public EReference getBuildingPhysicsCatalog_WindowCatalog() { public EAttribute getBuildingPhysicsCatalog_Source() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(1); return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(3);
} }
/** /**
...@@ -204,8 +208,18 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -204,8 +208,18 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public EReference getBuildingPhysicsCatalog_MaterialCatalog() { public EReference getBuildingPhysicsCatalog_ConstructionCategories() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(2); return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getBuildingPhysicsCatalog_MaterialCategories() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(4);
} }
/** /**
...@@ -344,28 +358,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -344,28 +358,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public EClass getCatalog() { public EClass getWindowCategory() {
return catalogEClass; return windowCategoryEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getCatalog_Name() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getCatalog_Description() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(1);
} }
/** /**
...@@ -374,58 +368,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -374,58 +368,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated * @generated
*/ */
@Override @Override
public EAttribute getCatalog_Source() { public EReference getWindowCategory_WindowTypes() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(2); return (EReference) windowCategoryEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getWindowCatalog() {
return windowCatalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getWindowCatalog_WindowTypes() {
return (EReference) windowCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getMaterialCatalog() {
return materialCatalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getMaterialCatalog_MaterialCategories() {
return (EReference) materialCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getMaterialCatalog_ConstructionCategories() {
return (EReference) materialCatalogEClass.getEStructuralFeatures().get(1);
} }
/** /**
...@@ -719,9 +663,12 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -719,9 +663,12 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
// Create classes and their features // Create classes and their features
buildingPhysicsCatalogEClass = createEClass(BUILDING_PHYSICS_CATALOG); buildingPhysicsCatalogEClass = createEClass(BUILDING_PHYSICS_CATALOG);
createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__AUTHOR); createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__WINDOWS);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG); createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__NAME);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG); createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__DESCRIPTION);
createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__SOURCE);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES);
windowTypeEClass = createEClass(WINDOW_TYPE); windowTypeEClass = createEClass(WINDOW_TYPE);
createEAttribute(windowTypeEClass, WINDOW_TYPE__WINDOW_TYPE_ID); createEAttribute(windowTypeEClass, WINDOW_TYPE__WINDOW_TYPE_ID);
...@@ -737,17 +684,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -737,17 +684,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_CARBON); createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_CARBON);
createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_DESCRIPTION); createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_DESCRIPTION);
catalogEClass = createEClass(CATALOG); windowCategoryEClass = createEClass(WINDOW_CATEGORY);
createEAttribute(catalogEClass, CATALOG__NAME); createEReference(windowCategoryEClass, WINDOW_CATEGORY__WINDOW_TYPES);
createEAttribute(catalogEClass, CATALOG__DESCRIPTION);
createEAttribute(catalogEClass, CATALOG__SOURCE);
windowCatalogEClass = createEClass(WINDOW_CATALOG);
createEReference(windowCatalogEClass, WINDOW_CATALOG__WINDOW_TYPES);
materialCatalogEClass = createEClass(MATERIAL_CATALOG);
createEReference(materialCatalogEClass, MATERIAL_CATALOG__MATERIAL_CATEGORIES);
createEReference(materialCatalogEClass, MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES);
materialCategoryEClass = createEClass(MATERIAL_CATEGORY); materialCategoryEClass = createEClass(MATERIAL_CATEGORY);
createEReference(materialCategoryEClass, MATERIAL_CATEGORY__MATERIALS); createEReference(materialCategoryEClass, MATERIAL_CATEGORY__MATERIALS);
...@@ -814,21 +752,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -814,21 +752,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
// Set bounds for type parameters // Set bounds for type parameters
// Add supertypes to classes // Add supertypes to classes
windowCatalogEClass.getESuperTypes().add(this.getCatalog());
materialCatalogEClass.getESuperTypes().add(this.getCatalog());
// Initialize classes, features, and operations; add parameters // Initialize classes, features, and operations; add parameters
initEClass(buildingPhysicsCatalogEClass, BuildingPhysicsCatalog.class, "BuildingPhysicsCatalog", !IS_ABSTRACT, initEClass(buildingPhysicsCatalogEClass, BuildingPhysicsCatalog.class, "BuildingPhysicsCatalog", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getBuildingPhysicsCatalog_Author(), ecorePackage.getEString(), "author", null, 1, 1, initEReference(getBuildingPhysicsCatalog_Windows(), this.getWindowCategory(), null, "windows", null, 1, 1,
BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getBuildingPhysicsCatalog_Name(), ecorePackage.getEString(), "name", null, 1, 1,
BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED); IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_WindowCatalog(), this.getWindowCatalog(), null, "windowCatalog", null, initEAttribute(getBuildingPhysicsCatalog_Description(), ecorePackage.getEString(), "description", null, 0, 1,
1, 1, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_MaterialCatalog(), this.getMaterialCatalog(), null, "materialCatalog", initEAttribute(getBuildingPhysicsCatalog_Source(), ecorePackage.getEString(), "source", null, 0, 1,
null, 1, 1, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_MaterialCategories(), this.getMaterialCategory(), null,
"materialCategories", null, 0, -1, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_ConstructionCategories(), this.getConstructionCategory(), null,
"constructionCategories", null, 0, -1, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(windowTypeEClass, WindowType.class, "WindowType", !IS_ABSTRACT, !IS_INTERFACE, initEClass(windowTypeEClass, WindowType.class, "WindowType", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS); IS_GENERATED_INSTANCE_CLASS);
...@@ -867,29 +812,12 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -867,29 +812,12 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
1, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, 1, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
initEClass(catalogEClass, Catalog.class, "Catalog", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(windowCategoryEClass, WindowCategory.class, "WindowCategory", !IS_ABSTRACT, !IS_INTERFACE,
initEAttribute(getCatalog_Name(), ecorePackage.getEString(), "name", null, 1, 1, Catalog.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCatalog_Description(), ecorePackage.getEString(), "description", null, 0, 1, Catalog.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCatalog_Source(), ecorePackage.getEString(), "source", null, 0, 1, Catalog.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(windowCatalogEClass, WindowCatalog.class, "WindowCatalog", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS); IS_GENERATED_INSTANCE_CLASS);
initEReference(getWindowCatalog_WindowTypes(), this.getWindowType(), null, "windowTypes", null, 0, -1, initEReference(getWindowCategory_WindowTypes(), this.getWindowType(), null, "windowTypes", null, 0, -1,
WindowCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, WindowCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(materialCatalogEClass, MaterialCatalog.class, "MaterialCatalog", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getMaterialCatalog_MaterialCategories(), this.getMaterialCategory(), null, "materialCategories",
null, 0, -1, MaterialCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getMaterialCatalog_ConstructionCategories(), this.getConstructionCategory(), null,
"constructionCategories", null, 0, -1, MaterialCatalog.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE, initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS); IS_GENERATED_INSTANCE_CLASS);
initEReference(getMaterialCategory_Materials(), this.getMaterial(), this.getMaterial_Category(), "materials", initEReference(getMaterialCategory_Materials(), this.getMaterial(), this.getMaterial_Category(), "materials",
......
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Catalog;
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>Catalog</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.CatalogImpl#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.CatalogImpl#getDescription <em>Description</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.CatalogImpl#getSource <em>Source</em>}</li>
* </ul>
*
* @generated
*/
public abstract class CatalogImpl extends MinimalEObjectImpl.Container implements Catalog {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected static final String DESCRIPTION_EDEFAULT = null;
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected String description = DESCRIPTION_EDEFAULT;
/**
* The default value of the '{@link #getSource() <em>Source</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSource()
* @generated
* @ordered
*/
protected static final String SOURCE_EDEFAULT = null;
/**
* The cached value of the '{@link #getSource() <em>Source</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSource()
* @generated
* @ordered
*/
protected String source = SOURCE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CatalogImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.CATALOG;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.CATALOG__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.CATALOG__DESCRIPTION,
oldDescription, description));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getSource() {
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setSource(String newSource) {
String oldSource = source;
source = newSource;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.CATALOG__SOURCE, oldSource,
source));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.CATALOG__NAME:
return getName();
case BuildingPhysicsPackage.CATALOG__DESCRIPTION:
return getDescription();
case BuildingPhysicsPackage.CATALOG__SOURCE:
return getSource();
}
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.CATALOG__NAME:
setName((String) newValue);
return;
case BuildingPhysicsPackage.CATALOG__DESCRIPTION:
setDescription((String) newValue);
return;
case BuildingPhysicsPackage.CATALOG__SOURCE:
setSource((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.CATALOG__NAME:
setName(NAME_EDEFAULT);
return;
case BuildingPhysicsPackage.CATALOG__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
case BuildingPhysicsPackage.CATALOG__SOURCE:
setSource(SOURCE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.CATALOG__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BuildingPhysicsPackage.CATALOG__DESCRIPTION:
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case BuildingPhysicsPackage.CATALOG__SOURCE:
return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source);
}
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(" (name: ");
result.append(name);
result.append(", description: ");
result.append(description);
result.append(", source: ");
result.append(source);
result.append(')');
return result.toString();
}
} //CatalogImpl
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.ConstructionCategory;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import de.hftstuttgart.buildingphysics.MaterialCategory;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
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>Material Catalog</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialCatalogImpl#getMaterialCategories <em>Material Categories</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialCatalogImpl#getConstructionCategories <em>Construction Categories</em>}</li>
* </ul>
*
* @generated
*/
public class MaterialCatalogImpl extends CatalogImpl implements MaterialCatalog {
/**
* The cached value of the '{@link #getMaterialCategories() <em>Material Categories</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMaterialCategories()
* @generated
* @ordered
*/
protected EList<MaterialCategory> materialCategories;
/**
* The cached value of the '{@link #getConstructionCategories() <em>Construction Categories</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConstructionCategories()
* @generated
* @ordered
*/
protected EList<ConstructionCategory> constructionCategories;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MaterialCatalogImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.MATERIAL_CATALOG;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<MaterialCategory> getMaterialCategories() {
if (materialCategories == null) {
materialCategories = new EObjectContainmentEList<MaterialCategory>(MaterialCategory.class, this,
BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES);
}
return materialCategories;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<ConstructionCategory> getConstructionCategories() {
if (constructionCategories == null) {
constructionCategories = new EObjectContainmentEList<ConstructionCategory>(ConstructionCategory.class, this,
BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES);
}
return constructionCategories;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
return ((InternalEList<?>) getMaterialCategories()).basicRemove(otherEnd, msgs);
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
return ((InternalEList<?>) getConstructionCategories()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
return getMaterialCategories();
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
return getConstructionCategories();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
getMaterialCategories().clear();
getMaterialCategories().addAll((Collection<? extends MaterialCategory>) newValue);
return;
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
getConstructionCategories().clear();
getConstructionCategories().addAll((Collection<? extends ConstructionCategory>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
getMaterialCategories().clear();
return;
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
getConstructionCategories().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
return materialCategories != null && !materialCategories.isEmpty();
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
return constructionCategories != null && !constructionCategories.isEmpty();
}
return super.eIsSet(featureID);
}
} //MaterialCatalogImpl
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
package de.hftstuttgart.buildingphysics.impl; package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.WindowCatalog; import de.hftstuttgart.buildingphysics.WindowCategory;
import de.hftstuttgart.buildingphysics.WindowType; import de.hftstuttgart.buildingphysics.WindowType;
import java.util.Collection; import java.util.Collection;
...@@ -15,23 +15,25 @@ import org.eclipse.emf.common.util.EList; ...@@ -15,23 +15,25 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject; 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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.emf.ecore.util.InternalEList;
/** /**
* <!-- begin-user-doc --> * <!-- 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 --> * <!-- end-user-doc -->
* <p> * <p>
* The following features are implemented: * The following features are implemented:
* </p> * </p>
* <ul> * <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> * </ul>
* *
* @generated * @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. * The cached value of the '{@link #getWindowTypes() <em>Window Types</em>}' containment reference list.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -47,7 +49,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -47,7 +49,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
protected WindowCatalogImpl() { protected WindowCategoryImpl() {
super(); super();
} }
...@@ -58,7 +60,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -58,7 +60,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
*/ */
@Override @Override
protected EClass eStaticClass() { protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.WINDOW_CATALOG; return BuildingPhysicsPackage.Literals.WINDOW_CATEGORY;
} }
/** /**
...@@ -70,7 +72,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -70,7 +72,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
public EList<WindowType> getWindowTypes() { public EList<WindowType> getWindowTypes() {
if (windowTypes == null) { if (windowTypes == null) {
windowTypes = new EObjectContainmentEList<WindowType>(WindowType.class, this, windowTypes = new EObjectContainmentEList<WindowType>(WindowType.class, this,
BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES); BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES);
} }
return windowTypes; return windowTypes;
} }
...@@ -83,7 +85,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -83,7 +85,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override @Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return ((InternalEList<?>) getWindowTypes()).basicRemove(otherEnd, msgs); return ((InternalEList<?>) getWindowTypes()).basicRemove(otherEnd, msgs);
} }
return super.eInverseRemove(otherEnd, featureID, msgs); return super.eInverseRemove(otherEnd, featureID, msgs);
...@@ -97,7 +99,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -97,7 +99,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) { public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return getWindowTypes(); return getWindowTypes();
} }
return super.eGet(featureID, resolve, coreType); return super.eGet(featureID, resolve, coreType);
...@@ -112,7 +114,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -112,7 +114,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override @Override
public void eSet(int featureID, Object newValue) { public void eSet(int featureID, Object newValue) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
getWindowTypes().clear(); getWindowTypes().clear();
getWindowTypes().addAll((Collection<? extends WindowType>) newValue); getWindowTypes().addAll((Collection<? extends WindowType>) newValue);
return; return;
...@@ -128,7 +130,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -128,7 +130,7 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override @Override
public void eUnset(int featureID) { public void eUnset(int featureID) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
getWindowTypes().clear(); getWindowTypes().clear();
return; return;
} }
...@@ -143,10 +145,10 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog { ...@@ -143,10 +145,10 @@ public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
@Override @Override
public boolean eIsSet(int featureID) { public boolean eIsSet(int featureID) {
switch (featureID) { switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
return windowTypes != null && !windowTypes.isEmpty(); return windowTypes != null && !windowTypes.isEmpty();
} }
return super.eIsSet(featureID); return super.eIsSet(featureID);
} }
} //WindowCatalogImpl } //WindowCategoryImpl
...@@ -77,18 +77,8 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl { ...@@ -77,18 +77,8 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
} }
@Override @Override
public Adapter caseCatalog(Catalog object) { public Adapter caseWindowCategory(WindowCategory object) {
return createCatalogAdapter(); return createWindowCategoryAdapter();
}
@Override
public Adapter caseWindowCatalog(WindowCatalog object) {
return createWindowCatalogAdapter();
}
@Override
public Adapter caseMaterialCatalog(MaterialCatalog object) {
return createMaterialCatalogAdapter();
} }
@Override @Override
...@@ -164,44 +154,16 @@ public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl { ...@@ -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>}'. * 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.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>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases; * 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. * it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the new adapter. * @return the new adapter.
* @see de.hftstuttgart.buildingphysics.MaterialCatalog * @see de.hftstuttgart.buildingphysics.WindowCategory
* @generated * @generated
*/ */
public Adapter createMaterialCatalogAdapter() { public Adapter createWindowCategoryAdapter() {
return null; return null;
} }
......
...@@ -80,27 +80,9 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> { ...@@ -80,27 +80,9 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> {
result = defaultCase(theEObject); result = defaultCase(theEObject);
return result; return result;
} }
case BuildingPhysicsPackage.CATALOG: { case BuildingPhysicsPackage.WINDOW_CATEGORY: {
Catalog catalog = (Catalog) theEObject; WindowCategory windowCategory = (WindowCategory) theEObject;
T result = caseCatalog(catalog); T result = caseWindowCategory(windowCategory);
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);
if (result == null) if (result == null)
result = defaultCase(theEObject); result = defaultCase(theEObject);
return result; return result;
...@@ -176,47 +158,17 @@ public class BuildingPhysicsSwitch<T> extends Switch<T> { ...@@ -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>'. * 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>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>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* This implementation returns null; * This implementation returns null;
* returning a non-null result will terminate the switch. * returning a non-null result will terminate the switch.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param object the target of the switch. * @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) * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated * @generated
*/ */
public T caseMaterialCatalog(MaterialCatalog object) { public T caseWindowCategory(WindowCategory object) {
return null; return null;
} }
......
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