From 3f5aaab5025b8eb243f414b1c789085327df04f4 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy
Date: Wed, 20 Mar 2019 16:09:09 +0100
Subject: Fault tree transformation for partial models WIP
---
.../faulttree/model/cft/CftPackage.java | 174 ++++++++++++++-
.../dslreasoner/faulttree/model/cft/Component.java | 32 ++-
.../faulttree/model/cft/Connection.java | 4 +-
.../faulttree/model/cft/ModalElement.java | 54 +++++
.../dslreasoner/faulttree/model/cft/Modality.java | 244 +++++++++++++++++++++
.../faulttree/model/cft/impl/CftFactoryImpl.java | 51 +++++
.../faulttree/model/cft/impl/CftPackageImpl.java | 76 +++++++
.../faulttree/model/cft/impl/ComponentImpl.java | 115 +++++++++-
.../faulttree/model/cft/impl/ConnectionImpl.java | 71 ++++++
.../model/cft/util/CftAdapterFactory.java | 18 ++
.../faulttree/model/cft/util/CftSwitch.java | 23 ++
11 files changed, 845 insertions(+), 17 deletions(-)
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java
(limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model')
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java
index d75710a2..07200ab2 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java
@@ -4,6 +4,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -534,6 +535,43 @@ public interface CftPackage extends EPackage {
*/
int COMPONENT_FAULT_TREE_OPERATION_COUNT = 0;
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement Modal Element}' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModalElement()
+ * @generated
+ */
+ int MODAL_ELEMENT = 14;
+
+ /**
+ * The feature id for the 'Exists' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int MODAL_ELEMENT__EXISTS = 0;
+
+ /**
+ * The number of structural features of the 'Modal Element' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int MODAL_ELEMENT_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the 'Modal Element' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int MODAL_ELEMENT_OPERATION_COUNT = 0;
+
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl Component}' class.
*
@@ -544,6 +582,15 @@ public interface CftPackage extends EPackage {
*/
int COMPONENT = 10;
+ /**
+ * The feature id for the 'Exists' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COMPONENT__EXISTS = MODAL_ELEMENT__EXISTS;
+
/**
* The feature id for the 'Inputs' containment reference list.
*
@@ -551,7 +598,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT__INPUTS = 0;
+ int COMPONENT__INPUTS = MODAL_ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the 'Outputs' containment reference list.
@@ -560,7 +607,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT__OUTPUTS = 1;
+ int COMPONENT__OUTPUTS = MODAL_ELEMENT_FEATURE_COUNT + 1;
/**
* The feature id for the 'Component Definition' reference.
@@ -569,7 +616,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT__COMPONENT_DEFINITION = 2;
+ int COMPONENT__COMPONENT_DEFINITION = MODAL_ELEMENT_FEATURE_COUNT + 2;
/**
* The feature id for the 'Name' attribute.
@@ -578,7 +625,16 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT__NAME = 3;
+ int COMPONENT__NAME = MODAL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the 'Multiple Allowed' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COMPONENT__MULTIPLE_ALLOWED = MODAL_ELEMENT_FEATURE_COUNT + 4;
/**
* The number of structural features of the 'Component' class.
@@ -587,7 +643,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT_FEATURE_COUNT = 4;
+ int COMPONENT_FEATURE_COUNT = MODAL_ELEMENT_FEATURE_COUNT + 5;
/**
* The number of operations of the 'Component' class.
@@ -596,7 +652,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int COMPONENT_OPERATION_COUNT = 0;
+ int COMPONENT_OPERATION_COUNT = MODAL_ELEMENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl Input}' class.
@@ -718,6 +774,15 @@ public interface CftPackage extends EPackage {
*/
int CONNECTION = 13;
+ /**
+ * The feature id for the 'Exists' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONNECTION__EXISTS = MODAL_ELEMENT__EXISTS;
+
/**
* The feature id for the 'Input' container reference.
*
@@ -725,7 +790,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int CONNECTION__INPUT = 0;
+ int CONNECTION__INPUT = MODAL_ELEMENT_FEATURE_COUNT + 0;
/**
* The feature id for the 'Output' reference.
@@ -734,7 +799,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int CONNECTION__OUTPUT = 1;
+ int CONNECTION__OUTPUT = MODAL_ELEMENT_FEATURE_COUNT + 1;
/**
* The number of structural features of the 'Connection' class.
@@ -743,7 +808,7 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int CONNECTION_FEATURE_COUNT = 2;
+ int CONNECTION_FEATURE_COUNT = MODAL_ELEMENT_FEATURE_COUNT + 2;
/**
* The number of operations of the 'Connection' class.
@@ -752,7 +817,18 @@ public interface CftPackage extends EPackage {
* @generated
* @ordered
*/
- int CONNECTION_OPERATION_COUNT = 0;
+ int CONNECTION_OPERATION_COUNT = MODAL_ELEMENT_OPERATION_COUNT + 0;
+
+
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality Modality}' enum.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModality()
+ * @generated
+ */
+ int MODALITY = 15;
/**
@@ -1041,6 +1117,17 @@ public interface CftPackage extends EPackage {
*/
EAttribute getComponent_Name();
+ /**
+ * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed Multiple Allowed}'.
+ *
+ *
+ * @return the meta object for the attribute 'Multiple Allowed'.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed()
+ * @see #getComponent()
+ * @generated
+ */
+ EAttribute getComponent_MultipleAllowed();
+
/**
* Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input Input}'.
*
@@ -1159,6 +1246,37 @@ public interface CftPackage extends EPackage {
*/
EReference getConnection_Output();
+ /**
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement Modal Element}'.
+ *
+ *
+ * @return the meta object for class 'Modal Element'.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement
+ * @generated
+ */
+ EClass getModalElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists Exists}'.
+ *
+ *
+ * @return the meta object for the attribute 'Exists'.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists()
+ * @see #getModalElement()
+ * @generated
+ */
+ EAttribute getModalElement_Exists();
+
+ /**
+ * Returns the meta object for enum '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality Modality}'.
+ *
+ *
+ * @return the meta object for enum 'Modality'.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality
+ * @generated
+ */
+ EEnum getModality();
+
/**
* Returns the factory that creates the instances of the model.
*
@@ -1420,6 +1538,14 @@ public interface CftPackage extends EPackage {
*/
EAttribute COMPONENT__NAME = eINSTANCE.getComponent_Name();
+ /**
+ * The meta object literal for the 'Multiple Allowed' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute COMPONENT__MULTIPLE_ALLOWED = eINSTANCE.getComponent_MultipleAllowed();
+
/**
* The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl Input}' class.
*
@@ -1514,6 +1640,34 @@ public interface CftPackage extends EPackage {
*/
EReference CONNECTION__OUTPUT = eINSTANCE.getConnection_Output();
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement Modal Element}' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModalElement()
+ * @generated
+ */
+ EClass MODAL_ELEMENT = eINSTANCE.getModalElement();
+
+ /**
+ * The meta object literal for the 'Exists' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute MODAL_ELEMENT__EXISTS = eINSTANCE.getModalElement_Exists();
+
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality Modality}' enum.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModality()
+ * @generated
+ */
+ EEnum MODALITY = eINSTANCE.getModality();
+
}
} //CftPackage
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java
index 7d5055c9..9b1d0b24 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java
@@ -4,8 +4,6 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
/**
*
* A representation of the model object 'Component'.
@@ -19,13 +17,14 @@ import org.eclipse.emf.ecore.EObject;
* {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getOutputs Outputs}
* {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getComponentDefinition Component Definition}
* {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName Name}
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed Multiple Allowed}
*
*
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent()
* @model
* @generated
*/
-public interface Component extends EObject {
+public interface Component extends ModalElement {
/**
* Returns the value of the 'Inputs' containment reference list.
* The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input}.
@@ -114,4 +113,31 @@ public interface Component extends EObject {
*/
void setName(String value);
+ /**
+ * Returns the value of the 'Multiple Allowed' attribute.
+ * The default value is "false"
.
+ *
+ *
+ * If the meaning of the 'Multiple Allowed' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Multiple Allowed' attribute.
+ * @see #setMultipleAllowed(boolean)
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent_MultipleAllowed()
+ * @model default="false"
+ * @generated
+ */
+ boolean isMultipleAllowed();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed Multiple Allowed}' attribute.
+ *
+ *
+ * @param value the new value of the 'Multiple Allowed' attribute.
+ * @see #isMultipleAllowed()
+ * @generated
+ */
+ void setMultipleAllowed(boolean value);
+
} // Component
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java
index c05e809b..9ca5b77f 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java
@@ -2,8 +2,6 @@
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.cft;
-import org.eclipse.emf.ecore.EObject;
-
/**
*
* A representation of the model object 'Connection'.
@@ -21,7 +19,7 @@ import org.eclipse.emf.ecore.EObject;
* @model
* @generated
*/
-public interface Connection extends EObject {
+public interface Connection extends ModalElement {
/**
* Returns the value of the 'Input' container reference.
* It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIncomingConnections Incoming Connections}'.
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java
new file mode 100644
index 00000000..9abb6558
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java
@@ -0,0 +1,54 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.cft;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'Modal Element'.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists Exists}
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModalElement()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface ModalElement extends EObject {
+ /**
+ * Returns the value of the 'Exists' attribute.
+ * The default value is "MUST"
.
+ * The literals are from the enumeration {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality}.
+ *
+ *
+ * If the meaning of the 'Exists' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Exists' attribute.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality
+ * @see #setExists(Modality)
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModalElement_Exists()
+ * @model default="MUST"
+ * @generated
+ */
+ Modality getExists();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists Exists}' attribute.
+ *
+ *
+ * @param value the new value of the 'Exists' attribute.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality
+ * @see #getExists()
+ * @generated
+ */
+ void setExists(Modality value);
+
+} // ModalElement
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java
new file mode 100644
index 00000000..6b7dc1e4
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java
@@ -0,0 +1,244 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.cft;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ *
+ * A representation of the literals of the enumeration 'Modality',
+ * and utility methods for working with them.
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModality()
+ * @model
+ * @generated
+ */
+public enum Modality implements Enumerator {
+ /**
+ * The 'MAY' literal object.
+ *
+ *
+ * @see #MAY_VALUE
+ * @generated
+ * @ordered
+ */
+ MAY(0, "MAY", "MAY"),
+
+ /**
+ * The 'CURRENT' literal object.
+ *
+ *
+ * @see #CURRENT_VALUE
+ * @generated
+ * @ordered
+ */
+ CURRENT(1, "CURRENT", "CURRENT"),
+
+ /**
+ * The 'MUST' literal object.
+ *
+ *
+ * @see #MUST_VALUE
+ * @generated
+ * @ordered
+ */
+ MUST(2, "MUST", "MUST");
+
+ /**
+ * The 'MAY' literal value.
+ *
+ *
+ * If the meaning of 'MAY' literal object isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @see #MAY
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int MAY_VALUE = 0;
+
+ /**
+ * The 'CURRENT' literal value.
+ *
+ *
+ * If the meaning of 'CURRENT' literal object isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @see #CURRENT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int CURRENT_VALUE = 1;
+
+ /**
+ * The 'MUST' literal value.
+ *
+ *
+ * If the meaning of 'MUST' literal object isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @see #MUST
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int MUST_VALUE = 2;
+
+ /**
+ * An array of all the 'Modality' enumerators.
+ *
+ *
+ * @generated
+ */
+ private static final Modality[] VALUES_ARRAY =
+ new Modality[] {
+ MAY,
+ CURRENT,
+ MUST,
+ };
+
+ /**
+ * A public read-only list of all the 'Modality' enumerators.
+ *
+ *
+ * @generated
+ */
+ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the 'Modality' literal with the specified literal value.
+ *
+ *
+ * @param literal the literal.
+ * @return the matching enumerator or null
.
+ * @generated
+ */
+ public static Modality get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ Modality result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the 'Modality' literal with the specified name.
+ *
+ *
+ * @param name the name.
+ * @return the matching enumerator or null
.
+ * @generated
+ */
+ public static Modality getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ Modality result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the 'Modality' literal with the specified integer value.
+ *
+ *
+ * @param value the integer value.
+ * @return the matching enumerator or null
.
+ * @generated
+ */
+ public static Modality get(int value) {
+ switch (value) {
+ case MAY_VALUE: return MAY;
+ case CURRENT_VALUE: return CURRENT;
+ case MUST_VALUE: return MUST;
+ }
+ return null;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private final int value;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private final String name;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ *
+ *
+ * @generated
+ */
+ private Modality(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //Modality
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java
index 6eac2861..6b07b541 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java
@@ -5,6 +5,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -72,6 +73,36 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory {
}
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case CftPackage.MODALITY:
+ return createModalityFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case CftPackage.MODALITY:
+ return convertModalityToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
/**
*
*
@@ -193,6 +224,26 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory {
return connection;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public Modality createModalityFromString(EDataType eDataType, String initialValue) {
+ Modality result = Modality.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String convertModalityToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
/**
*
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java
index 1d6b6a23..2d70d7ce 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java
@@ -16,6 +16,8 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
@@ -23,6 +25,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -133,6 +136,20 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
*/
private EClass connectionEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass modalElementEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EEnum modalityEEnum = null;
+
/**
* Creates an instance of the model Package, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -467,6 +484,16 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
return (EAttribute)componentEClass.getEStructuralFeatures().get(3);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getComponent_MultipleAllowed() {
+ return (EAttribute)componentEClass.getEStructuralFeatures().get(4);
+ }
+
/**
*
*
@@ -577,6 +604,36 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
return (EReference)connectionEClass.getEStructuralFeatures().get(1);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getModalElement() {
+ return modalElementEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getModalElement_Exists() {
+ return (EAttribute)modalElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EEnum getModality() {
+ return modalityEEnum;
+ }
+
/**
*
*
@@ -643,6 +700,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
createEReference(componentEClass, COMPONENT__OUTPUTS);
createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION);
createEAttribute(componentEClass, COMPONENT__NAME);
+ createEAttribute(componentEClass, COMPONENT__MULTIPLE_ALLOWED);
inputEClass = createEClass(INPUT);
createEReference(inputEClass, INPUT__INPUT_EVENT);
@@ -657,6 +715,12 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
connectionEClass = createEClass(CONNECTION);
createEReference(connectionEClass, CONNECTION__INPUT);
createEReference(connectionEClass, CONNECTION__OUTPUT);
+
+ modalElementEClass = createEClass(MODAL_ELEMENT);
+ createEAttribute(modalElementEClass, MODAL_ELEMENT__EXISTS);
+
+ // Create enums
+ modalityEEnum = createEEnum(MODALITY);
}
/**
@@ -697,6 +761,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition());
orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition());
kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition());
+ componentEClass.getESuperTypes().add(this.getModalElement());
+ connectionEClass.getESuperTypes().add(this.getModalElement());
// Initialize classes, features, and operations; add parameters
initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -736,6 +802,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
initEReference(getComponent_Outputs(), this.getOutput(), this.getOutput_Component(), "outputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getComponent_ComponentDefinition(), this.getComponentDefinition(), null, "componentDefinition", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getComponent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getComponent_MultipleAllowed(), ecorePackage.getEBoolean(), "multipleAllowed", "false", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getInput_InputEvent(), this.getInputEvent(), null, "inputEvent", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -751,6 +818,15 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage {
initEReference(getConnection_Input(), this.getInput(), this.getInput_IncomingConnections(), "input", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getConnection_Output(), this.getOutput(), this.getOutput_OutgoingConnections(), "output", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(modalElementEClass, ModalElement.class, "ModalElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getModalElement_Exists(), this.getModality(), "exists", "MUST", 0, 1, ModalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(modalityEEnum, Modality.class, "Modality");
+ addEEnumLiteral(modalityEEnum, Modality.MAY);
+ addEEnumLiteral(modalityEEnum, Modality.CURRENT);
+ addEEnumLiteral(modalityEEnum, Modality.MUST);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java
index 847b6ee1..dcbf7660 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java
@@ -6,6 +6,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
import java.util.Collection;
@@ -32,15 +33,37 @@ import org.eclipse.emf.ecore.util.InternalEList;
* The following features are implemented:
*
*
+ * - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getExists Exists}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getInputs Inputs}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getOutputs Outputs}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getComponentDefinition Component Definition}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getName Name}
+ * - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#isMultipleAllowed Multiple Allowed}
*
*
* @generated
*/
public class ComponentImpl extends MinimalEObjectImpl.Container implements Component {
+ /**
+ * The default value of the '{@link #getExists() Exists}' attribute.
+ *
+ *
+ * @see #getExists()
+ * @generated
+ * @ordered
+ */
+ protected static final Modality EXISTS_EDEFAULT = Modality.MUST;
+
+ /**
+ * The cached value of the '{@link #getExists() Exists}' attribute.
+ *
+ *
+ * @see #getExists()
+ * @generated
+ * @ordered
+ */
+ protected Modality exists = EXISTS_EDEFAULT;
+
/**
* The cached value of the '{@link #getInputs() Inputs}' containment reference list.
*
@@ -91,6 +114,26 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
*/
protected String name = NAME_EDEFAULT;
+ /**
+ * The default value of the '{@link #isMultipleAllowed() Multiple Allowed}' attribute.
+ *
+ *
+ * @see #isMultipleAllowed()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean MULTIPLE_ALLOWED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isMultipleAllowed() Multiple Allowed}' attribute.
+ *
+ *
+ * @see #isMultipleAllowed()
+ * @generated
+ * @ordered
+ */
+ protected boolean multipleAllowed = MULTIPLE_ALLOWED_EDEFAULT;
+
/**
*
*
@@ -199,6 +242,52 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__NAME, oldName, name));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Modality getExists() {
+ return exists;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setExists(Modality newExists) {
+ Modality oldExists = exists;
+ exists = newExists == null ? EXISTS_EDEFAULT : newExists;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__EXISTS, oldExists, exists));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean isMultipleAllowed() {
+ return multipleAllowed;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setMultipleAllowed(boolean newMultipleAllowed) {
+ boolean oldMultipleAllowed = multipleAllowed;
+ multipleAllowed = newMultipleAllowed;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__MULTIPLE_ALLOWED, oldMultipleAllowed, multipleAllowed));
+ }
+
/**
*
*
@@ -240,6 +329,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case CftPackage.COMPONENT__EXISTS:
+ return getExists();
case CftPackage.COMPONENT__INPUTS:
return getInputs();
case CftPackage.COMPONENT__OUTPUTS:
@@ -249,6 +340,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
return basicGetComponentDefinition();
case CftPackage.COMPONENT__NAME:
return getName();
+ case CftPackage.COMPONENT__MULTIPLE_ALLOWED:
+ return isMultipleAllowed();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -262,6 +355,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case CftPackage.COMPONENT__EXISTS:
+ setExists((Modality)newValue);
+ return;
case CftPackage.COMPONENT__INPUTS:
getInputs().clear();
getInputs().addAll((Collection extends Input>)newValue);
@@ -276,6 +372,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
case CftPackage.COMPONENT__NAME:
setName((String)newValue);
return;
+ case CftPackage.COMPONENT__MULTIPLE_ALLOWED:
+ setMultipleAllowed((Boolean)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -288,6 +387,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case CftPackage.COMPONENT__EXISTS:
+ setExists(EXISTS_EDEFAULT);
+ return;
case CftPackage.COMPONENT__INPUTS:
getInputs().clear();
return;
@@ -300,6 +402,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
case CftPackage.COMPONENT__NAME:
setName(NAME_EDEFAULT);
return;
+ case CftPackage.COMPONENT__MULTIPLE_ALLOWED:
+ setMultipleAllowed(MULTIPLE_ALLOWED_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -312,6 +417,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case CftPackage.COMPONENT__EXISTS:
+ return exists != EXISTS_EDEFAULT;
case CftPackage.COMPONENT__INPUTS:
return inputs != null && !inputs.isEmpty();
case CftPackage.COMPONENT__OUTPUTS:
@@ -320,6 +427,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
return componentDefinition != null;
case CftPackage.COMPONENT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CftPackage.COMPONENT__MULTIPLE_ALLOWED:
+ return multipleAllowed != MULTIPLE_ALLOWED_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -334,8 +443,12 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
- result.append(" (name: ");
+ result.append(" (exists: ");
+ result.append(exists);
+ result.append(", name: ");
result.append(name);
+ result.append(", multipleAllowed: ");
+ result.append(multipleAllowed);
result.append(')');
return result.toString();
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
index 7506e4d7..aea86ed4 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java
@@ -5,6 +5,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
import org.eclipse.emf.common.notify.Notification;
@@ -26,6 +27,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* The following features are implemented:
*
*
+ * - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getExists Exists}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getInput Input}
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getOutput Output}
*
@@ -33,6 +35,26 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* @generated
*/
public class ConnectionImpl extends MinimalEObjectImpl.Container implements Connection {
+ /**
+ * The default value of the '{@link #getExists() Exists}' attribute.
+ *
+ *
+ * @see #getExists()
+ * @generated
+ * @ordered
+ */
+ protected static final Modality EXISTS_EDEFAULT = Modality.MUST;
+
+ /**
+ * The cached value of the '{@link #getExists() Exists}' attribute.
+ *
+ *
+ * @see #getExists()
+ * @generated
+ * @ordered
+ */
+ protected Modality exists = EXISTS_EDEFAULT;
+
/**
* The cached value of the '{@link #getOutput() Output}' reference.
*
@@ -167,6 +189,29 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__OUTPUT, newOutput, newOutput));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Modality getExists() {
+ return exists;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setExists(Modality newExists) {
+ Modality oldExists = exists;
+ exists = newExists == null ? EXISTS_EDEFAULT : newExists;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__EXISTS, oldExists, exists));
+ }
+
/**
*
*
@@ -225,6 +270,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case CftPackage.CONNECTION__EXISTS:
+ return getExists();
case CftPackage.CONNECTION__INPUT:
return getInput();
case CftPackage.CONNECTION__OUTPUT:
@@ -242,6 +289,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case CftPackage.CONNECTION__EXISTS:
+ setExists((Modality)newValue);
+ return;
case CftPackage.CONNECTION__INPUT:
setInput((Input)newValue);
return;
@@ -260,6 +310,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case CftPackage.CONNECTION__EXISTS:
+ setExists(EXISTS_EDEFAULT);
+ return;
case CftPackage.CONNECTION__INPUT:
setInput((Input)null);
return;
@@ -278,6 +331,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case CftPackage.CONNECTION__EXISTS:
+ return exists != EXISTS_EDEFAULT;
case CftPackage.CONNECTION__INPUT:
return getInput() != null;
case CftPackage.CONNECTION__OUTPUT:
@@ -286,4 +341,20 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn
return super.eIsSet(featureID);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (exists: ");
+ result.append(exists);
+ result.append(')');
+ return result.toString();
+ }
+
} //ConnectionImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java
index e3a40888..f5d3bf83 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java
@@ -124,6 +124,10 @@ public class CftAdapterFactory extends AdapterFactoryImpl {
return createConnectionAdapter();
}
@Override
+ public Adapter caseModalElement(ModalElement object) {
+ return createModalElementAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -339,6 +343,20 @@ public class CftAdapterFactory extends AdapterFactoryImpl {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement Modal Element}'.
+ *
+ * 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.faulttree.model.cft.ModalElement
+ * @generated
+ */
+ public Adapter createModalElementAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for the default case.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java
index e32d792b..3c5a4fd9 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java
@@ -144,6 +144,7 @@ public class CftSwitch extends Switch {
case CftPackage.COMPONENT: {
Component component = (Component)theEObject;
T result = caseComponent(component);
+ if (result == null) result = caseModalElement(component);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -162,6 +163,13 @@ public class CftSwitch extends Switch {
case CftPackage.CONNECTION: {
Connection connection = (Connection)theEObject;
T result = caseConnection(connection);
+ if (result == null) result = caseModalElement(connection);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CftPackage.MODAL_ELEMENT: {
+ ModalElement modalElement = (ModalElement)theEObject;
+ T result = caseModalElement(modalElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -379,6 +387,21 @@ public class CftSwitch extends Switch {
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Modal Element'.
+ *
+ * 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 'Modal Element'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModalElement(ModalElement object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'EObject'.
*
--
cgit v1.2.3-70-g09d2