Commit 907b36b2 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Catalogs modeled for window types and materials plus generated classes

parent ba4de919
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.*;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class BuildingPhysicsFactoryImpl extends EFactoryImpl implements BuildingPhysicsFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static BuildingPhysicsFactory init() {
try {
BuildingPhysicsFactory theBuildingPhysicsFactory = (BuildingPhysicsFactory) EPackage.Registry.INSTANCE
.getEFactory(BuildingPhysicsPackage.eNS_URI);
if (theBuildingPhysicsFactory != null) {
return theBuildingPhysicsFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new BuildingPhysicsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG:
return createBuildingPhysicsCatalog();
case BuildingPhysicsPackage.WINDOW_TYPE:
return createWindowType();
case BuildingPhysicsPackage.WINDOW_CATALOG:
return createWindowCatalog();
case BuildingPhysicsPackage.MATERIAL_CATALOG:
return createMaterialCatalog();
case BuildingPhysicsPackage.MATERIAL_CATEGORY:
return createMaterialCategory();
case BuildingPhysicsPackage.MATERIAL:
return createMaterial();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsCatalog createBuildingPhysicsCatalog() {
BuildingPhysicsCatalogImpl buildingPhysicsCatalog = new BuildingPhysicsCatalogImpl();
return buildingPhysicsCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WindowType createWindowType() {
WindowTypeImpl windowType = new WindowTypeImpl();
return windowType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WindowCatalog createWindowCatalog() {
WindowCatalogImpl windowCatalog = new WindowCatalogImpl();
return windowCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MaterialCatalog createMaterialCatalog() {
MaterialCatalogImpl materialCatalog = new MaterialCatalogImpl();
return materialCatalog;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MaterialCategory createMaterialCategory() {
MaterialCategoryImpl materialCategory = new MaterialCategoryImpl();
return materialCategory;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Material createMaterial() {
MaterialImpl material = new MaterialImpl();
return material;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsPackage getBuildingPhysicsPackage() {
return (BuildingPhysicsPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static BuildingPhysicsPackage getPackage() {
return BuildingPhysicsPackage.eINSTANCE;
}
} //BuildingPhysicsFactoryImpl
/**
*/
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.Material;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.WindowType;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class BuildingPhysicsPackageImpl extends EPackageImpl implements BuildingPhysicsPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass buildingPhysicsCatalogEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass windowTypeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- 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;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass materialCategoryEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass materialEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#eNS_URI
* @see #init()
* @generated
*/
private BuildingPhysicsPackageImpl() {
super(eNS_URI, BuildingPhysicsFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link BuildingPhysicsPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static BuildingPhysicsPackage init() {
if (isInited)
return (BuildingPhysicsPackage) EPackage.Registry.INSTANCE.getEPackage(BuildingPhysicsPackage.eNS_URI);
// Obtain or create and register package
Object registeredBuildingPhysicsPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
BuildingPhysicsPackageImpl theBuildingPhysicsPackage = registeredBuildingPhysicsPackage instanceof BuildingPhysicsPackageImpl
? (BuildingPhysicsPackageImpl) registeredBuildingPhysicsPackage
: new BuildingPhysicsPackageImpl();
isInited = true;
// Create package meta-data objects
theBuildingPhysicsPackage.createPackageContents();
// Initialize created meta-data
theBuildingPhysicsPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theBuildingPhysicsPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(BuildingPhysicsPackage.eNS_URI, theBuildingPhysicsPackage);
return theBuildingPhysicsPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBuildingPhysicsCatalog() {
return buildingPhysicsCatalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBuildingPhysicsCatalog_Author() {
return (EAttribute) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBuildingPhysicsCatalog_WindowCatalog() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBuildingPhysicsCatalog_MaterialCatalog() {
return (EReference) buildingPhysicsCatalogEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWindowType() {
return windowTypeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_Id() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_Name() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_UValue() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_GValue() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_GlazingNumber() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWindowType_FrameRatio() {
return (EAttribute) windowTypeEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCatalog() {
return catalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCatalog_Name() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCatalog_Description() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCatalog_Source() {
return (EAttribute) catalogEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWindowCatalog() {
return windowCatalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWindowCatalog_WindowTypes() {
return (EReference) windowCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMaterialCatalog() {
return materialCatalogEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMaterialCatalog_MaterialCategories() {
return (EReference) materialCatalogEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMaterialCategory() {
return materialCategoryEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMaterialCategory_Material() {
return (EReference) materialCategoryEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterialCategory_Name() {
return (EAttribute) materialCategoryEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMaterial() {
return materialEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterial_Id() {
return (EAttribute) materialEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterial_Name() {
return (EAttribute) materialEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterial_Density() {
return (EAttribute) materialEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterial_HeatCapacity() {
return (EAttribute) materialEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMaterial_Conductivity() {
return (EAttribute) materialEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsFactory getBuildingPhysicsFactory() {
return (BuildingPhysicsFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// 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);
windowTypeEClass = createEClass(WINDOW_TYPE);
createEAttribute(windowTypeEClass, WINDOW_TYPE__ID);
createEAttribute(windowTypeEClass, WINDOW_TYPE__NAME);
createEAttribute(windowTypeEClass, WINDOW_TYPE__UVALUE);
createEAttribute(windowTypeEClass, WINDOW_TYPE__GVALUE);
createEAttribute(windowTypeEClass, WINDOW_TYPE__GLAZING_NUMBER);
createEAttribute(windowTypeEClass, WINDOW_TYPE__FRAME_RATIO);
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);
materialCategoryEClass = createEClass(MATERIAL_CATEGORY);
createEReference(materialCategoryEClass, MATERIAL_CATEGORY__MATERIAL);
createEAttribute(materialCategoryEClass, MATERIAL_CATEGORY__NAME);
materialEClass = createEClass(MATERIAL);
createEAttribute(materialEClass, MATERIAL__ID);
createEAttribute(materialEClass, MATERIAL__NAME);
createEAttribute(materialEClass, MATERIAL__DENSITY);
createEAttribute(materialEClass, MATERIAL__HEAT_CAPACITY);
createEAttribute(materialEClass, MATERIAL__CONDUCTIVITY);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// 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,
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);
initEClass(windowTypeEClass, WindowType.class, "WindowType", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getWindowType_Id(), ecorePackage.getEInt(), "id", null, 1, 1, WindowType.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_Name(), ecorePackage.getEString(), "name", null, 1, 1, WindowType.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_UValue(), ecorePackage.getEDouble(), "uValue", null, 1, 1, WindowType.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_GValue(), ecorePackage.getEDouble(), "gValue", null, 1, 1, WindowType.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", null, 1, 1,
WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_FrameRatio(), ecorePackage.getEInt(), "frameRatio", null, 1, 1, WindowType.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
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,
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,
!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);
initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getMaterialCategory_Material(), this.getMaterial(), null, "material", null, 0, -1,
MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterialCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1,
MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(materialEClass, Material.class, "Material", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMaterial_Id(), ecorePackage.getEInt(), "id", null, 1, 1, Material.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_Name(), ecorePackage.getEString(), "name", null, 1, 1, Material.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_Density(), ecorePackage.getEDouble(), "density", null, 1, 1, Material.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_HeatCapacity(), ecorePackage.getEDouble(), "heatCapacity", null, 1, 1,
Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_Conductivity(), ecorePackage.getEDouble(), "conductivity", null, 1, 1,
Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //BuildingPhysicsPackageImpl
/**
*/
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
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
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
*/
public String getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
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
*/
public String getSource() {
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
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.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>
* </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;
/**
* <!-- 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
*/
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 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
return ((InternalEList<?>) getMaterialCategories()).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();
}
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;
}
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;
}
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();
}
return super.eIsSet(featureID);
}
} //MaterialCatalogImpl
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.buildingphysics.MaterialCategory;
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 -->
* An implementation of the model object '<em><b>Material Category</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialCategoryImpl#getMaterial <em>Material</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialCategoryImpl#getName <em>Name</em>}</li>
* </ul>
*
* @generated
*/
public class MaterialCategoryImpl extends MinimalEObjectImpl.Container implements MaterialCategory {
/**
* The cached value of the '{@link #getMaterial() <em>Material</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMaterial()
* @generated
* @ordered
*/
protected EList<Material> material;
/**
* 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;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MaterialCategoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.MATERIAL_CATEGORY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Material> getMaterial() {
if (material == null) {
material = new EObjectContainmentEList<Material>(Material.class, this,
BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIAL);
}
return material;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME,
oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIAL:
return ((InternalEList<?>) getMaterial()).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_CATEGORY__MATERIAL:
return getMaterial();
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
return getName();
}
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_CATEGORY__MATERIAL:
getMaterial().clear();
getMaterial().addAll((Collection<? extends Material>) newValue);
return;
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
setName((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIAL:
getMaterial().clear();
return;
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIAL:
return material != null && !material.isEmpty();
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
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(')');
return result.toString();
}
} //MaterialCategoryImpl
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;
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>Material</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getId <em>Id</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDensity <em>Density</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getHeatCapacity <em>Heat Capacity</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getConductivity <em>Conductivity</em>}</li>
* </ul>
*
* @generated
*/
public class MaterialImpl extends MinimalEObjectImpl.Container implements Material {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final int ID_EDEFAULT = 0;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected int id = ID_EDEFAULT;
/**
* 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 #getDensity() <em>Density</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDensity()
* @generated
* @ordered
*/
protected static final double DENSITY_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getDensity() <em>Density</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDensity()
* @generated
* @ordered
*/
protected double density = DENSITY_EDEFAULT;
/**
* The default value of the '{@link #getHeatCapacity() <em>Heat Capacity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getHeatCapacity()
* @generated
* @ordered
*/
protected static final double HEAT_CAPACITY_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getHeatCapacity() <em>Heat Capacity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getHeatCapacity()
* @generated
* @ordered
*/
protected double heatCapacity = HEAT_CAPACITY_EDEFAULT;
/**
* The default value of the '{@link #getConductivity() <em>Conductivity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConductivity()
* @generated
* @ordered
*/
protected static final double CONDUCTIVITY_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getConductivity() <em>Conductivity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConductivity()
* @generated
* @ordered
*/
protected double conductivity = CONDUCTIVITY_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MaterialImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.MATERIAL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(int newId) {
int oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__NAME, oldName,
name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getDensity() {
return density;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDensity(double newDensity) {
double oldDensity = density;
density = newDensity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__DENSITY, oldDensity,
density));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getHeatCapacity() {
return heatCapacity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setHeatCapacity(double newHeatCapacity) {
double oldHeatCapacity = heatCapacity;
heatCapacity = newHeatCapacity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY,
oldHeatCapacity, heatCapacity));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getConductivity() {
return conductivity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConductivity(double newConductivity) {
double oldConductivity = conductivity;
conductivity = newConductivity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY,
oldConductivity, conductivity));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL__ID:
return getId();
case BuildingPhysicsPackage.MATERIAL__NAME:
return getName();
case BuildingPhysicsPackage.MATERIAL__DENSITY:
return getDensity();
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
return getHeatCapacity();
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
return getConductivity();
}
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.MATERIAL__ID:
setId((Integer) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__NAME:
setName((String) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__DENSITY:
setDensity((Double) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
setHeatCapacity((Double) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
setConductivity((Double) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL__ID:
setId(ID_EDEFAULT);
return;
case BuildingPhysicsPackage.MATERIAL__NAME:
setName(NAME_EDEFAULT);
return;
case BuildingPhysicsPackage.MATERIAL__DENSITY:
setDensity(DENSITY_EDEFAULT);
return;
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
setHeatCapacity(HEAT_CAPACITY_EDEFAULT);
return;
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
setConductivity(CONDUCTIVITY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL__ID:
return id != ID_EDEFAULT;
case BuildingPhysicsPackage.MATERIAL__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BuildingPhysicsPackage.MATERIAL__DENSITY:
return density != DENSITY_EDEFAULT;
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
return heatCapacity != HEAT_CAPACITY_EDEFAULT;
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
return conductivity != CONDUCTIVITY_EDEFAULT;
}
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(" (id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", density: ");
result.append(density);
result.append(", heatCapacity: ");
result.append(heatCapacity);
result.append(", conductivity: ");
result.append(conductivity);
result.append(')');
return result.toString();
}
} //MaterialImpl
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.WindowType;
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>Window Catalog</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>
* </ul>
*
* @generated
*/
public class WindowCatalogImpl extends CatalogImpl implements WindowCatalog {
/**
* The cached value of the '{@link #getWindowTypes() <em>Window Types</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWindowTypes()
* @generated
* @ordered
*/
protected EList<WindowType> windowTypes;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected WindowCatalogImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.WINDOW_CATALOG;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<WindowType> getWindowTypes() {
if (windowTypes == null) {
windowTypes = new EObjectContainmentEList<WindowType>(WindowType.class, this,
BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES);
}
return windowTypes;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
return ((InternalEList<?>) getWindowTypes()).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.WINDOW_CATALOG__WINDOW_TYPES:
return getWindowTypes();
}
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.WINDOW_CATALOG__WINDOW_TYPES:
getWindowTypes().clear();
getWindowTypes().addAll((Collection<? extends WindowType>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
getWindowTypes().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES:
return windowTypes != null && !windowTypes.isEmpty();
}
return super.eIsSet(featureID);
}
} //WindowCatalogImpl
/**
*/
package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.WindowType;
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>Window Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getId <em>Id</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getName <em>Name</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getUValue <em>UValue</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getGValue <em>GValue</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getGlazingNumber <em>Glazing Number</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.WindowTypeImpl#getFrameRatio <em>Frame Ratio</em>}</li>
* </ul>
*
* @generated
*/
public class WindowTypeImpl extends MinimalEObjectImpl.Container implements WindowType {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final int ID_EDEFAULT = 0;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected int id = ID_EDEFAULT;
/**
* 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 #getUValue() <em>UValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUValue()
* @generated
* @ordered
*/
protected static final double UVALUE_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getUValue() <em>UValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUValue()
* @generated
* @ordered
*/
protected double uValue = UVALUE_EDEFAULT;
/**
* The default value of the '{@link #getGValue() <em>GValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGValue()
* @generated
* @ordered
*/
protected static final double GVALUE_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getGValue() <em>GValue</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGValue()
* @generated
* @ordered
*/
protected double gValue = GVALUE_EDEFAULT;
/**
* The default value of the '{@link #getGlazingNumber() <em>Glazing Number</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGlazingNumber()
* @generated
* @ordered
*/
protected static final int GLAZING_NUMBER_EDEFAULT = 0;
/**
* The cached value of the '{@link #getGlazingNumber() <em>Glazing Number</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGlazingNumber()
* @generated
* @ordered
*/
protected int glazingNumber = GLAZING_NUMBER_EDEFAULT;
/**
* The default value of the '{@link #getFrameRatio() <em>Frame Ratio</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFrameRatio()
* @generated
* @ordered
*/
protected static final int FRAME_RATIO_EDEFAULT = 0;
/**
* The cached value of the '{@link #getFrameRatio() <em>Frame Ratio</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFrameRatio()
* @generated
* @ordered
*/
protected int frameRatio = FRAME_RATIO_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected WindowTypeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildingPhysicsPackage.Literals.WINDOW_TYPE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(int newId) {
int oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__NAME, oldName,
name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getUValue() {
return uValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setUValue(double newUValue) {
double oldUValue = uValue;
uValue = newUValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__UVALUE, oldUValue,
uValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getGValue() {
return gValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setGValue(double newGValue) {
double oldGValue = gValue;
gValue = newGValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__GVALUE, oldGValue,
gValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getGlazingNumber() {
return glazingNumber;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setGlazingNumber(int newGlazingNumber) {
int oldGlazingNumber = glazingNumber;
glazingNumber = newGlazingNumber;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER,
oldGlazingNumber, glazingNumber));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getFrameRatio() {
return frameRatio;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setFrameRatio(int newFrameRatio) {
int oldFrameRatio = frameRatio;
frameRatio = newFrameRatio;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO,
oldFrameRatio, frameRatio));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_TYPE__ID:
return getId();
case BuildingPhysicsPackage.WINDOW_TYPE__NAME:
return getName();
case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE:
return getUValue();
case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE:
return getGValue();
case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER:
return getGlazingNumber();
case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO:
return getFrameRatio();
}
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.WINDOW_TYPE__ID:
setId((Integer) newValue);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__NAME:
setName((String) newValue);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE:
setUValue((Double) newValue);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE:
setGValue((Double) newValue);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER:
setGlazingNumber((Integer) newValue);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO:
setFrameRatio((Integer) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_TYPE__ID:
setId(ID_EDEFAULT);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__NAME:
setName(NAME_EDEFAULT);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE:
setUValue(UVALUE_EDEFAULT);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE:
setGValue(GVALUE_EDEFAULT);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER:
setGlazingNumber(GLAZING_NUMBER_EDEFAULT);
return;
case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO:
setFrameRatio(FRAME_RATIO_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildingPhysicsPackage.WINDOW_TYPE__ID:
return id != ID_EDEFAULT;
case BuildingPhysicsPackage.WINDOW_TYPE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE:
return uValue != UVALUE_EDEFAULT;
case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE:
return gValue != GVALUE_EDEFAULT;
case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER:
return glazingNumber != GLAZING_NUMBER_EDEFAULT;
case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO:
return frameRatio != FRAME_RATIO_EDEFAULT;
}
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(" (id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", uValue: ");
result.append(uValue);
result.append(", gValue: ");
result.append(gValue);
result.append(", glazingNumber: ");
result.append(glazingNumber);
result.append(", frameRatio: ");
result.append(frameRatio);
result.append(')');
return result.toString();
}
} //WindowTypeImpl
/**
*/
package de.hftstuttgart.buildingphysics.util;
import de.hftstuttgart.buildingphysics.*;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage
* @generated
*/
public class BuildingPhysicsAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static BuildingPhysicsPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsAdapterFactory() {
if (modelPackage == null) {
modelPackage = BuildingPhysicsPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BuildingPhysicsSwitch<Adapter> modelSwitch = new BuildingPhysicsSwitch<Adapter>() {
@Override
public Adapter caseBuildingPhysicsCatalog(BuildingPhysicsCatalog object) {
return createBuildingPhysicsCatalogAdapter();
}
@Override
public Adapter caseWindowType(WindowType object) {
return createWindowTypeAdapter();
}
@Override
public Adapter caseCatalog(Catalog object) {
return createCatalogAdapter();
}
@Override
public Adapter caseWindowCatalog(WindowCatalog object) {
return createWindowCatalogAdapter();
}
@Override
public Adapter caseMaterialCatalog(MaterialCatalog object) {
return createMaterialCatalogAdapter();
}
@Override
public Adapter caseMaterialCategory(MaterialCategory object) {
return createMaterialCategoryAdapter();
}
@Override
public Adapter caseMaterial(Material object) {
return createMaterialAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog <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.BuildingPhysicsCatalog
* @generated
*/
public Adapter createBuildingPhysicsCatalogAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.WindowType <em>Window Type</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.WindowType
* @generated
*/
public Adapter createWindowTypeAdapter() {
return null;
}
/**
* 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>}'.
* <!-- 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
* @generated
*/
public Adapter createMaterialCatalogAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.MaterialCategory <em>Material 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.MaterialCategory
* @generated
*/
public Adapter createMaterialCategoryAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link de.hftstuttgart.buildingphysics.Material <em>Material</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.Material
* @generated
*/
public Adapter createMaterialAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //BuildingPhysicsAdapterFactory
/**
*/
package de.hftstuttgart.buildingphysics.util;
import de.hftstuttgart.buildingphysics.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage
* @generated
*/
public class BuildingPhysicsSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static BuildingPhysicsPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsSwitch() {
if (modelPackage == null) {
modelPackage = BuildingPhysicsPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG: {
BuildingPhysicsCatalog buildingPhysicsCatalog = (BuildingPhysicsCatalog) theEObject;
T result = caseBuildingPhysicsCatalog(buildingPhysicsCatalog);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.WINDOW_TYPE: {
WindowType windowType = (WindowType) theEObject;
T result = caseWindowType(windowType);
if (result == null)
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);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.MATERIAL_CATEGORY: {
MaterialCategory materialCategory = (MaterialCategory) theEObject;
T result = caseMaterialCategory(materialCategory);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case BuildingPhysicsPackage.MATERIAL: {
Material material = (Material) theEObject;
T result = caseMaterial(material);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* 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 caseBuildingPhysicsCatalog(BuildingPhysicsCatalog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Window Type</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 Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseWindowType(WindowType object) {
return null;
}
/**
* 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>'.
* <!-- 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>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMaterialCatalog(MaterialCatalog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Material 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 Category</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMaterialCategory(MaterialCategory object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Material</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</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMaterial(Material object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //BuildingPhysicsSwitch
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