diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java | 228 |
1 files changed, 228 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java new file mode 100644 index 00000000..814aa62e --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java | |||
@@ -0,0 +1,228 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package functionalarchitecture.impl; | ||
4 | |||
5 | import functionalarchitecture.FAMTerminator; | ||
6 | import functionalarchitecture.Function; | ||
7 | import functionalarchitecture.FunctionType; | ||
8 | import functionalarchitecture.FunctionalArchitectureModel; | ||
9 | import functionalarchitecture.FunctionalInput; | ||
10 | import functionalarchitecture.FunctionalOutput; | ||
11 | import functionalarchitecture.FunctionalarchitectureFactory; | ||
12 | import functionalarchitecture.FunctionalarchitecturePackage; | ||
13 | import functionalarchitecture.InformationLink; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.EDataType; | ||
17 | import org.eclipse.emf.ecore.EObject; | ||
18 | import org.eclipse.emf.ecore.EPackage; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model <b>Factory</b>. | ||
27 | * <!-- end-user-doc --> | ||
28 | * @generated | ||
29 | */ | ||
30 | public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements FunctionalarchitectureFactory { | ||
31 | /** | ||
32 | * Creates the default factory implementation. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @generated | ||
36 | */ | ||
37 | public static FunctionalarchitectureFactory init() { | ||
38 | try { | ||
39 | FunctionalarchitectureFactory theFunctionalarchitectureFactory = (FunctionalarchitectureFactory)EPackage.Registry.INSTANCE.getEFactory(FunctionalarchitecturePackage.eNS_URI); | ||
40 | if (theFunctionalarchitectureFactory != null) { | ||
41 | return theFunctionalarchitectureFactory; | ||
42 | } | ||
43 | } | ||
44 | catch (Exception exception) { | ||
45 | EcorePlugin.INSTANCE.log(exception); | ||
46 | } | ||
47 | return new FunctionalarchitectureFactoryImpl(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * Creates an instance of the factory. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | public FunctionalarchitectureFactoryImpl() { | ||
57 | super(); | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | public EObject create(EClass eClass) { | ||
67 | switch (eClass.getClassifierID()) { | ||
68 | case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: return createFunctionalArchitectureModel(); | ||
69 | case FunctionalarchitecturePackage.FUNCTION: return createFunction(); | ||
70 | case FunctionalarchitecturePackage.FAM_TERMINATOR: return createFAMTerminator(); | ||
71 | case FunctionalarchitecturePackage.INFORMATION_LINK: return createInformationLink(); | ||
72 | case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: return createFunctionalInterface(); | ||
73 | case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: return createFunctionalInput(); | ||
74 | case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: return createFunctionalOutput(); | ||
75 | default: | ||
76 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | @Override | ||
86 | public Object createFromString(EDataType eDataType, String initialValue) { | ||
87 | switch (eDataType.getClassifierID()) { | ||
88 | case FunctionalarchitecturePackage.FUNCTION_TYPE: | ||
89 | return createFunctionTypeFromString(eDataType, initialValue); | ||
90 | default: | ||
91 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
92 | } | ||
93 | } | ||
94 | |||
95 | /** | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @generated | ||
99 | */ | ||
100 | @Override | ||
101 | public String convertToString(EDataType eDataType, Object instanceValue) { | ||
102 | switch (eDataType.getClassifierID()) { | ||
103 | case FunctionalarchitecturePackage.FUNCTION_TYPE: | ||
104 | return convertFunctionTypeToString(eDataType, instanceValue); | ||
105 | default: | ||
106 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | @Override | ||
116 | public FunctionalArchitectureModel createFunctionalArchitectureModel() { | ||
117 | FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl(); | ||
118 | return functionalArchitectureModel; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public Function createFunction() { | ||
128 | FunctionImpl function = new FunctionImpl(); | ||
129 | return function; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public FAMTerminator createFAMTerminator() { | ||
139 | FAMTerminatorImpl famTerminator = new FAMTerminatorImpl(); | ||
140 | return famTerminator; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | public InformationLink createInformationLink() { | ||
150 | InformationLinkImpl informationLink = new InformationLinkImpl(); | ||
151 | return informationLink; | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | @Override | ||
160 | public functionalarchitecture.FunctionalInterface createFunctionalInterface() { | ||
161 | FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl(); | ||
162 | return functionalInterface; | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | @Override | ||
171 | public FunctionalInput createFunctionalInput() { | ||
172 | FunctionalInputImpl functionalInput = new FunctionalInputImpl(); | ||
173 | return functionalInput; | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public FunctionalOutput createFunctionalOutput() { | ||
183 | FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl(); | ||
184 | return functionalOutput; | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | public FunctionType createFunctionTypeFromString(EDataType eDataType, String initialValue) { | ||
193 | FunctionType result = FunctionType.get(initialValue); | ||
194 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
195 | return result; | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | public String convertFunctionTypeToString(EDataType eDataType, Object instanceValue) { | ||
204 | return instanceValue == null ? null : instanceValue.toString(); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public FunctionalarchitecturePackage getFunctionalarchitecturePackage() { | ||
214 | return (FunctionalarchitecturePackage)getEPackage(); | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @deprecated | ||
221 | * @generated | ||
222 | */ | ||
223 | @Deprecated | ||
224 | public static FunctionalarchitecturePackage getPackage() { | ||
225 | return FunctionalarchitecturePackage.eINSTANCE; | ||
226 | } | ||
227 | |||
228 | } //FunctionalarchitectureFactoryImpl | ||