Commit 1dae3f82 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Merge branch '2-add-basic-types-and-attributes-to-catalog-data-model'

parents aec1329f c50b99ea
/**
*/
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>
* </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();
} // MaterialCatalog
/**
*/
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>Material Category</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.MaterialCategory#getMaterial <em>Material</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.MaterialCategory#getName <em>Name</em>}</li>
* </ul>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCategory()
* @model
* @generated
*/
public interface MaterialCategory extends EObject {
/**
* Returns the value of the '<em><b>Material</b></em>' containment reference list.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.Material}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Material</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCategory_Material()
* @model containment="true"
* @generated
*/
EList<Material> getMaterial();
/**
* 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#getMaterialCategory_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.MaterialCategory#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);
} // MaterialCategory
/**
*/
package de.hftstuttgart.buildingphysics;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Window Catalog</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>
* </ul>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowCatalog()
* @model
* @generated
*/
public interface WindowCatalog extends Catalog {
/**
* 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()
* @model containment="true"
* @generated
*/
EList<WindowType> getWindowTypes();
} // WindowCatalog
/**
*/
package de.hftstuttgart.buildingphysics;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Window Type</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getId <em>Id</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getUValue <em>UValue</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getGValue <em>GValue</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getGlazingNumber <em>Glazing Number</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.WindowType#getFrameRatio <em>Frame Ratio</em>}</li>
* </ul>
*
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType()
* @model
* @generated
*/
public interface WindowType extends EObject {
/**
* Returns the value of the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(int)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_Id()
* @model id="true" required="true"
* @generated
*/
int getId();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getId <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Id</em>' attribute.
* @see #getId()
* @generated
*/
void setId(int value);
/**
* 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#getWindowType_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#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>UValue</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>UValue</em>' attribute.
* @see #setUValue(double)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_UValue()
* @model required="true"
* @generated
*/
double getUValue();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getUValue <em>UValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>UValue</em>' attribute.
* @see #getUValue()
* @generated
*/
void setUValue(double value);
/**
* Returns the value of the '<em><b>GValue</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>GValue</em>' attribute.
* @see #setGValue(double)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_GValue()
* @model required="true"
* @generated
*/
double getGValue();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getGValue <em>GValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>GValue</em>' attribute.
* @see #getGValue()
* @generated
*/
void setGValue(double value);
/**
* Returns the value of the '<em><b>Glazing Number</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Glazing Number</em>' attribute.
* @see #setGlazingNumber(int)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_GlazingNumber()
* @model required="true"
* @generated
*/
int getGlazingNumber();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getGlazingNumber <em>Glazing Number</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Glazing Number</em>' attribute.
* @see #getGlazingNumber()
* @generated
*/
void setGlazingNumber(int value);
/**
* Returns the value of the '<em><b>Frame Ratio</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* In % (between 0 and 100)
* <!-- end-model-doc -->
* @return the value of the '<em>Frame Ratio</em>' attribute.
* @see #setFrameRatio(int)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_FrameRatio()
* @model required="true"
* @generated
*/
int getFrameRatio();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getFrameRatio <em>Frame Ratio</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Frame Ratio</em>' attribute.
* @see #getFrameRatio()
* @generated
*/
void setFrameRatio(int value);
} // WindowType
/**
*/
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 org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- 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.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>
* </ul>
*
* @generated
*/
public class BuildingPhysicsCatalogImpl extends MinimalEObjectImpl.Container implements BuildingPhysicsCatalog {
/**
* The default value of the '{@link #getAuthor() <em>Author</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAuthor()
* @generated
* @ordered
*/
protected static final String AUTHOR_EDEFAULT = null;
/**
* The cached value of the '{@link #getAuthor() <em>Author</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAuthor()
* @generated
* @ordered
*/
protected String author = AUTHOR_EDEFAULT;
/**
* The cached value of the '{@link #getWindowCatalog() <em>Window Catalog</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWindowCatalog()
* @generated
* @ordered
*/
protected WindowCatalog windowCatalog;
/**
* The cached value of the '{@link #getMaterialCatalog() <em>Material Catalog</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMaterialCatalog()
* @generated
* @ordered
*/
protected MaterialCatalog materialCatalog;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BuildingPhysicsCatalogImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getAuthor() {
return author;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
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));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WindowCatalog getWindowCatalog() {
return windowCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetWindowCatalog(WindowCatalog newWindowCatalog, NotificationChain msgs) {
WindowCatalog oldWindowCatalog = windowCatalog;
windowCatalog = newWindowCatalog;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, oldWindowCatalog,
newWindowCatalog);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setWindowCatalog(WindowCatalog newWindowCatalog) {
if (newWindowCatalog != windowCatalog) {
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 (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, newWindowCatalog,
newWindowCatalog));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MaterialCatalog getMaterialCatalog() {
return materialCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- 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;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
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())
eNotify(new ENotificationImpl(this, Notification.SET,
BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, newMaterialCatalog,
newMaterialCatalog));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@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);
}
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.BUILDING_PHYSICS_CATALOG__AUTHOR:
return getAuthor();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
return getWindowCatalog();
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
return getMaterialCatalog();
}
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.BUILDING_PHYSICS_CATALOG__AUTHOR:
setAuthor((String) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
setWindowCatalog((WindowCatalog) newValue);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
setMaterialCatalog((MaterialCatalog) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
setAuthor(AUTHOR_EDEFAULT);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
setWindowCatalog((WindowCatalog) null);
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
setMaterialCatalog((MaterialCatalog) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@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;
}
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(" (author: ");
result.append(author);
result.append(')');
return result.toString();
}
} //BuildingPhysicsCatalogImpl
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