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;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- 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 -->
*
* <p>
* The following features are supported:
* </p>
* <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>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCatalog()
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCategory()
* @model
* @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.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.WindowType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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"
* @generated
*/
EList<WindowType> getWindowTypes();
} // WindowCatalog
} // WindowCategory
......@@ -4,17 +4,22 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.ConstructionCategory;
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.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.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
......@@ -24,81 +29,114 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getAuthor <em>Author</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getWindowCatalog <em>Window Catalog</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getMaterialCatalog <em>Material Catalog</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getWindows <em>Windows</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.BuildingPhysicsCatalogImpl#getName <em>Name</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>
*
* @generated
*/
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 -->
* <!-- end-user-doc -->
* @see #getAuthor()
* @see #getWindows()
* @generated
* @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 -->
* <!-- end-user-doc -->
* @see #getAuthor()
* @see #getName()
* @generated
* @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 -->
* <!-- end-user-doc -->
* @see #getWindowCatalog()
* @see #getName()
* @generated
* @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 -->
* <!-- end-user-doc -->
* @see #getMaterialCatalog()
* @see #getDescription()
* @generated
* @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 -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected BuildingPhysicsCatalogImpl() {
super();
}
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
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG;
}
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
*/
@Override
public String getAuthor() {
return author;
protected String source = SOURCE_EDEFAULT;
/**
* 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
* @generated
*/
@Override
public void setAuthor(String newAuthor) {
String oldAuthor = author;
author = newAuthor;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR, oldAuthor, author));
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG;
}
/**
......@@ -121,8 +155,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated
*/
@Override
public WindowCatalog getWindowCatalog() {
return windowCatalog;
public WindowCategory getWindows() {
return windows;
}
/**
......@@ -130,13 +164,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetWindowCatalog(WindowCatalog newWindowCatalog, NotificationChain msgs) {
WindowCatalog oldWindowCatalog = windowCatalog;
windowCatalog = newWindowCatalog;
public NotificationChain basicSetWindows(WindowCategory newWindows, NotificationChain msgs) {
WindowCategory oldWindows = windows;
windows = newWindows;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, oldWindowCatalog,
newWindowCatalog);
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, oldWindows, newWindows);
if (msgs == null)
msgs = notification;
else
......@@ -151,24 +184,21 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated
*/
@Override
public void setWindowCatalog(WindowCatalog newWindowCatalog) {
if (newWindowCatalog != windowCatalog) {
public void setWindows(WindowCategory newWindows) {
if (newWindows != windows) {
NotificationChain msgs = null;
if (windowCatalog != null)
msgs = ((InternalEObject) windowCatalog).eInverseRemove(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, null,
msgs);
if (newWindowCatalog != null)
msgs = ((InternalEObject) newWindowCatalog).eInverseAdd(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, null,
msgs);
msgs = basicSetWindowCatalog(newWindowCatalog, msgs);
if (windows != null)
msgs = ((InternalEObject) windows).eInverseRemove(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, null, msgs);
if (newWindows != null)
msgs = ((InternalEObject) newWindows).eInverseAdd(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, null, msgs);
msgs = basicSetWindows(newWindows, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, newWindowCatalog,
newWindowCatalog));
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS, newWindows, newWindows));
}
/**
......@@ -177,8 +207,8 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated
*/
@Override
public MaterialCatalog getMaterialCatalog() {
return materialCatalog;
public String getName() {
return name;
}
/**
......@@ -186,19 +216,13 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetMaterialCatalog(MaterialCatalog newMaterialCatalog, NotificationChain msgs) {
MaterialCatalog oldMaterialCatalog = materialCatalog;
materialCatalog = newMaterialCatalog;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, oldMaterialCatalog,
newMaterialCatalog);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
@Override
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME,
oldName, name));
}
/**
......@@ -207,24 +231,74 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* @generated
*/
@Override
public void setMaterialCatalog(MaterialCatalog newMaterialCatalog) {
if (newMaterialCatalog != materialCatalog) {
NotificationChain msgs = null;
if (materialCatalog != null)
msgs = ((InternalEObject) materialCatalog).eInverseRemove(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG,
null, msgs);
if (newMaterialCatalog != null)
msgs = ((InternalEObject) newMaterialCatalog).eInverseAdd(this,
EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG,
null, msgs);
msgs = basicSetMaterialCatalog(newMaterialCatalog, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
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.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, newMaterialCatalog,
newMaterialCatalog));
BuildingPhysicsPackage.BUILDING_PHYSICS_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.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
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
return basicSetWindowCatalog(null, msgs);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
return basicSetMaterialCatalog(null, msgs);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return basicSetWindows(null, msgs);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
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);
}
......@@ -251,12 +327,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
return getAuthor();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
return getWindowCatalog();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
return getMaterialCatalog();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return getWindows();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
return getName();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
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);
}
......@@ -266,17 +348,29 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
setAuthor((String) newValue);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
setWindows((WindowCategory) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
setWindowCatalog((WindowCatalog) newValue);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
setName((String) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
setMaterialCatalog((MaterialCatalog) newValue);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
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;
}
super.eSet(featureID, newValue);
......@@ -290,14 +384,23 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
setAuthor(AUTHOR_EDEFAULT);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
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;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
setWindowCatalog((WindowCatalog) null);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
getMaterialCategories().clear();
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
setMaterialCatalog((MaterialCatalog) null);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
getConstructionCategories().clear();
return;
}
super.eUnset(featureID);
......@@ -311,12 +414,18 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
return AUTHOR_EDEFAULT == null ? author != null : !AUTHOR_EDEFAULT.equals(author);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
return windowCatalog != null;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
return materialCatalog != null;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
return windows != null;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
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);
}
......@@ -332,8 +441,12 @@ public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container imp
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (author: ");
result.append(author);
result.append(" (name: ");
result.append(name);
result.append(", description: ");
result.append(description);
result.append(", source: ");
result.append(source);
result.append(')');
return result.toString();
}
......
......@@ -60,10 +60,8 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building
return createBuildingPhysicsCatalog();
case BuildingPhysicsPackage.WINDOW_TYPE:
return createWindowType();
case BuildingPhysicsPackage.WINDOW_CATALOG:
return createWindowCatalog();
case BuildingPhysicsPackage.MATERIAL_CATALOG:
return createMaterialCatalog();
case BuildingPhysicsPackage.WINDOW_CATEGORY:
return createWindowCategory();
case BuildingPhysicsPackage.MATERIAL_CATEGORY:
return createMaterialCategory();
case BuildingPhysicsPackage.MATERIAL:
......@@ -107,20 +105,9 @@ public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements Building
* @generated
*/
@Override
public WindowCatalog createWindowCatalog() {
WindowCatalogImpl windowCatalog = new WindowCatalogImpl();
return windowCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public MaterialCatalog createMaterialCatalog() {
MaterialCatalogImpl materialCatalog = new MaterialCatalogImpl();
return materialCatalog;
public WindowCategory createWindowCategory() {
WindowCategoryImpl windowCategory = new WindowCategoryImpl();
return windowCategory;
}
/**
......
......@@ -5,14 +5,12 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Catalog;
import de.hftstuttgart.buildingphysics.Construction;
import de.hftstuttgart.buildingphysics.ConstructionCategory;
import de.hftstuttgart.buildingphysics.Layer;
import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.WindowCategory;
import de.hftstuttgart.buildingphysics.WindowType;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
......@@ -50,21 +48,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* <!-- end-user-doc -->
* @generated
*/
private EClass catalogEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass windowCatalogEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass materialCatalogEClass = null;
private EClass windowCategoryEClass = null;
/**
* <!-- begin-user-doc -->
......@@ -184,8 +168,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated
*/
@Override
public EAttribute getBuildingPhysicsCatalog_Author() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(0);
public EReference getBuildingPhysicsCatalog_Windows() {
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
* @generated
*/
@Override
public EReference getBuildingPhysicsCatalog_WindowCatalog() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(1);
public EAttribute getBuildingPhysicsCatalog_Source() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(3);
}
/**
......@@ -204,8 +208,18 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated
*/
@Override
public EReference getBuildingPhysicsCatalog_MaterialCatalog() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(2);
public EReference getBuildingPhysicsCatalog_ConstructionCategories() {
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
* @generated
*/
@Override
public EClass getCatalog() {
return catalogEClass;
}
/**
* <!-- 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);
public EClass getWindowCategory() {
return windowCategoryEClass;
}
/**
......@@ -374,58 +368,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
* @generated
*/
@Override
public EAttribute getCatalog_Source() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- 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);
public EReference getWindowCategory_WindowTypes() {
return (EReference) windowCategoryEClass.getEStructuralFeatures().get(0);
}
/**
......@@ -719,9 +663,12 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
// Create classes and their features
buildingPhysicsCatalogEClass = createEClass(BUILDING_PHYSICS_CATALOG);
createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__AUTHOR);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG);
createEReference(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__WINDOWS);
createEAttribute(buildingPhysicsCatalogEClass, BUILDING_PHYSICS_CATALOG__NAME);
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);
createEAttribute(windowTypeEClass, WINDOW_TYPE__WINDOW_TYPE_ID);
......@@ -737,17 +684,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_CARBON);
createEAttribute(windowTypeEClass, WINDOW_TYPE__DISPOSAL_DESCRIPTION);
catalogEClass = createEClass(CATALOG);
createEAttribute(catalogEClass, CATALOG__NAME);
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);
windowCategoryEClass = createEClass(WINDOW_CATEGORY);
createEReference(windowCategoryEClass, WINDOW_CATEGORY__WINDOW_TYPES);
materialCategoryEClass = createEClass(MATERIAL_CATEGORY);
createEReference(materialCategoryEClass, MATERIAL_CATEGORY__MATERIALS);
......@@ -814,21 +752,28 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
// Set bounds for type parameters
// Add supertypes to classes
windowCatalogEClass.getESuperTypes().add(this.getCatalog());
materialCatalogEClass.getESuperTypes().add(this.getCatalog());
// Initialize classes, features, and operations; add parameters
initEClass(buildingPhysicsCatalogEClass, BuildingPhysicsCatalog.class, "BuildingPhysicsCatalog", !IS_ABSTRACT,
!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,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_WindowCatalog(), this.getWindowCatalog(), null, "windowCatalog", null,
1, 1, BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBuildingPhysicsCatalog_MaterialCatalog(), this.getMaterialCatalog(), null, "materialCatalog",
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_Description(), ecorePackage.getEString(), "description", null, 0, 1,
BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getBuildingPhysicsCatalog_Source(), ecorePackage.getEString(), "source", null, 0, 1,
BuildingPhysicsCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
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,
IS_GENERATED_INSTANCE_CLASS);
......@@ -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,
!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,
!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,
initEClass(windowCategoryEClass, WindowCategory.class, "WindowCategory", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getWindowCatalog_WindowTypes(), this.getWindowType(), null, "windowTypes", null, 0, -1,
WindowCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
initEReference(getWindowCategory_WindowTypes(), this.getWindowType(), null, "windowTypes", null, 0, -1,
WindowCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!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,
IS_GENERATED_INSTANCE_CLASS);
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 @@
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
......@@ -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;
}
......
......@@ -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;
......@@ -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;
}
......
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