diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java | 51 |
1 files changed, 51 insertions, 0 deletions
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; | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*; | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*; |
6 | 6 | ||
7 | import org.eclipse.emf.ecore.EClass; | 7 | import org.eclipse.emf.ecore.EClass; |
8 | import org.eclipse.emf.ecore.EDataType; | ||
8 | import org.eclipse.emf.ecore.EObject; | 9 | import org.eclipse.emf.ecore.EObject; |
9 | import org.eclipse.emf.ecore.EPackage; | 10 | import org.eclipse.emf.ecore.EPackage; |
10 | 11 | ||
@@ -78,6 +79,36 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
78 | * @generated | 79 | * @generated |
79 | */ | 80 | */ |
80 | @Override | 81 | @Override |
82 | public Object createFromString(EDataType eDataType, String initialValue) { | ||
83 | switch (eDataType.getClassifierID()) { | ||
84 | case CftPackage.MODALITY: | ||
85 | return createModalityFromString(eDataType, initialValue); | ||
86 | default: | ||
87 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public String convertToString(EDataType eDataType, Object instanceValue) { | ||
98 | switch (eDataType.getClassifierID()) { | ||
99 | case CftPackage.MODALITY: | ||
100 | return convertModalityToString(eDataType, instanceValue); | ||
101 | default: | ||
102 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
103 | } | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @Override | ||
81 | public ComponentDefinition createComponentDefinition() { | 112 | public ComponentDefinition createComponentDefinition() { |
82 | ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); | 113 | ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); |
83 | return componentDefinition; | 114 | return componentDefinition; |
@@ -198,6 +229,26 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
198 | * <!-- end-user-doc --> | 229 | * <!-- end-user-doc --> |
199 | * @generated | 230 | * @generated |
200 | */ | 231 | */ |
232 | public Modality createModalityFromString(EDataType eDataType, String initialValue) { | ||
233 | Modality result = Modality.get(initialValue); | ||
234 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
235 | return result; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | public String convertModalityToString(EDataType eDataType, Object instanceValue) { | ||
244 | return instanceValue == null ? null : instanceValue.toString(); | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * <!-- begin-user-doc --> | ||
249 | * <!-- end-user-doc --> | ||
250 | * @generated | ||
251 | */ | ||
201 | @Override | 252 | @Override |
202 | public CftPackage getCftPackage() { | 253 | public CftPackage getCftPackage() { |
203 | return (CftPackage)getEPackage(); | 254 | return (CftPackage)getEPackage(); |