From e904f9d4b1d2d15ab4ec6d72ee881f4c7de34eef Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 15 May 2019 13:46:38 -0400 Subject: Formalize CPS case study for optimization --- .../domains/cps/ApplicationInstance.java | 110 ++ .../dslreasoner/domains/cps/ApplicationType.java | 61 + .../inf/dslreasoner/domains/cps/CpsFactory.java | 105 ++ .../inf/dslreasoner/domains/cps/CpsPackage.java | 1253 ++++++++++++++++++++ .../domains/cps/CyberPhysicalSystem.java | 112 ++ .../inf/dslreasoner/domains/cps/HostInstance.java | 141 +++ .../mit/inf/dslreasoner/domains/cps/HostType.java | 125 ++ .../mit/inf/dslreasoner/domains/cps/Request.java | 44 + .../inf/dslreasoner/domains/cps/Requirement.java | 127 ++ .../domains/cps/ResourceRequirement.java | 104 ++ .../domains/cps/impl/ApplicationInstanceImpl.java | 405 +++++++ .../domains/cps/impl/ApplicationTypeImpl.java | 209 ++++ .../domains/cps/impl/CpsFactoryImpl.java | 188 +++ .../domains/cps/impl/CpsPackageImpl.java | 765 ++++++++++++ .../domains/cps/impl/CyberPhysicalSystemImpl.java | 289 +++++ .../domains/cps/impl/HostInstanceImpl.java | 355 ++++++ .../dslreasoner/domains/cps/impl/HostTypeImpl.java | 356 ++++++ .../dslreasoner/domains/cps/impl/RequestImpl.java | 169 +++ .../domains/cps/impl/RequirementImpl.java | 387 ++++++ .../domains/cps/impl/ResourceRequirementImpl.java | 291 +++++ .../domains/cps/util/CpsAdapterFactory.java | 252 ++++ .../dslreasoner/domains/cps/util/CpsSwitch.java | 266 +++++ 22 files changed, 6114 insertions(+) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationType.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsFactory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostType.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Request.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Requirement.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ResourceRequirement.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationTypeImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsFactoryImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostTypeImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequestImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequirementImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ResourceRequirementImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsAdapterFactory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsSwitch.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationInstance.java new file mode 100644 index 00000000..dc9426f2 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationInstance.java @@ -0,0 +1,110 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Application Instance'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationInstance() + * @model + * @generated + */ +public interface ApplicationInstance extends EObject { + /** + * Returns the value of the 'Requirement' reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getInstances Instances}'. + * + *

+ * If the meaning of the 'Requirement' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Requirement' reference. + * @see #setRequirement(Requirement) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationInstance_Requirement() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getInstances + * @model opposite="instances" + * @generated + */ + Requirement getRequirement(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getRequirement Requirement}' reference. + * + * + * @param value the new value of the 'Requirement' reference. + * @see #getRequirement() + * @generated + */ + void setRequirement(Requirement value); + + /** + * Returns the value of the 'Type' container reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getInstances Instances}'. + * + *

+ * If the meaning of the 'Type' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' container reference. + * @see #setType(ApplicationType) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationInstance_Type() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getInstances + * @model opposite="instances" required="true" transient="false" + * @generated + */ + ApplicationType getType(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getType Type}' container reference. + * + * + * @param value the new value of the 'Type' container reference. + * @see #getType() + * @generated + */ + void setType(ApplicationType value); + + /** + * Returns the value of the 'Allocated To' reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications Applications}'. + * + *

+ * If the meaning of the 'Allocated To' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Allocated To' reference. + * @see #setAllocatedTo(HostInstance) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationInstance_AllocatedTo() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications + * @model opposite="applications" required="true" + * @generated + */ + HostInstance getAllocatedTo(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getAllocatedTo Allocated To}' reference. + * + * + * @param value the new value of the 'Allocated To' reference. + * @see #getAllocatedTo() + * @generated + */ + void setAllocatedTo(HostInstance value); + +} // ApplicationInstance diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationType.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationType.java new file mode 100644 index 00000000..f44287ae --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ApplicationType.java @@ -0,0 +1,61 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Application Type'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationType() + * @model + * @generated + */ +public interface ApplicationType extends EObject { + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getType Type}'. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationType_Instances() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getType + * @model opposite="type" containment="true" + * @generated + */ + EList getInstances(); + + /** + * Returns the value of the 'Requirements' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement}. + * + *

+ * If the meaning of the 'Requirements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Requirements' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getApplicationType_Requirements() + * @model containment="true" + * @generated + */ + EList getRequirements(); + +} // ApplicationType diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsFactory.java new file mode 100644 index 00000000..93a5fc95 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsFactory.java @@ -0,0 +1,105 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage + * @generated + */ +public interface CpsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CpsFactory eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsFactoryImpl.init(); + + /** + * Returns a new object of class 'Cyber Physical System'. + * + * + * @return a new object of class 'Cyber Physical System'. + * @generated + */ + CyberPhysicalSystem createCyberPhysicalSystem(); + + /** + * Returns a new object of class 'Application Type'. + * + * + * @return a new object of class 'Application Type'. + * @generated + */ + ApplicationType createApplicationType(); + + /** + * Returns a new object of class 'Host Type'. + * + * + * @return a new object of class 'Host Type'. + * @generated + */ + HostType createHostType(); + + /** + * Returns a new object of class 'Request'. + * + * + * @return a new object of class 'Request'. + * @generated + */ + Request createRequest(); + + /** + * Returns a new object of class 'Requirement'. + * + * + * @return a new object of class 'Requirement'. + * @generated + */ + Requirement createRequirement(); + + /** + * Returns a new object of class 'Application Instance'. + * + * + * @return a new object of class 'Application Instance'. + * @generated + */ + ApplicationInstance createApplicationInstance(); + + /** + * Returns a new object of class 'Resource Requirement'. + * + * + * @return a new object of class 'Resource Requirement'. + * @generated + */ + ResourceRequirement createResourceRequirement(); + + /** + * Returns a new object of class 'Host Instance'. + * + * + * @return a new object of class 'Host Instance'. + * @generated + */ + HostInstance createHostInstance(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CpsPackage getCpsPackage(); + +} //CpsFactory diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java new file mode 100644 index 00000000..2d7e0660 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java @@ -0,0 +1,1253 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" + * @generated + */ +public interface CpsPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "cps"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.example.org/cps"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "cps"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CpsPackage eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl.init(); + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl Cyber Physical System}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getCyberPhysicalSystem() + * @generated + */ + int CYBER_PHYSICAL_SYSTEM = 0; + + /** + * The feature id for the 'Requests' containment reference list. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM__REQUESTS = 0; + + /** + * The feature id for the 'Application Types' containment reference list. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES = 1; + + /** + * The feature id for the 'Host Types' containment reference list. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM__HOST_TYPES = 2; + + /** + * The feature id for the 'Hosts' reference list. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM__HOSTS = 3; + + /** + * The feature id for the 'Applications' reference list. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM__APPLICATIONS = 4; + + /** + * The number of structural features of the 'Cyber Physical System' class. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM_FEATURE_COUNT = 5; + + /** + * The number of operations of the 'Cyber Physical System' class. + * + * + * @generated + * @ordered + */ + int CYBER_PHYSICAL_SYSTEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl Application Type}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getApplicationType() + * @generated + */ + int APPLICATION_TYPE = 1; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int APPLICATION_TYPE__INSTANCES = 0; + + /** + * The feature id for the 'Requirements' containment reference list. + * + * + * @generated + * @ordered + */ + int APPLICATION_TYPE__REQUIREMENTS = 1; + + /** + * The number of structural features of the 'Application Type' class. + * + * + * @generated + * @ordered + */ + int APPLICATION_TYPE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Application Type' class. + * + * + * @generated + * @ordered + */ + int APPLICATION_TYPE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl Host Type}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getHostType() + * @generated + */ + int HOST_TYPE = 2; + + /** + * The feature id for the 'Default Memory' attribute. + * + * + * @generated + * @ordered + */ + int HOST_TYPE__DEFAULT_MEMORY = 0; + + /** + * The feature id for the 'Default Hdd' attribute. + * + * + * @generated + * @ordered + */ + int HOST_TYPE__DEFAULT_HDD = 1; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int HOST_TYPE__INSTANCES = 2; + + /** + * The feature id for the 'Cost' attribute. + * + * + * @generated + * @ordered + */ + int HOST_TYPE__COST = 3; + + /** + * The number of structural features of the 'Host Type' class. + * + * + * @generated + * @ordered + */ + int HOST_TYPE_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Host Type' class. + * + * + * @generated + * @ordered + */ + int HOST_TYPE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequestImpl Request}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequestImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getRequest() + * @generated + */ + int REQUEST = 3; + + /** + * The feature id for the 'Requirements' containment reference list. + * + * + * @generated + * @ordered + */ + int REQUEST__REQUIREMENTS = 0; + + /** + * The number of structural features of the 'Request' class. + * + * + * @generated + * @ordered + */ + int REQUEST_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Request' class. + * + * + * @generated + * @ordered + */ + int REQUEST_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl Requirement}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getRequirement() + * @generated + */ + int REQUIREMENT = 4; + + /** + * The feature id for the 'Request' container reference. + * + * + * @generated + * @ordered + */ + int REQUIREMENT__REQUEST = 0; + + /** + * The feature id for the 'Count' attribute. + * + * + * @generated + * @ordered + */ + int REQUIREMENT__COUNT = 1; + + /** + * The feature id for the 'Type' reference. + * + * + * @generated + * @ordered + */ + int REQUIREMENT__TYPE = 2; + + /** + * The feature id for the 'Instances' reference list. + * + * + * @generated + * @ordered + */ + int REQUIREMENT__INSTANCES = 3; + + /** + * The number of structural features of the 'Requirement' class. + * + * + * @generated + * @ordered + */ + int REQUIREMENT_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Requirement' class. + * + * + * @generated + * @ordered + */ + int REQUIREMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl Application Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getApplicationInstance() + * @generated + */ + int APPLICATION_INSTANCE = 5; + + /** + * The feature id for the 'Requirement' reference. + * + * + * @generated + * @ordered + */ + int APPLICATION_INSTANCE__REQUIREMENT = 0; + + /** + * The feature id for the 'Type' container reference. + * + * + * @generated + * @ordered + */ + int APPLICATION_INSTANCE__TYPE = 1; + + /** + * The feature id for the 'Allocated To' reference. + * + * + * @generated + * @ordered + */ + int APPLICATION_INSTANCE__ALLOCATED_TO = 2; + + /** + * The number of structural features of the 'Application Instance' class. + * + * + * @generated + * @ordered + */ + int APPLICATION_INSTANCE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Application Instance' class. + * + * + * @generated + * @ordered + */ + int APPLICATION_INSTANCE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl Resource Requirement}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getResourceRequirement() + * @generated + */ + int RESOURCE_REQUIREMENT = 6; + + /** + * The feature id for the 'Required Memory' attribute. + * + * + * @generated + * @ordered + */ + int RESOURCE_REQUIREMENT__REQUIRED_MEMORY = 0; + + /** + * The feature id for the 'Required Hdd' attribute. + * + * + * @generated + * @ordered + */ + int RESOURCE_REQUIREMENT__REQUIRED_HDD = 1; + + /** + * The feature id for the 'Host Type' reference. + * + * + * @generated + * @ordered + */ + int RESOURCE_REQUIREMENT__HOST_TYPE = 2; + + /** + * The number of structural features of the 'Resource Requirement' class. + * + * + * @generated + * @ordered + */ + int RESOURCE_REQUIREMENT_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Resource Requirement' class. + * + * + * @generated + * @ordered + */ + int RESOURCE_REQUIREMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl Host Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getHostInstance() + * @generated + */ + int HOST_INSTANCE = 7; + + /** + * The feature id for the 'Type' container reference. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__TYPE = 0; + + /** + * The feature id for the 'Available Memory' attribute. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__AVAILABLE_MEMORY = 1; + + /** + * The feature id for the 'Available Hdd' attribute. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__AVAILABLE_HDD = 2; + + /** + * The feature id for the 'Total Memory' attribute. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__TOTAL_MEMORY = 3; + + /** + * The feature id for the 'Total Hdd' attribute. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__TOTAL_HDD = 4; + + /** + * The feature id for the 'Applications' reference list. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE__APPLICATIONS = 5; + + /** + * The number of structural features of the 'Host Instance' class. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Host Instance' class. + * + * + * @generated + * @ordered + */ + int HOST_INSTANCE_OPERATION_COUNT = 0; + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem Cyber Physical System}'. + * + * + * @return the meta object for class 'Cyber Physical System'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem + * @generated + */ + EClass getCyberPhysicalSystem(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getRequests Requests}'. + * + * + * @return the meta object for the containment reference list 'Requests'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getRequests() + * @see #getCyberPhysicalSystem() + * @generated + */ + EReference getCyberPhysicalSystem_Requests(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplicationTypes Application Types}'. + * + * + * @return the meta object for the containment reference list 'Application Types'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplicationTypes() + * @see #getCyberPhysicalSystem() + * @generated + */ + EReference getCyberPhysicalSystem_ApplicationTypes(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHostTypes Host Types}'. + * + * + * @return the meta object for the containment reference list 'Host Types'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHostTypes() + * @see #getCyberPhysicalSystem() + * @generated + */ + EReference getCyberPhysicalSystem_HostTypes(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts Hosts}'. + * + * + * @return the meta object for the reference list 'Hosts'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts() + * @see #getCyberPhysicalSystem() + * @generated + */ + EReference getCyberPhysicalSystem_Hosts(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications Applications}'. + * + * + * @return the meta object for the reference list 'Applications'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications() + * @see #getCyberPhysicalSystem() + * @generated + */ + EReference getCyberPhysicalSystem_Applications(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType Application Type}'. + * + * + * @return the meta object for class 'Application Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType + * @generated + */ + EClass getApplicationType(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getInstances() + * @see #getApplicationType() + * @generated + */ + EReference getApplicationType_Instances(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getRequirements Requirements}'. + * + * + * @return the meta object for the containment reference list 'Requirements'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType#getRequirements() + * @see #getApplicationType() + * @generated + */ + EReference getApplicationType_Requirements(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType Host Type}'. + * + * + * @return the meta object for class 'Host Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType + * @generated + */ + EClass getHostType(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultMemory Default Memory}'. + * + * + * @return the meta object for the attribute 'Default Memory'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultMemory() + * @see #getHostType() + * @generated + */ + EAttribute getHostType_DefaultMemory(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultHdd Default Hdd}'. + * + * + * @return the meta object for the attribute 'Default Hdd'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultHdd() + * @see #getHostType() + * @generated + */ + EAttribute getHostType_DefaultHdd(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getInstances() + * @see #getHostType() + * @generated + */ + EReference getHostType_Instances(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getCost Cost}'. + * + * + * @return the meta object for the attribute 'Cost'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getCost() + * @see #getHostType() + * @generated + */ + EAttribute getHostType_Cost(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Request Request}'. + * + * + * @return the meta object for class 'Request'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Request + * @generated + */ + EClass getRequest(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Request#getRequirements Requirements}'. + * + * + * @return the meta object for the containment reference list 'Requirements'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Request#getRequirements() + * @see #getRequest() + * @generated + */ + EReference getRequest_Requirements(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement Requirement}'. + * + * + * @return the meta object for class 'Requirement'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement + * @generated + */ + EClass getRequirement(); + + /** + * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest Request}'. + * + * + * @return the meta object for the container reference 'Request'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest() + * @see #getRequirement() + * @generated + */ + EReference getRequirement_Request(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getCount Count}'. + * + * + * @return the meta object for the attribute 'Count'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getCount() + * @see #getRequirement() + * @generated + */ + EAttribute getRequirement_Count(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getType Type}'. + * + * + * @return the meta object for the reference 'Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getType() + * @see #getRequirement() + * @generated + */ + EReference getRequirement_Type(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getInstances Instances}'. + * + * + * @return the meta object for the reference list 'Instances'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getInstances() + * @see #getRequirement() + * @generated + */ + EReference getRequirement_Instances(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance Application Instance}'. + * + * + * @return the meta object for class 'Application Instance'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance + * @generated + */ + EClass getApplicationInstance(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getRequirement Requirement}'. + * + * + * @return the meta object for the reference 'Requirement'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getRequirement() + * @see #getApplicationInstance() + * @generated + */ + EReference getApplicationInstance_Requirement(); + + /** + * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getType Type}'. + * + * + * @return the meta object for the container reference 'Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getType() + * @see #getApplicationInstance() + * @generated + */ + EReference getApplicationInstance_Type(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getAllocatedTo Allocated To}'. + * + * + * @return the meta object for the reference 'Allocated To'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getAllocatedTo() + * @see #getApplicationInstance() + * @generated + */ + EReference getApplicationInstance_AllocatedTo(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement Resource Requirement}'. + * + * + * @return the meta object for class 'Resource Requirement'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement + * @generated + */ + EClass getResourceRequirement(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredMemory Required Memory}'. + * + * + * @return the meta object for the attribute 'Required Memory'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredMemory() + * @see #getResourceRequirement() + * @generated + */ + EAttribute getResourceRequirement_RequiredMemory(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredHdd Required Hdd}'. + * + * + * @return the meta object for the attribute 'Required Hdd'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredHdd() + * @see #getResourceRequirement() + * @generated + */ + EAttribute getResourceRequirement_RequiredHdd(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getHostType Host Type}'. + * + * + * @return the meta object for the reference 'Host Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getHostType() + * @see #getResourceRequirement() + * @generated + */ + EReference getResourceRequirement_HostType(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance Host Instance}'. + * + * + * @return the meta object for class 'Host Instance'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance + * @generated + */ + EClass getHostInstance(); + + /** + * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType Type}'. + * + * + * @return the meta object for the container reference 'Type'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType() + * @see #getHostInstance() + * @generated + */ + EReference getHostInstance_Type(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory Available Memory}'. + * + * + * @return the meta object for the attribute 'Available Memory'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory() + * @see #getHostInstance() + * @generated + */ + EAttribute getHostInstance_AvailableMemory(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd Available Hdd}'. + * + * + * @return the meta object for the attribute 'Available Hdd'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd() + * @see #getHostInstance() + * @generated + */ + EAttribute getHostInstance_AvailableHdd(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory Total Memory}'. + * + * + * @return the meta object for the attribute 'Total Memory'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory() + * @see #getHostInstance() + * @generated + */ + EAttribute getHostInstance_TotalMemory(); + + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd Total Hdd}'. + * + * + * @return the meta object for the attribute 'Total Hdd'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd() + * @see #getHostInstance() + * @generated + */ + EAttribute getHostInstance_TotalHdd(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications Applications}'. + * + * + * @return the meta object for the reference list 'Applications'. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications() + * @see #getHostInstance() + * @generated + */ + EReference getHostInstance_Applications(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CpsFactory getCpsFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl Cyber Physical System}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getCyberPhysicalSystem() + * @generated + */ + EClass CYBER_PHYSICAL_SYSTEM = eINSTANCE.getCyberPhysicalSystem(); + + /** + * The meta object literal for the 'Requests' containment reference list feature. + * + * + * @generated + */ + EReference CYBER_PHYSICAL_SYSTEM__REQUESTS = eINSTANCE.getCyberPhysicalSystem_Requests(); + + /** + * The meta object literal for the 'Application Types' containment reference list feature. + * + * + * @generated + */ + EReference CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES = eINSTANCE.getCyberPhysicalSystem_ApplicationTypes(); + + /** + * The meta object literal for the 'Host Types' containment reference list feature. + * + * + * @generated + */ + EReference CYBER_PHYSICAL_SYSTEM__HOST_TYPES = eINSTANCE.getCyberPhysicalSystem_HostTypes(); + + /** + * The meta object literal for the 'Hosts' reference list feature. + * + * + * @generated + */ + EReference CYBER_PHYSICAL_SYSTEM__HOSTS = eINSTANCE.getCyberPhysicalSystem_Hosts(); + + /** + * The meta object literal for the 'Applications' reference list feature. + * + * + * @generated + */ + EReference CYBER_PHYSICAL_SYSTEM__APPLICATIONS = eINSTANCE.getCyberPhysicalSystem_Applications(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl Application Type}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getApplicationType() + * @generated + */ + EClass APPLICATION_TYPE = eINSTANCE.getApplicationType(); + + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference APPLICATION_TYPE__INSTANCES = eINSTANCE.getApplicationType_Instances(); + + /** + * The meta object literal for the 'Requirements' containment reference list feature. + * + * + * @generated + */ + EReference APPLICATION_TYPE__REQUIREMENTS = eINSTANCE.getApplicationType_Requirements(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl Host Type}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getHostType() + * @generated + */ + EClass HOST_TYPE = eINSTANCE.getHostType(); + + /** + * The meta object literal for the 'Default Memory' attribute feature. + * + * + * @generated + */ + EAttribute HOST_TYPE__DEFAULT_MEMORY = eINSTANCE.getHostType_DefaultMemory(); + + /** + * The meta object literal for the 'Default Hdd' attribute feature. + * + * + * @generated + */ + EAttribute HOST_TYPE__DEFAULT_HDD = eINSTANCE.getHostType_DefaultHdd(); + + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference HOST_TYPE__INSTANCES = eINSTANCE.getHostType_Instances(); + + /** + * The meta object literal for the 'Cost' attribute feature. + * + * + * @generated + */ + EAttribute HOST_TYPE__COST = eINSTANCE.getHostType_Cost(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequestImpl Request}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequestImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getRequest() + * @generated + */ + EClass REQUEST = eINSTANCE.getRequest(); + + /** + * The meta object literal for the 'Requirements' containment reference list feature. + * + * + * @generated + */ + EReference REQUEST__REQUIREMENTS = eINSTANCE.getRequest_Requirements(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl Requirement}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getRequirement() + * @generated + */ + EClass REQUIREMENT = eINSTANCE.getRequirement(); + + /** + * The meta object literal for the 'Request' container reference feature. + * + * + * @generated + */ + EReference REQUIREMENT__REQUEST = eINSTANCE.getRequirement_Request(); + + /** + * The meta object literal for the 'Count' attribute feature. + * + * + * @generated + */ + EAttribute REQUIREMENT__COUNT = eINSTANCE.getRequirement_Count(); + + /** + * The meta object literal for the 'Type' reference feature. + * + * + * @generated + */ + EReference REQUIREMENT__TYPE = eINSTANCE.getRequirement_Type(); + + /** + * The meta object literal for the 'Instances' reference list feature. + * + * + * @generated + */ + EReference REQUIREMENT__INSTANCES = eINSTANCE.getRequirement_Instances(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl Application Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getApplicationInstance() + * @generated + */ + EClass APPLICATION_INSTANCE = eINSTANCE.getApplicationInstance(); + + /** + * The meta object literal for the 'Requirement' reference feature. + * + * + * @generated + */ + EReference APPLICATION_INSTANCE__REQUIREMENT = eINSTANCE.getApplicationInstance_Requirement(); + + /** + * The meta object literal for the 'Type' container reference feature. + * + * + * @generated + */ + EReference APPLICATION_INSTANCE__TYPE = eINSTANCE.getApplicationInstance_Type(); + + /** + * The meta object literal for the 'Allocated To' reference feature. + * + * + * @generated + */ + EReference APPLICATION_INSTANCE__ALLOCATED_TO = eINSTANCE.getApplicationInstance_AllocatedTo(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl Resource Requirement}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getResourceRequirement() + * @generated + */ + EClass RESOURCE_REQUIREMENT = eINSTANCE.getResourceRequirement(); + + /** + * The meta object literal for the 'Required Memory' attribute feature. + * + * + * @generated + */ + EAttribute RESOURCE_REQUIREMENT__REQUIRED_MEMORY = eINSTANCE.getResourceRequirement_RequiredMemory(); + + /** + * The meta object literal for the 'Required Hdd' attribute feature. + * + * + * @generated + */ + EAttribute RESOURCE_REQUIREMENT__REQUIRED_HDD = eINSTANCE.getResourceRequirement_RequiredHdd(); + + /** + * The meta object literal for the 'Host Type' reference feature. + * + * + * @generated + */ + EReference RESOURCE_REQUIREMENT__HOST_TYPE = eINSTANCE.getResourceRequirement_HostType(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl Host Instance}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl + * @see hu.bme.mit.inf.dslreasoner.domains.cps.impl.CpsPackageImpl#getHostInstance() + * @generated + */ + EClass HOST_INSTANCE = eINSTANCE.getHostInstance(); + + /** + * The meta object literal for the 'Type' container reference feature. + * + * + * @generated + */ + EReference HOST_INSTANCE__TYPE = eINSTANCE.getHostInstance_Type(); + + /** + * The meta object literal for the 'Available Memory' attribute feature. + * + * + * @generated + */ + EAttribute HOST_INSTANCE__AVAILABLE_MEMORY = eINSTANCE.getHostInstance_AvailableMemory(); + + /** + * The meta object literal for the 'Available Hdd' attribute feature. + * + * + * @generated + */ + EAttribute HOST_INSTANCE__AVAILABLE_HDD = eINSTANCE.getHostInstance_AvailableHdd(); + + /** + * The meta object literal for the 'Total Memory' attribute feature. + * + * + * @generated + */ + EAttribute HOST_INSTANCE__TOTAL_MEMORY = eINSTANCE.getHostInstance_TotalMemory(); + + /** + * The meta object literal for the 'Total Hdd' attribute feature. + * + * + * @generated + */ + EAttribute HOST_INSTANCE__TOTAL_HDD = eINSTANCE.getHostInstance_TotalHdd(); + + /** + * The meta object literal for the 'Applications' reference list feature. + * + * + * @generated + */ + EReference HOST_INSTANCE__APPLICATIONS = eINSTANCE.getHostInstance_Applications(); + + } + +} //CpsPackage diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java new file mode 100644 index 00000000..541916ba --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java @@ -0,0 +1,112 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Cyber Physical System'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getRequests Requests}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplicationTypes Application Types}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHostTypes Host Types}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts Hosts}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications Applications}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem() + * @model + * @generated + */ +public interface CyberPhysicalSystem extends EObject { + /** + * Returns the value of the 'Requests' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.Request}. + * + *

+ * If the meaning of the 'Requests' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Requests' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_Requests() + * @model containment="true" + * @generated + */ + EList getRequests(); + + /** + * Returns the value of the 'Application Types' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType}. + * + *

+ * If the meaning of the 'Application Types' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Application Types' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_ApplicationTypes() + * @model containment="true" + * @generated + */ + EList getApplicationTypes(); + + /** + * Returns the value of the 'Host Types' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType}. + * + *

+ * If the meaning of the 'Host Types' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Host Types' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_HostTypes() + * @model containment="true" + * @generated + */ + EList getHostTypes(); + + /** + * Returns the value of the 'Hosts' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance}. + * + *

+ * If the meaning of the 'Hosts' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Hosts' reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_Hosts() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts'" + * @generated + */ + EList getHosts(); + + /** + * Returns the value of the 'Applications' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. + * + *

+ * If the meaning of the 'Applications' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Applications' reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_Applications() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications'" + * @generated + */ + EList getApplications(); + +} // CyberPhysicalSystem diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java new file mode 100644 index 00000000..43379e0f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java @@ -0,0 +1,141 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Host Instance'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType Type}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory Available Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd Available Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory Total Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd Total Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications Applications}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance() + * @model + * @generated + */ +public interface HostInstance extends EObject { + /** + * Returns the value of the 'Type' container reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getInstances Instances}'. + * + *

+ * If the meaning of the 'Type' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' container reference. + * @see #setType(HostType) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_Type() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getInstances + * @model opposite="instances" required="true" transient="false" + * @generated + */ + HostType getType(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType Type}' container reference. + * + * + * @param value the new value of the 'Type' container reference. + * @see #getType() + * @generated + */ + void setType(HostType value); + + /** + * Returns the value of the 'Available Memory' attribute. + * + *

+ * If the meaning of the 'Available Memory' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Available Memory' attribute. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_AvailableMemory() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory'" + * @generated + */ + int getAvailableMemory(); + + /** + * Returns the value of the 'Available Hdd' attribute. + * + *

+ * If the meaning of the 'Available Hdd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Available Hdd' attribute. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_AvailableHdd() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd'" + * @generated + */ + int getAvailableHdd(); + + /** + * Returns the value of the 'Total Memory' attribute. + * + *

+ * If the meaning of the 'Total Memory' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Total Memory' attribute. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_TotalMemory() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory'" + * @generated + */ + int getTotalMemory(); + + /** + * Returns the value of the 'Total Hdd' attribute. + * + *

+ * If the meaning of the 'Total Hdd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Total Hdd' attribute. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_TotalHdd() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd'" + * @generated + */ + int getTotalHdd(); + + /** + * Returns the value of the 'Applications' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getAllocatedTo Allocated To}'. + * + *

+ * If the meaning of the 'Applications' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Applications' reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_Applications() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getAllocatedTo + * @model opposite="allocatedTo" + * @generated + */ + EList getApplications(); + +} // HostInstance diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostType.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostType.java new file mode 100644 index 00000000..45201930 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostType.java @@ -0,0 +1,125 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Host Type'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultMemory Default Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultHdd Default Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getInstances Instances}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getCost Cost}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostType() + * @model + * @generated + */ +public interface HostType extends EObject { + /** + * Returns the value of the 'Default Memory' attribute. + * + *

+ * If the meaning of the 'Default Memory' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Default Memory' attribute. + * @see #setDefaultMemory(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostType_DefaultMemory() + * @model required="true" + * @generated + */ + int getDefaultMemory(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultMemory Default Memory}' attribute. + * + * + * @param value the new value of the 'Default Memory' attribute. + * @see #getDefaultMemory() + * @generated + */ + void setDefaultMemory(int value); + + /** + * Returns the value of the 'Default Hdd' attribute. + * + *

+ * If the meaning of the 'Default Hdd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Default Hdd' attribute. + * @see #setDefaultHdd(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostType_DefaultHdd() + * @model required="true" + * @generated + */ + int getDefaultHdd(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getDefaultHdd Default Hdd}' attribute. + * + * + * @param value the new value of the 'Default Hdd' attribute. + * @see #getDefaultHdd() + * @generated + */ + void setDefaultHdd(int value); + + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType Type}'. + * + *

+ * If the meaning of the 'Instances' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostType_Instances() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType + * @model opposite="type" containment="true" + * @generated + */ + EList getInstances(); + + /** + * Returns the value of the 'Cost' attribute. + * + *

+ * If the meaning of the 'Cost' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cost' attribute. + * @see #setCost(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostType_Cost() + * @model required="true" + * @generated + */ + int getCost(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType#getCost Cost}' attribute. + * + * + * @param value the new value of the 'Cost' attribute. + * @see #getCost() + * @generated + */ + void setCost(int value); + +} // HostType diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Request.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Request.java new file mode 100644 index 00000000..261562a0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Request.java @@ -0,0 +1,44 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Request'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.Request#getRequirements Requirements}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequest() + * @model + * @generated + */ +public interface Request extends EObject { + /** + * Returns the value of the 'Requirements' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest Request}'. + * + *

+ * If the meaning of the 'Requirements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Requirements' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequest_Requirements() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest + * @model opposite="request" containment="true" + * @generated + */ + EList getRequirements(); + +} // Request diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Requirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Requirement.java new file mode 100644 index 00000000..a1d494e4 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/Requirement.java @@ -0,0 +1,127 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Requirement'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest Request}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getCount Count}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getType Type}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getInstances Instances}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequirement() + * @model + * @generated + */ +public interface Requirement extends EObject { + /** + * Returns the value of the 'Request' container reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Request#getRequirements Requirements}'. + * + *

+ * If the meaning of the 'Request' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Request' container reference. + * @see #setRequest(Request) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequirement_Request() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Request#getRequirements + * @model opposite="requirements" required="true" transient="false" + * @generated + */ + Request getRequest(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getRequest Request}' container reference. + * + * + * @param value the new value of the 'Request' container reference. + * @see #getRequest() + * @generated + */ + void setRequest(Request value); + + /** + * Returns the value of the 'Count' attribute. + * + *

+ * If the meaning of the 'Count' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Count' attribute. + * @see #setCount(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequirement_Count() + * @model required="true" + * @generated + */ + int getCount(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getCount Count}' attribute. + * + * + * @param value the new value of the 'Count' attribute. + * @see #getCount() + * @generated + */ + void setCount(int value); + + /** + * Returns the value of the 'Type' reference. + * + *

+ * If the meaning of the 'Type' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' reference. + * @see #setType(ApplicationType) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequirement_Type() + * @model + * @generated + */ + ApplicationType getType(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement#getType Type}' reference. + * + * + * @param value the new value of the 'Type' reference. + * @see #getType() + * @generated + */ + void setType(ApplicationType value); + + /** + * Returns the value of the 'Instances' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getRequirement Requirement}'. + * + *

+ * If the meaning of the 'Instances' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instances' reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getRequirement_Instances() + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance#getRequirement + * @model opposite="requirement" + * @generated + */ + EList getInstances(); + +} // Requirement diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ResourceRequirement.java new file mode 100644 index 00000000..a99cc12e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/ResourceRequirement.java @@ -0,0 +1,104 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Resource Requirement'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredMemory Required Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredHdd Required Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getHostType Host Type}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getResourceRequirement() + * @model + * @generated + */ +public interface ResourceRequirement extends EObject { + /** + * Returns the value of the 'Required Memory' attribute. + * + *

+ * If the meaning of the 'Required Memory' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Required Memory' attribute. + * @see #setRequiredMemory(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getResourceRequirement_RequiredMemory() + * @model required="true" + * @generated + */ + int getRequiredMemory(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredMemory Required Memory}' attribute. + * + * + * @param value the new value of the 'Required Memory' attribute. + * @see #getRequiredMemory() + * @generated + */ + void setRequiredMemory(int value); + + /** + * Returns the value of the 'Required Hdd' attribute. + * + *

+ * If the meaning of the 'Required Hdd' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Required Hdd' attribute. + * @see #setRequiredHdd(int) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getResourceRequirement_RequiredHdd() + * @model required="true" + * @generated + */ + int getRequiredHdd(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getRequiredHdd Required Hdd}' attribute. + * + * + * @param value the new value of the 'Required Hdd' attribute. + * @see #getRequiredHdd() + * @generated + */ + void setRequiredHdd(int value); + + /** + * Returns the value of the 'Host Type' reference. + * + *

+ * If the meaning of the 'Host Type' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Host Type' reference. + * @see #setHostType(HostType) + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getResourceRequirement_HostType() + * @model required="true" + * @generated + */ + HostType getHostType(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement#getHostType Host Type}' reference. + * + * + * @param value the new value of the 'Host Type' reference. + * @see #getHostType() + * @generated + */ + void setHostType(HostType value); + +} // ResourceRequirement diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java new file mode 100644 index 00000000..cea2d6f4 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationInstanceImpl.java @@ -0,0 +1,405 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; + +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; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Application Instance'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getRequirement Requirement}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getType Type}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationInstanceImpl#getAllocatedTo Allocated To}
  • + *
+ * + * @generated + */ +public class ApplicationInstanceImpl extends MinimalEObjectImpl.Container implements ApplicationInstance { + /** + * The cached value of the '{@link #getRequirement() Requirement}' reference. + * + * + * @see #getRequirement() + * @generated + * @ordered + */ + protected Requirement requirement; + + /** + * The cached value of the '{@link #getAllocatedTo() Allocated To}' reference. + * + * + * @see #getAllocatedTo() + * @generated + * @ordered + */ + protected HostInstance allocatedTo; + + /** + * + * + * @generated + */ + protected ApplicationInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.APPLICATION_INSTANCE; + } + + /** + * + * + * @generated + */ + @Override + public Requirement getRequirement() { + if (requirement != null && requirement.eIsProxy()) { + InternalEObject oldRequirement = (InternalEObject) requirement; + requirement = (Requirement) eResolveProxy(oldRequirement); + if (requirement != oldRequirement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, oldRequirement, requirement)); + } + } + return requirement; + } + + /** + * + * + * @generated + */ + public Requirement basicGetRequirement() { + return requirement; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRequirement(Requirement newRequirement, NotificationChain msgs) { + Requirement oldRequirement = requirement; + requirement = newRequirement; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, oldRequirement, newRequirement); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setRequirement(Requirement newRequirement) { + if (newRequirement != requirement) { + NotificationChain msgs = null; + if (requirement != null) + msgs = ((InternalEObject) requirement).eInverseRemove(this, CpsPackage.REQUIREMENT__INSTANCES, + Requirement.class, msgs); + if (newRequirement != null) + msgs = ((InternalEObject) newRequirement).eInverseAdd(this, CpsPackage.REQUIREMENT__INSTANCES, + Requirement.class, msgs); + msgs = basicSetRequirement(newRequirement, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__REQUIREMENT, + newRequirement, newRequirement)); + } + + /** + * + * + * @generated + */ + @Override + public ApplicationType getType() { + if (eContainerFeatureID() != CpsPackage.APPLICATION_INSTANCE__TYPE) + return null; + return (ApplicationType) eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetType(ApplicationType newType, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newType, CpsPackage.APPLICATION_INSTANCE__TYPE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setType(ApplicationType newType) { + if (newType != eInternalContainer() + || (eContainerFeatureID() != CpsPackage.APPLICATION_INSTANCE__TYPE && newType != null)) { + if (EcoreUtil.isAncestor(this, newType)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newType != null) + msgs = ((InternalEObject) newType).eInverseAdd(this, CpsPackage.APPLICATION_TYPE__INSTANCES, + ApplicationType.class, msgs); + msgs = basicSetType(newType, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__TYPE, newType, + newType)); + } + + /** + * + * + * @generated + */ + @Override + public HostInstance getAllocatedTo() { + if (allocatedTo != null && allocatedTo.eIsProxy()) { + InternalEObject oldAllocatedTo = (InternalEObject) allocatedTo; + allocatedTo = (HostInstance) eResolveProxy(oldAllocatedTo); + if (allocatedTo != oldAllocatedTo) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, oldAllocatedTo, allocatedTo)); + } + } + return allocatedTo; + } + + /** + * + * + * @generated + */ + public HostInstance basicGetAllocatedTo() { + return allocatedTo; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAllocatedTo(HostInstance newAllocatedTo, NotificationChain msgs) { + HostInstance oldAllocatedTo = allocatedTo; + allocatedTo = newAllocatedTo; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, oldAllocatedTo, newAllocatedTo); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setAllocatedTo(HostInstance newAllocatedTo) { + if (newAllocatedTo != allocatedTo) { + NotificationChain msgs = null; + if (allocatedTo != null) + msgs = ((InternalEObject) allocatedTo).eInverseRemove(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, + HostInstance.class, msgs); + if (newAllocatedTo != null) + msgs = ((InternalEObject) newAllocatedTo).eInverseAdd(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, + HostInstance.class, msgs); + msgs = basicSetAllocatedTo(newAllocatedTo, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO, + newAllocatedTo, newAllocatedTo)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + if (requirement != null) + msgs = ((InternalEObject) requirement).eInverseRemove(this, CpsPackage.REQUIREMENT__INSTANCES, + Requirement.class, msgs); + return basicSetRequirement((Requirement) otherEnd, msgs); + case CpsPackage.APPLICATION_INSTANCE__TYPE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetType((ApplicationType) otherEnd, msgs); + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + if (allocatedTo != null) + msgs = ((InternalEObject) allocatedTo).eInverseRemove(this, CpsPackage.HOST_INSTANCE__APPLICATIONS, + HostInstance.class, msgs); + return basicSetAllocatedTo((HostInstance) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + return basicSetRequirement(null, msgs); + case CpsPackage.APPLICATION_INSTANCE__TYPE: + return basicSetType(null, msgs); + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + return basicSetAllocatedTo(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CpsPackage.APPLICATION_INSTANCE__TYPE: + return eInternalContainer().eInverseRemove(this, CpsPackage.APPLICATION_TYPE__INSTANCES, + ApplicationType.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + if (resolve) + return getRequirement(); + return basicGetRequirement(); + case CpsPackage.APPLICATION_INSTANCE__TYPE: + return getType(); + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + if (resolve) + return getAllocatedTo(); + return basicGetAllocatedTo(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + setRequirement((Requirement) newValue); + return; + case CpsPackage.APPLICATION_INSTANCE__TYPE: + setType((ApplicationType) newValue); + return; + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + setAllocatedTo((HostInstance) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + setRequirement((Requirement) null); + return; + case CpsPackage.APPLICATION_INSTANCE__TYPE: + setType((ApplicationType) null); + return; + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + setAllocatedTo((HostInstance) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.APPLICATION_INSTANCE__REQUIREMENT: + return requirement != null; + case CpsPackage.APPLICATION_INSTANCE__TYPE: + return getType() != null; + case CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO: + return allocatedTo != null; + } + return super.eIsSet(featureID); + } + +} //ApplicationInstanceImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationTypeImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationTypeImpl.java new file mode 100644 index 00000000..f8793e30 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ApplicationTypeImpl.java @@ -0,0 +1,209 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; + +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.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Application Type'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl#getInstances Instances}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl#getRequirements Requirements}
  • + *
+ * + * @generated + */ +public class ApplicationTypeImpl extends MinimalEObjectImpl.Container implements ApplicationType { + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * The cached value of the '{@link #getRequirements() Requirements}' containment reference list. + * + * + * @see #getRequirements() + * @generated + * @ordered + */ + protected EList requirements; + + /** + * + * + * @generated + */ + protected ApplicationTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.APPLICATION_TYPE; + } + + /** + * + * + * @generated + */ + @Override + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList(ApplicationInstance.class, this, + CpsPackage.APPLICATION_TYPE__INSTANCES, CpsPackage.APPLICATION_INSTANCE__TYPE); + } + return instances; + } + + /** + * + * + * @generated + */ + @Override + public EList getRequirements() { + if (requirements == null) { + requirements = new EObjectContainmentEList(ResourceRequirement.class, this, + CpsPackage.APPLICATION_TYPE__REQUIREMENTS); + } + return requirements; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + return ((InternalEList) (InternalEList) getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + return ((InternalEList) getInstances()).basicRemove(otherEnd, msgs); + case CpsPackage.APPLICATION_TYPE__REQUIREMENTS: + return ((InternalEList) getRequirements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + return getInstances(); + case CpsPackage.APPLICATION_TYPE__REQUIREMENTS: + return getRequirements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection) newValue); + return; + case CpsPackage.APPLICATION_TYPE__REQUIREMENTS: + getRequirements().clear(); + getRequirements().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + getInstances().clear(); + return; + case CpsPackage.APPLICATION_TYPE__REQUIREMENTS: + getRequirements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.APPLICATION_TYPE__INSTANCES: + return instances != null && !instances.isEmpty(); + case CpsPackage.APPLICATION_TYPE__REQUIREMENTS: + return requirements != null && !requirements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ApplicationTypeImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsFactoryImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsFactoryImpl.java new file mode 100644 index 00000000..110f5abb --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsFactoryImpl.java @@ -0,0 +1,188 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CpsFactoryImpl extends EFactoryImpl implements CpsFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CpsFactory init() { + try { + CpsFactory theCpsFactory = (CpsFactory) EPackage.Registry.INSTANCE.getEFactory(CpsPackage.eNS_URI); + if (theCpsFactory != null) { + return theCpsFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CpsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CpsFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM: + return createCyberPhysicalSystem(); + case CpsPackage.APPLICATION_TYPE: + return createApplicationType(); + case CpsPackage.HOST_TYPE: + return createHostType(); + case CpsPackage.REQUEST: + return createRequest(); + case CpsPackage.REQUIREMENT: + return createRequirement(); + case CpsPackage.APPLICATION_INSTANCE: + return createApplicationInstance(); + case CpsPackage.RESOURCE_REQUIREMENT: + return createResourceRequirement(); + case CpsPackage.HOST_INSTANCE: + return createHostInstance(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public CyberPhysicalSystem createCyberPhysicalSystem() { + CyberPhysicalSystemImpl cyberPhysicalSystem = new CyberPhysicalSystemImpl(); + return cyberPhysicalSystem; + } + + /** + * + * + * @generated + */ + @Override + public ApplicationType createApplicationType() { + ApplicationTypeImpl applicationType = new ApplicationTypeImpl(); + return applicationType; + } + + /** + * + * + * @generated + */ + @Override + public HostType createHostType() { + HostTypeImpl hostType = new HostTypeImpl(); + return hostType; + } + + /** + * + * + * @generated + */ + @Override + public Request createRequest() { + RequestImpl request = new RequestImpl(); + return request; + } + + /** + * + * + * @generated + */ + @Override + public Requirement createRequirement() { + RequirementImpl requirement = new RequirementImpl(); + return requirement; + } + + /** + * + * + * @generated + */ + @Override + public ApplicationInstance createApplicationInstance() { + ApplicationInstanceImpl applicationInstance = new ApplicationInstanceImpl(); + return applicationInstance; + } + + /** + * + * + * @generated + */ + @Override + public ResourceRequirement createResourceRequirement() { + ResourceRequirementImpl resourceRequirement = new ResourceRequirementImpl(); + return resourceRequirement; + } + + /** + * + * + * @generated + */ + @Override + public HostInstance createHostInstance() { + HostInstanceImpl hostInstance = new HostInstanceImpl(); + return hostInstance; + } + + /** + * + * + * @generated + */ + @Override + public CpsPackage getCpsPackage() { + return (CpsPackage) getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CpsPackage getPackage() { + return CpsPackage.eINSTANCE; + } + +} //CpsFactoryImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java new file mode 100644 index 00000000..1f143a64 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java @@ -0,0 +1,765 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CpsPackageImpl extends EPackageImpl implements CpsPackage { + /** + * + * + * @generated + */ + private EClass cyberPhysicalSystemEClass = null; + + /** + * + * + * @generated + */ + private EClass applicationTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass hostTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass requestEClass = null; + + /** + * + * + * @generated + */ + private EClass requirementEClass = null; + + /** + * + * + * @generated + */ + private EClass applicationInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass resourceRequirementEClass = null; + + /** + * + * + * @generated + */ + private EClass hostInstanceEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#eNS_URI + * @see #init() + * @generated + */ + private CpsPackageImpl() { + super(eNS_URI, CpsFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CpsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CpsPackage init() { + if (isInited) + return (CpsPackage) EPackage.Registry.INSTANCE.getEPackage(CpsPackage.eNS_URI); + + // Obtain or create and register package + Object registeredCpsPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + CpsPackageImpl theCpsPackage = registeredCpsPackage instanceof CpsPackageImpl + ? (CpsPackageImpl) registeredCpsPackage + : new CpsPackageImpl(); + + isInited = true; + + // Create package meta-data objects + theCpsPackage.createPackageContents(); + + // Initialize created meta-data + theCpsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCpsPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, theCpsPackage); + return theCpsPackage; + } + + /** + * + * + * @generated + */ + @Override + public EClass getCyberPhysicalSystem() { + return cyberPhysicalSystemEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getCyberPhysicalSystem_Requests() { + return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCyberPhysicalSystem_ApplicationTypes() { + return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCyberPhysicalSystem_HostTypes() { + return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCyberPhysicalSystem_Hosts() { + return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCyberPhysicalSystem_Applications() { + return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + @Override + public EClass getApplicationType() { + return applicationTypeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getApplicationType_Instances() { + return (EReference) applicationTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getApplicationType_Requirements() { + return (EReference) applicationTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EClass getHostType() { + return hostTypeEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostType_DefaultMemory() { + return (EAttribute) hostTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostType_DefaultHdd() { + return (EAttribute) hostTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getHostType_Instances() { + return (EReference) hostTypeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostType_Cost() { + return (EAttribute) hostTypeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EClass getRequest() { + return requestEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getRequest_Requirements() { + return (EReference) requestEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getRequirement() { + return requirementEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getRequirement_Request() { + return (EReference) requirementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getRequirement_Count() { + return (EAttribute) requirementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getRequirement_Type() { + return (EReference) requirementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EReference getRequirement_Instances() { + return (EReference) requirementEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EClass getApplicationInstance() { + return applicationInstanceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getApplicationInstance_Requirement() { + return (EReference) applicationInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getApplicationInstance_Type() { + return (EReference) applicationInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getApplicationInstance_AllocatedTo() { + return (EReference) applicationInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getResourceRequirement() { + return resourceRequirementEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getResourceRequirement_RequiredMemory() { + return (EAttribute) resourceRequirementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getResourceRequirement_RequiredHdd() { + return (EAttribute) resourceRequirementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getResourceRequirement_HostType() { + return (EReference) resourceRequirementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getHostInstance() { + return hostInstanceEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getHostInstance_Type() { + return (EReference) hostInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostInstance_AvailableMemory() { + return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostInstance_AvailableHdd() { + return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostInstance_TotalMemory() { + return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getHostInstance_TotalHdd() { + return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + @Override + public EReference getHostInstance_Applications() { + return (EReference) hostInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + @Override + public CpsFactory getCpsFactory() { + return (CpsFactory) getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + cyberPhysicalSystemEClass = createEClass(CYBER_PHYSICAL_SYSTEM); + createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__REQUESTS); + createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES); + createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__HOST_TYPES); + createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__HOSTS); + createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__APPLICATIONS); + + applicationTypeEClass = createEClass(APPLICATION_TYPE); + createEReference(applicationTypeEClass, APPLICATION_TYPE__INSTANCES); + createEReference(applicationTypeEClass, APPLICATION_TYPE__REQUIREMENTS); + + hostTypeEClass = createEClass(HOST_TYPE); + createEAttribute(hostTypeEClass, HOST_TYPE__DEFAULT_MEMORY); + createEAttribute(hostTypeEClass, HOST_TYPE__DEFAULT_HDD); + createEReference(hostTypeEClass, HOST_TYPE__INSTANCES); + createEAttribute(hostTypeEClass, HOST_TYPE__COST); + + requestEClass = createEClass(REQUEST); + createEReference(requestEClass, REQUEST__REQUIREMENTS); + + requirementEClass = createEClass(REQUIREMENT); + createEReference(requirementEClass, REQUIREMENT__REQUEST); + createEAttribute(requirementEClass, REQUIREMENT__COUNT); + createEReference(requirementEClass, REQUIREMENT__TYPE); + createEReference(requirementEClass, REQUIREMENT__INSTANCES); + + applicationInstanceEClass = createEClass(APPLICATION_INSTANCE); + createEReference(applicationInstanceEClass, APPLICATION_INSTANCE__REQUIREMENT); + createEReference(applicationInstanceEClass, APPLICATION_INSTANCE__TYPE); + createEReference(applicationInstanceEClass, APPLICATION_INSTANCE__ALLOCATED_TO); + + resourceRequirementEClass = createEClass(RESOURCE_REQUIREMENT); + createEAttribute(resourceRequirementEClass, RESOURCE_REQUIREMENT__REQUIRED_MEMORY); + createEAttribute(resourceRequirementEClass, RESOURCE_REQUIREMENT__REQUIRED_HDD); + createEReference(resourceRequirementEClass, RESOURCE_REQUIREMENT__HOST_TYPE); + + hostInstanceEClass = createEClass(HOST_INSTANCE); + createEReference(hostInstanceEClass, HOST_INSTANCE__TYPE); + createEAttribute(hostInstanceEClass, HOST_INSTANCE__AVAILABLE_MEMORY); + createEAttribute(hostInstanceEClass, HOST_INSTANCE__AVAILABLE_HDD); + createEAttribute(hostInstanceEClass, HOST_INSTANCE__TOTAL_MEMORY); + createEAttribute(hostInstanceEClass, HOST_INSTANCE__TOTAL_HDD); + createEReference(hostInstanceEClass, HOST_INSTANCE__APPLICATIONS); + } + + /** + * + * + * @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. + * + * + * @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 + + // Initialize classes, features, and operations; add parameters + initEClass(cyberPhysicalSystemEClass, CyberPhysicalSystem.class, "CyberPhysicalSystem", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCyberPhysicalSystem_Requests(), this.getRequest(), null, "requests", null, 0, -1, + CyberPhysicalSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCyberPhysicalSystem_ApplicationTypes(), this.getApplicationType(), null, "applicationTypes", + null, 0, -1, CyberPhysicalSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCyberPhysicalSystem_HostTypes(), this.getHostType(), null, "hostTypes", null, 0, -1, + CyberPhysicalSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCyberPhysicalSystem_Hosts(), this.getHostInstance(), null, "hosts", null, 0, -1, + CyberPhysicalSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEReference(getCyberPhysicalSystem_Applications(), this.getApplicationInstance(), null, "applications", null, + 0, -1, CyberPhysicalSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(applicationTypeEClass, ApplicationType.class, "ApplicationType", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getApplicationType_Instances(), this.getApplicationInstance(), + this.getApplicationInstance_Type(), "instances", null, 0, -1, ApplicationType.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getApplicationType_Requirements(), this.getResourceRequirement(), null, "requirements", null, 0, + -1, ApplicationType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(hostTypeEClass, HostType.class, "HostType", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHostType_DefaultMemory(), ecorePackage.getEInt(), "defaultMemory", null, 1, 1, HostType.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHostType_DefaultHdd(), ecorePackage.getEInt(), "defaultHdd", null, 1, 1, HostType.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getHostType_Instances(), this.getHostInstance(), this.getHostInstance_Type(), "instances", null, + 0, -1, HostType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHostType_Cost(), ecorePackage.getEInt(), "cost", null, 1, 1, HostType.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(requestEClass, Request.class, "Request", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRequest_Requirements(), this.getRequirement(), this.getRequirement_Request(), "requirements", + null, 0, -1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(requirementEClass, Requirement.class, "Requirement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getRequirement_Request(), this.getRequest(), this.getRequest_Requirements(), "request", null, 1, + 1, Requirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRequirement_Count(), ecorePackage.getEInt(), "count", null, 1, 1, Requirement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRequirement_Type(), this.getApplicationType(), null, "type", null, 0, 1, Requirement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRequirement_Instances(), this.getApplicationInstance(), + this.getApplicationInstance_Requirement(), "instances", null, 0, -1, Requirement.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(applicationInstanceEClass, ApplicationInstance.class, "ApplicationInstance", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getApplicationInstance_Requirement(), this.getRequirement(), this.getRequirement_Instances(), + "requirement", null, 0, 1, ApplicationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getApplicationInstance_Type(), this.getApplicationType(), this.getApplicationType_Instances(), + "type", null, 1, 1, ApplicationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getApplicationInstance_AllocatedTo(), this.getHostInstance(), + this.getHostInstance_Applications(), "allocatedTo", null, 1, 1, ApplicationInstance.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(resourceRequirementEClass, ResourceRequirement.class, "ResourceRequirement", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getResourceRequirement_RequiredMemory(), ecorePackage.getEInt(), "requiredMemory", null, 1, 1, + ResourceRequirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getResourceRequirement_RequiredHdd(), ecorePackage.getEInt(), "requiredHdd", null, 1, 1, + ResourceRequirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getResourceRequirement_HostType(), this.getHostType(), null, "hostType", null, 1, 1, + ResourceRequirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(hostInstanceEClass, HostInstance.class, "HostInstance", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getHostInstance_Type(), this.getHostType(), this.getHostType_Instances(), "type", null, 1, 1, + HostInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHostInstance_AvailableMemory(), ecorePackage.getEInt(), "availableMemory", null, 0, 1, + HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEAttribute(getHostInstance_AvailableHdd(), ecorePackage.getEInt(), "availableHdd", null, 0, 1, + HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEAttribute(getHostInstance_TotalMemory(), ecorePackage.getEInt(), "totalMemory", null, 0, 1, + HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + IS_DERIVED, IS_ORDERED); + initEAttribute(getHostInstance_TotalHdd(), ecorePackage.getEInt(), "totalHdd", null, 0, 1, HostInstance.class, + IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEReference(getHostInstance_Applications(), this.getApplicationInstance(), + this.getApplicationInstance_AllocatedTo(), "applications", null, 0, -1, HostInstance.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation(this, source, new String[] { "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" }); + } + + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation(getCyberPhysicalSystem_Hosts(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts" }); + addAnnotation(getCyberPhysicalSystem_Applications(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications" }); + addAnnotation(getHostInstance_AvailableMemory(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory" }); + addAnnotation(getHostInstance_AvailableHdd(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd" }); + addAnnotation(getHostInstance_TotalMemory(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory" }); + addAnnotation(getHostInstance_TotalHdd(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd" }); + } + +} //CpsPackageImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java new file mode 100644 index 00000000..4d254f25 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java @@ -0,0 +1,289 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; + +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.EStructuralFeature; +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; + +/** + * + * An implementation of the model object 'Cyber Physical System'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getRequests Requests}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getApplicationTypes Application Types}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getHostTypes Host Types}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getHosts Hosts}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getApplications Applications}
  • + *
+ * + * @generated + */ +public class CyberPhysicalSystemImpl extends MinimalEObjectImpl.Container implements CyberPhysicalSystem { + /** + * The cached value of the '{@link #getRequests() Requests}' containment reference list. + * + * + * @see #getRequests() + * @generated + * @ordered + */ + protected EList requests; + + /** + * The cached value of the '{@link #getApplicationTypes() Application Types}' containment reference list. + * + * + * @see #getApplicationTypes() + * @generated + * @ordered + */ + protected EList applicationTypes; + + /** + * The cached value of the '{@link #getHostTypes() Host Types}' containment reference list. + * + * + * @see #getHostTypes() + * @generated + * @ordered + */ + protected EList hostTypes; + + /** + * The cached setting delegate for the '{@link #getHosts() Hosts}' reference list. + * + * + * @see #getHosts() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate HOSTS__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.CYBER_PHYSICAL_SYSTEM__HOSTS) + .getSettingDelegate(); + + /** + * The cached setting delegate for the '{@link #getApplications() Applications}' reference list. + * + * + * @see #getApplications() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate APPLICATIONS__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.CYBER_PHYSICAL_SYSTEM__APPLICATIONS) + .getSettingDelegate(); + + /** + * + * + * @generated + */ + protected CyberPhysicalSystemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.CYBER_PHYSICAL_SYSTEM; + } + + /** + * + * + * @generated + */ + @Override + public EList getRequests() { + if (requests == null) { + requests = new EObjectContainmentEList(Request.class, this, + CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS); + } + return requests; + } + + /** + * + * + * @generated + */ + @Override + public EList getApplicationTypes() { + if (applicationTypes == null) { + applicationTypes = new EObjectContainmentEList(ApplicationType.class, this, + CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES); + } + return applicationTypes; + } + + /** + * + * + * @generated + */ + @Override + public EList getHostTypes() { + if (hostTypes == null) { + hostTypes = new EObjectContainmentEList(HostType.class, this, + CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES); + } + return hostTypes; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public EList getHosts() { + return (EList) HOSTS__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public EList getApplications() { + return (EList) APPLICATIONS__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS: + return ((InternalEList) getRequests()).basicRemove(otherEnd, msgs); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES: + return ((InternalEList) getApplicationTypes()).basicRemove(otherEnd, msgs); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: + return ((InternalEList) getHostTypes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS: + return getRequests(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES: + return getApplicationTypes(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: + return getHostTypes(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOSTS: + return getHosts(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATIONS: + return getApplications(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS: + getRequests().clear(); + getRequests().addAll((Collection) newValue); + return; + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES: + getApplicationTypes().clear(); + getApplicationTypes().addAll((Collection) newValue); + return; + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: + getHostTypes().clear(); + getHostTypes().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS: + getRequests().clear(); + return; + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES: + getApplicationTypes().clear(); + return; + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: + getHostTypes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM__REQUESTS: + return requests != null && !requests.isEmpty(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES: + return applicationTypes != null && !applicationTypes.isEmpty(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: + return hostTypes != null && !hostTypes.isEmpty(); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOSTS: + return HOSTS__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATIONS: + return APPLICATIONS__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + } + return super.eIsSet(featureID); + } + +} //CyberPhysicalSystemImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java new file mode 100644 index 00000000..bbaca59c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java @@ -0,0 +1,355 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; + +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.EStructuralFeature; +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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Host Instance'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getType Type}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getAvailableMemory Available Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getAvailableHdd Available Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getTotalMemory Total Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getTotalHdd Total Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getApplications Applications}
  • + *
+ * + * @generated + */ +public class HostInstanceImpl extends MinimalEObjectImpl.Container implements HostInstance { + /** + * The cached setting delegate for the '{@link #getAvailableMemory() Available Memory}' attribute. + * + * + * @see #getAvailableMemory() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate AVAILABLE_MEMORY__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__AVAILABLE_MEMORY) + .getSettingDelegate(); + + /** + * The cached setting delegate for the '{@link #getAvailableHdd() Available Hdd}' attribute. + * + * + * @see #getAvailableHdd() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate AVAILABLE_HDD__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__AVAILABLE_HDD) + .getSettingDelegate(); + + /** + * The cached setting delegate for the '{@link #getTotalMemory() Total Memory}' attribute. + * + * + * @see #getTotalMemory() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate TOTAL_MEMORY__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__TOTAL_MEMORY) + .getSettingDelegate(); + + /** + * The cached setting delegate for the '{@link #getTotalHdd() Total Hdd}' attribute. + * + * + * @see #getTotalHdd() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate TOTAL_HDD__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__TOTAL_HDD) + .getSettingDelegate(); + + /** + * The cached value of the '{@link #getApplications() Applications}' reference list. + * + * + * @see #getApplications() + * @generated + * @ordered + */ + protected EList applications; + + /** + * + * + * @generated + */ + protected HostInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.HOST_INSTANCE; + } + + /** + * + * + * @generated + */ + @Override + public HostType getType() { + if (eContainerFeatureID() != CpsPackage.HOST_INSTANCE__TYPE) + return null; + return (HostType) eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetType(HostType newType, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newType, CpsPackage.HOST_INSTANCE__TYPE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setType(HostType newType) { + if (newType != eInternalContainer() + || (eContainerFeatureID() != CpsPackage.HOST_INSTANCE__TYPE && newType != null)) { + if (EcoreUtil.isAncestor(this, newType)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newType != null) + msgs = ((InternalEObject) newType).eInverseAdd(this, CpsPackage.HOST_TYPE__INSTANCES, HostType.class, + msgs); + msgs = basicSetType(newType, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.HOST_INSTANCE__TYPE, newType, newType)); + } + + /** + * + * + * @generated + */ + @Override + public int getAvailableMemory() { + return (Integer) AVAILABLE_MEMORY__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public int getAvailableHdd() { + return (Integer) AVAILABLE_HDD__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public int getTotalMemory() { + return (Integer) TOTAL_MEMORY__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public int getTotalHdd() { + return (Integer) TOTAL_HDD__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public EList getApplications() { + if (applications == null) { + applications = new EObjectWithInverseResolvingEList(ApplicationInstance.class, this, + CpsPackage.HOST_INSTANCE__APPLICATIONS, CpsPackage.APPLICATION_INSTANCE__ALLOCATED_TO); + } + return applications; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetType((HostType) otherEnd, msgs); + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + return ((InternalEList) (InternalEList) getApplications()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + return basicSetType(null, msgs); + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + return ((InternalEList) getApplications()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CpsPackage.HOST_INSTANCE__TYPE: + return eInternalContainer().eInverseRemove(this, CpsPackage.HOST_TYPE__INSTANCES, HostType.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + return getType(); + case CpsPackage.HOST_INSTANCE__AVAILABLE_MEMORY: + return getAvailableMemory(); + case CpsPackage.HOST_INSTANCE__AVAILABLE_HDD: + return getAvailableHdd(); + case CpsPackage.HOST_INSTANCE__TOTAL_MEMORY: + return getTotalMemory(); + case CpsPackage.HOST_INSTANCE__TOTAL_HDD: + return getTotalHdd(); + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + return getApplications(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + setType((HostType) newValue); + return; + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + getApplications().clear(); + getApplications().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + setType((HostType) null); + return; + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + getApplications().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.HOST_INSTANCE__TYPE: + return getType() != null; + case CpsPackage.HOST_INSTANCE__AVAILABLE_MEMORY: + return AVAILABLE_MEMORY__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case CpsPackage.HOST_INSTANCE__AVAILABLE_HDD: + return AVAILABLE_HDD__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case CpsPackage.HOST_INSTANCE__TOTAL_MEMORY: + return TOTAL_MEMORY__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case CpsPackage.HOST_INSTANCE__TOTAL_HDD: + return TOTAL_HDD__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case CpsPackage.HOST_INSTANCE__APPLICATIONS: + return applications != null && !applications.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //HostInstanceImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostTypeImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostTypeImpl.java new file mode 100644 index 00000000..c3d5b3dc --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostTypeImpl.java @@ -0,0 +1,356 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; + +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.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Host Type'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl#getDefaultMemory Default Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl#getDefaultHdd Default Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl#getInstances Instances}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostTypeImpl#getCost Cost}
  • + *
+ * + * @generated + */ +public class HostTypeImpl extends MinimalEObjectImpl.Container implements HostType { + /** + * The default value of the '{@link #getDefaultMemory() Default Memory}' attribute. + * + * + * @see #getDefaultMemory() + * @generated + * @ordered + */ + protected static final int DEFAULT_MEMORY_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getDefaultMemory() Default Memory}' attribute. + * + * + * @see #getDefaultMemory() + * @generated + * @ordered + */ + protected int defaultMemory = DEFAULT_MEMORY_EDEFAULT; + + /** + * The default value of the '{@link #getDefaultHdd() Default Hdd}' attribute. + * + * + * @see #getDefaultHdd() + * @generated + * @ordered + */ + protected static final int DEFAULT_HDD_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getDefaultHdd() Default Hdd}' attribute. + * + * + * @see #getDefaultHdd() + * @generated + * @ordered + */ + protected int defaultHdd = DEFAULT_HDD_EDEFAULT; + + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * The default value of the '{@link #getCost() Cost}' attribute. + * + * + * @see #getCost() + * @generated + * @ordered + */ + protected static final int COST_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getCost() Cost}' attribute. + * + * + * @see #getCost() + * @generated + * @ordered + */ + protected int cost = COST_EDEFAULT; + + /** + * + * + * @generated + */ + protected HostTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.HOST_TYPE; + } + + /** + * + * + * @generated + */ + @Override + public int getDefaultMemory() { + return defaultMemory; + } + + /** + * + * + * @generated + */ + @Override + public void setDefaultMemory(int newDefaultMemory) { + int oldDefaultMemory = defaultMemory; + defaultMemory = newDefaultMemory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.HOST_TYPE__DEFAULT_MEMORY, + oldDefaultMemory, defaultMemory)); + } + + /** + * + * + * @generated + */ + @Override + public int getDefaultHdd() { + return defaultHdd; + } + + /** + * + * + * @generated + */ + @Override + public void setDefaultHdd(int newDefaultHdd) { + int oldDefaultHdd = defaultHdd; + defaultHdd = newDefaultHdd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.HOST_TYPE__DEFAULT_HDD, oldDefaultHdd, + defaultHdd)); + } + + /** + * + * + * @generated + */ + @Override + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList(HostInstance.class, this, + CpsPackage.HOST_TYPE__INSTANCES, CpsPackage.HOST_INSTANCE__TYPE); + } + return instances; + } + + /** + * + * + * @generated + */ + @Override + public int getCost() { + return cost; + } + + /** + * + * + * @generated + */ + @Override + public void setCost(int newCost) { + int oldCost = cost; + cost = newCost; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.HOST_TYPE__COST, oldCost, cost)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.HOST_TYPE__INSTANCES: + return ((InternalEList) (InternalEList) getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.HOST_TYPE__INSTANCES: + return ((InternalEList) getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.HOST_TYPE__DEFAULT_MEMORY: + return getDefaultMemory(); + case CpsPackage.HOST_TYPE__DEFAULT_HDD: + return getDefaultHdd(); + case CpsPackage.HOST_TYPE__INSTANCES: + return getInstances(); + case CpsPackage.HOST_TYPE__COST: + return getCost(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.HOST_TYPE__DEFAULT_MEMORY: + setDefaultMemory((Integer) newValue); + return; + case CpsPackage.HOST_TYPE__DEFAULT_HDD: + setDefaultHdd((Integer) newValue); + return; + case CpsPackage.HOST_TYPE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection) newValue); + return; + case CpsPackage.HOST_TYPE__COST: + setCost((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.HOST_TYPE__DEFAULT_MEMORY: + setDefaultMemory(DEFAULT_MEMORY_EDEFAULT); + return; + case CpsPackage.HOST_TYPE__DEFAULT_HDD: + setDefaultHdd(DEFAULT_HDD_EDEFAULT); + return; + case CpsPackage.HOST_TYPE__INSTANCES: + getInstances().clear(); + return; + case CpsPackage.HOST_TYPE__COST: + setCost(COST_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.HOST_TYPE__DEFAULT_MEMORY: + return defaultMemory != DEFAULT_MEMORY_EDEFAULT; + case CpsPackage.HOST_TYPE__DEFAULT_HDD: + return defaultHdd != DEFAULT_HDD_EDEFAULT; + case CpsPackage.HOST_TYPE__INSTANCES: + return instances != null && !instances.isEmpty(); + case CpsPackage.HOST_TYPE__COST: + return cost != COST_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (defaultMemory: "); + result.append(defaultMemory); + result.append(", defaultHdd: "); + result.append(defaultHdd); + result.append(", cost: "); + result.append(cost); + result.append(')'); + return result.toString(); + } + +} //HostTypeImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequestImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequestImpl.java new file mode 100644 index 00000000..72b4c732 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequestImpl.java @@ -0,0 +1,169 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; + +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.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Request'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequestImpl#getRequirements Requirements}
  • + *
+ * + * @generated + */ +public class RequestImpl extends MinimalEObjectImpl.Container implements Request { + /** + * The cached value of the '{@link #getRequirements() Requirements}' containment reference list. + * + * + * @see #getRequirements() + * @generated + * @ordered + */ + protected EList requirements; + + /** + * + * + * @generated + */ + protected RequestImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.REQUEST; + } + + /** + * + * + * @generated + */ + @Override + public EList getRequirements() { + if (requirements == null) { + requirements = new EObjectContainmentWithInverseEList(Requirement.class, this, + CpsPackage.REQUEST__REQUIREMENTS, CpsPackage.REQUIREMENT__REQUEST); + } + return requirements; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + return ((InternalEList) (InternalEList) getRequirements()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + return ((InternalEList) getRequirements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + return getRequirements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + getRequirements().clear(); + getRequirements().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + getRequirements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.REQUEST__REQUIREMENTS: + return requirements != null && !requirements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RequestImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequirementImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequirementImpl.java new file mode 100644 index 00000000..79dc4f62 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/RequirementImpl.java @@ -0,0 +1,387 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; + +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.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Requirement'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl#getRequest Request}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl#getCount Count}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl#getType Type}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.RequirementImpl#getInstances Instances}
  • + *
+ * + * @generated + */ +public class RequirementImpl extends MinimalEObjectImpl.Container implements Requirement { + /** + * The default value of the '{@link #getCount() Count}' attribute. + * + * + * @see #getCount() + * @generated + * @ordered + */ + protected static final int COUNT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getCount() Count}' attribute. + * + * + * @see #getCount() + * @generated + * @ordered + */ + protected int count = COUNT_EDEFAULT; + + /** + * The cached value of the '{@link #getType() Type}' reference. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected ApplicationType type; + + /** + * The cached value of the '{@link #getInstances() Instances}' reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * + * + * @generated + */ + protected RequirementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.REQUIREMENT; + } + + /** + * + * + * @generated + */ + @Override + public Request getRequest() { + if (eContainerFeatureID() != CpsPackage.REQUIREMENT__REQUEST) + return null; + return (Request) eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRequest(Request newRequest, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newRequest, CpsPackage.REQUIREMENT__REQUEST, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setRequest(Request newRequest) { + if (newRequest != eInternalContainer() + || (eContainerFeatureID() != CpsPackage.REQUIREMENT__REQUEST && newRequest != null)) { + if (EcoreUtil.isAncestor(this, newRequest)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newRequest != null) + msgs = ((InternalEObject) newRequest).eInverseAdd(this, CpsPackage.REQUEST__REQUIREMENTS, Request.class, + msgs); + msgs = basicSetRequest(newRequest, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.REQUIREMENT__REQUEST, newRequest, + newRequest)); + } + + /** + * + * + * @generated + */ + @Override + public int getCount() { + return count; + } + + /** + * + * + * @generated + */ + @Override + public void setCount(int newCount) { + int oldCount = count; + count = newCount; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.REQUIREMENT__COUNT, oldCount, count)); + } + + /** + * + * + * @generated + */ + @Override + public ApplicationType getType() { + if (type != null && type.eIsProxy()) { + InternalEObject oldType = (InternalEObject) type; + type = (ApplicationType) eResolveProxy(oldType); + if (type != oldType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CpsPackage.REQUIREMENT__TYPE, oldType, + type)); + } + } + return type; + } + + /** + * + * + * @generated + */ + public ApplicationType basicGetType() { + return type; + } + + /** + * + * + * @generated + */ + @Override + public void setType(ApplicationType newType) { + ApplicationType oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.REQUIREMENT__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public EList getInstances() { + if (instances == null) { + instances = new EObjectWithInverseResolvingEList(ApplicationInstance.class, this, + CpsPackage.REQUIREMENT__INSTANCES, CpsPackage.APPLICATION_INSTANCE__REQUIREMENT); + } + return instances; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetRequest((Request) otherEnd, msgs); + case CpsPackage.REQUIREMENT__INSTANCES: + return ((InternalEList) (InternalEList) getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + return basicSetRequest(null, msgs); + case CpsPackage.REQUIREMENT__INSTANCES: + return ((InternalEList) getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CpsPackage.REQUIREMENT__REQUEST: + return eInternalContainer().eInverseRemove(this, CpsPackage.REQUEST__REQUIREMENTS, Request.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + return getRequest(); + case CpsPackage.REQUIREMENT__COUNT: + return getCount(); + case CpsPackage.REQUIREMENT__TYPE: + if (resolve) + return getType(); + return basicGetType(); + case CpsPackage.REQUIREMENT__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + setRequest((Request) newValue); + return; + case CpsPackage.REQUIREMENT__COUNT: + setCount((Integer) newValue); + return; + case CpsPackage.REQUIREMENT__TYPE: + setType((ApplicationType) newValue); + return; + case CpsPackage.REQUIREMENT__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + setRequest((Request) null); + return; + case CpsPackage.REQUIREMENT__COUNT: + setCount(COUNT_EDEFAULT); + return; + case CpsPackage.REQUIREMENT__TYPE: + setType((ApplicationType) null); + return; + case CpsPackage.REQUIREMENT__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.REQUIREMENT__REQUEST: + return getRequest() != null; + case CpsPackage.REQUIREMENT__COUNT: + return count != COUNT_EDEFAULT; + case CpsPackage.REQUIREMENT__TYPE: + return type != null; + case CpsPackage.REQUIREMENT__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (count: "); + result.append(count); + result.append(')'); + return result.toString(); + } + +} //RequirementImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ResourceRequirementImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ResourceRequirementImpl.java new file mode 100644 index 00000000..f4deb575 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/ResourceRequirementImpl.java @@ -0,0 +1,291 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.impl; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; + +import org.eclipse.emf.common.notify.Notification; + +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; + +/** + * + * An implementation of the model object 'Resource Requirement'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl#getRequiredMemory Required Memory}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl#getRequiredHdd Required Hdd}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ResourceRequirementImpl#getHostType Host Type}
  • + *
+ * + * @generated + */ +public class ResourceRequirementImpl extends MinimalEObjectImpl.Container implements ResourceRequirement { + /** + * The default value of the '{@link #getRequiredMemory() Required Memory}' attribute. + * + * + * @see #getRequiredMemory() + * @generated + * @ordered + */ + protected static final int REQUIRED_MEMORY_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getRequiredMemory() Required Memory}' attribute. + * + * + * @see #getRequiredMemory() + * @generated + * @ordered + */ + protected int requiredMemory = REQUIRED_MEMORY_EDEFAULT; + + /** + * The default value of the '{@link #getRequiredHdd() Required Hdd}' attribute. + * + * + * @see #getRequiredHdd() + * @generated + * @ordered + */ + protected static final int REQUIRED_HDD_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getRequiredHdd() Required Hdd}' attribute. + * + * + * @see #getRequiredHdd() + * @generated + * @ordered + */ + protected int requiredHdd = REQUIRED_HDD_EDEFAULT; + + /** + * The cached value of the '{@link #getHostType() Host Type}' reference. + * + * + * @see #getHostType() + * @generated + * @ordered + */ + protected HostType hostType; + + /** + * + * + * @generated + */ + protected ResourceRequirementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CpsPackage.Literals.RESOURCE_REQUIREMENT; + } + + /** + * + * + * @generated + */ + @Override + public int getRequiredMemory() { + return requiredMemory; + } + + /** + * + * + * @generated + */ + @Override + public void setRequiredMemory(int newRequiredMemory) { + int oldRequiredMemory = requiredMemory; + requiredMemory = newRequiredMemory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_MEMORY, + oldRequiredMemory, requiredMemory)); + } + + /** + * + * + * @generated + */ + @Override + public int getRequiredHdd() { + return requiredHdd; + } + + /** + * + * + * @generated + */ + @Override + public void setRequiredHdd(int newRequiredHdd) { + int oldRequiredHdd = requiredHdd; + requiredHdd = newRequiredHdd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_HDD, + oldRequiredHdd, requiredHdd)); + } + + /** + * + * + * @generated + */ + @Override + public HostType getHostType() { + if (hostType != null && hostType.eIsProxy()) { + InternalEObject oldHostType = (InternalEObject) hostType; + hostType = (HostType) eResolveProxy(oldHostType); + if (hostType != oldHostType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE, oldHostType, hostType)); + } + } + return hostType; + } + + /** + * + * + * @generated + */ + public HostType basicGetHostType() { + return hostType; + } + + /** + * + * + * @generated + */ + @Override + public void setHostType(HostType newHostType) { + HostType oldHostType = hostType; + hostType = newHostType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE, + oldHostType, hostType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_MEMORY: + return getRequiredMemory(); + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_HDD: + return getRequiredHdd(); + case CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE: + if (resolve) + return getHostType(); + return basicGetHostType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_MEMORY: + setRequiredMemory((Integer) newValue); + return; + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_HDD: + setRequiredHdd((Integer) newValue); + return; + case CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE: + setHostType((HostType) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_MEMORY: + setRequiredMemory(REQUIRED_MEMORY_EDEFAULT); + return; + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_HDD: + setRequiredHdd(REQUIRED_HDD_EDEFAULT); + return; + case CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE: + setHostType((HostType) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_MEMORY: + return requiredMemory != REQUIRED_MEMORY_EDEFAULT; + case CpsPackage.RESOURCE_REQUIREMENT__REQUIRED_HDD: + return requiredHdd != REQUIRED_HDD_EDEFAULT; + case CpsPackage.RESOURCE_REQUIREMENT__HOST_TYPE: + return hostType != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (requiredMemory: "); + result.append(requiredMemory); + result.append(", requiredHdd: "); + result.append(requiredHdd); + result.append(')'); + return result.toString(); + } + +} //ResourceRequirementImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsAdapterFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsAdapterFactory.java new file mode 100644 index 00000000..83e984a6 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsAdapterFactory.java @@ -0,0 +1,252 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.util; + +import hu.bme.mit.inf.dslreasoner.domains.cps.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage + * @generated + */ +public class CpsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CpsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CpsAdapterFactory() { + if (modelPackage == null) { + modelPackage = CpsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected CpsSwitch modelSwitch = new CpsSwitch() { + @Override + public Adapter caseCyberPhysicalSystem(CyberPhysicalSystem object) { + return createCyberPhysicalSystemAdapter(); + } + + @Override + public Adapter caseApplicationType(ApplicationType object) { + return createApplicationTypeAdapter(); + } + + @Override + public Adapter caseHostType(HostType object) { + return createHostTypeAdapter(); + } + + @Override + public Adapter caseRequest(Request object) { + return createRequestAdapter(); + } + + @Override + public Adapter caseRequirement(Requirement object) { + return createRequirementAdapter(); + } + + @Override + public Adapter caseApplicationInstance(ApplicationInstance object) { + return createApplicationInstanceAdapter(); + } + + @Override + public Adapter caseResourceRequirement(ResourceRequirement object) { + return createResourceRequirementAdapter(); + } + + @Override + public Adapter caseHostInstance(HostInstance object) { + return createHostInstanceAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem Cyber Physical System}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem + * @generated + */ + public Adapter createCyberPhysicalSystemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType Application Type}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType + * @generated + */ + public Adapter createApplicationTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostType Host Type}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostType + * @generated + */ + public Adapter createHostTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Request Request}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Request + * @generated + */ + public Adapter createRequestAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.Requirement Requirement}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.Requirement + * @generated + */ + public Adapter createRequirementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance Application Instance}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance + * @generated + */ + public Adapter createApplicationInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement Resource Requirement}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement + * @generated + */ + public Adapter createResourceRequirementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance Host Instance}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance + * @generated + */ + public Adapter createHostInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CpsAdapterFactory diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsSwitch.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsSwitch.java new file mode 100644 index 00000000..28b630a9 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/util/CpsSwitch.java @@ -0,0 +1,266 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.util; + +import hu.bme.mit.inf.dslreasoner.domains.cps.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage + * @generated + */ +public class CpsSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CpsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CpsSwitch() { + if (modelPackage == null) { + modelPackage = CpsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @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 caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CpsPackage.CYBER_PHYSICAL_SYSTEM: { + CyberPhysicalSystem cyberPhysicalSystem = (CyberPhysicalSystem) theEObject; + T result = caseCyberPhysicalSystem(cyberPhysicalSystem); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.APPLICATION_TYPE: { + ApplicationType applicationType = (ApplicationType) theEObject; + T result = caseApplicationType(applicationType); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.HOST_TYPE: { + HostType hostType = (HostType) theEObject; + T result = caseHostType(hostType); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.REQUEST: { + Request request = (Request) theEObject; + T result = caseRequest(request); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.REQUIREMENT: { + Requirement requirement = (Requirement) theEObject; + T result = caseRequirement(requirement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.APPLICATION_INSTANCE: { + ApplicationInstance applicationInstance = (ApplicationInstance) theEObject; + T result = caseApplicationInstance(applicationInstance); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.RESOURCE_REQUIREMENT: { + ResourceRequirement resourceRequirement = (ResourceRequirement) theEObject; + T result = caseResourceRequirement(resourceRequirement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CpsPackage.HOST_INSTANCE: { + HostInstance hostInstance = (HostInstance) theEObject; + T result = caseHostInstance(hostInstance); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Cyber Physical System'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cyber Physical System'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCyberPhysicalSystem(CyberPhysicalSystem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Application Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Application Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseApplicationType(ApplicationType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Host Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Host Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHostType(HostType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Request'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Request'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRequest(Request object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Requirement'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Requirement'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRequirement(Requirement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Application Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Application Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseApplicationInstance(ApplicationInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Resource Requirement'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Resource Requirement'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseResourceRequirement(ResourceRequirement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Host Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Host Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHostInstance(HostInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CpsSwitch -- cgit v1.2.3-54-g00ecf