1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package edu.kit.ipd.sdq.completionfeaturemodel.impl; |
8 | |
9 | import org.eclipse.emf.ecore.EAttribute; |
10 | import org.eclipse.emf.ecore.EClass; |
11 | import org.eclipse.emf.ecore.EEnum; |
12 | import org.eclipse.emf.ecore.EPackage; |
13 | import org.eclipse.emf.ecore.EReference; |
14 | import org.eclipse.emf.ecore.EcorePackage; |
15 | import org.eclipse.emf.ecore.impl.EPackageImpl; |
16 | |
17 | import EMOF.EMOFPackage; |
18 | import EssentialOCL.EssentialOCLPackage; |
19 | import QVTBase.QVTBasePackage; |
20 | import QVTRelation.QVTRelationPackage; |
21 | import QVTTemplate.QVTTemplatePackage; |
22 | import copyException.CopyExceptionPackage; |
23 | import de.uka.ipd.sdq.featuremodel.featuremodelPackage; |
24 | import edu.kit.ipd.sdq.completionfeaturemodel.CompletionFeature; |
25 | import edu.kit.ipd.sdq.completionfeaturemodel.CompletionFeatureDiagram; |
26 | import edu.kit.ipd.sdq.completionfeaturemodel.CompletionFeatureGroup; |
27 | import edu.kit.ipd.sdq.completionfeaturemodel.CompletionSimple; |
28 | import edu.kit.ipd.sdq.completionfeaturemodel.DisambiguationRule; |
29 | import edu.kit.ipd.sdq.completionfeaturemodel.FeatureState; |
30 | import edu.kit.ipd.sdq.completionfeaturemodel.completionfeaturemodelFactory; |
31 | import edu.kit.ipd.sdq.completionfeaturemodel.completionfeaturemodelPackage; |
32 | |
33 | /** |
34 | * <!-- begin-user-doc --> |
35 | * An implementation of the model <b>Package</b>. |
36 | * <!-- end-user-doc --> |
37 | * @generated |
38 | */ |
39 | public class completionfeaturemodelPackageImpl extends EPackageImpl implements completionfeaturemodelPackage { |
40 | /** |
41 | * <!-- begin-user-doc --> |
42 | * <!-- end-user-doc --> |
43 | * @generated |
44 | */ |
45 | private EClass completionFeatureEClass = null; |
46 | |
47 | /** |
48 | * <!-- begin-user-doc --> |
49 | * <!-- end-user-doc --> |
50 | * @generated |
51 | */ |
52 | private EClass disambiguationRuleEClass = null; |
53 | |
54 | /** |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @generated |
58 | */ |
59 | private EClass completionFeatureDiagramEClass = null; |
60 | |
61 | /** |
62 | * <!-- begin-user-doc --> |
63 | * <!-- end-user-doc --> |
64 | * @generated |
65 | */ |
66 | private EClass completionSimpleEClass = null; |
67 | |
68 | /** |
69 | * <!-- begin-user-doc --> |
70 | * <!-- end-user-doc --> |
71 | * @generated |
72 | */ |
73 | private EClass completionFeatureGroupEClass = null; |
74 | |
75 | /** |
76 | * <!-- begin-user-doc --> |
77 | * <!-- end-user-doc --> |
78 | * @generated |
79 | */ |
80 | private EEnum featureStateEEnum = null; |
81 | |
82 | /** |
83 | * Creates an instance of the model <b>Package</b>, registered with |
84 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
85 | * package URI value. |
86 | * <p>Note: the correct way to create the package is via the static |
87 | * factory method {@link #init init()}, which also performs |
88 | * initialization of the package, or returns the registered package, |
89 | * if one already exists. |
90 | * <!-- begin-user-doc --> |
91 | * <!-- end-user-doc --> |
92 | * @see org.eclipse.emf.ecore.EPackage.Registry |
93 | * @see edu.kit.ipd.sdq.completionfeaturemodel.completionfeaturemodelPackage#eNS_URI |
94 | * @see #init() |
95 | * @generated |
96 | */ |
97 | private completionfeaturemodelPackageImpl() { |
98 | super(eNS_URI, completionfeaturemodelFactory.eINSTANCE); |
99 | } |
100 | |
101 | /** |
102 | * <!-- begin-user-doc --> |
103 | * <!-- end-user-doc --> |
104 | * @generated |
105 | */ |
106 | private static boolean isInited = false; |
107 | |
108 | /** |
109 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
110 | * |
111 | * <p>This method is used to initialize {@link completionfeaturemodelPackage#eINSTANCE} when that field is accessed. |
112 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
113 | * <!-- begin-user-doc --> |
114 | * <!-- end-user-doc --> |
115 | * @see #eNS_URI |
116 | * @see #createPackageContents() |
117 | * @see #initializePackageContents() |
118 | * @generated |
119 | */ |
120 | public static completionfeaturemodelPackage init() { |
121 | if (isInited) return (completionfeaturemodelPackage)EPackage.Registry.INSTANCE.getEPackage(completionfeaturemodelPackage.eNS_URI); |
122 | |
123 | // Obtain or create and register package |
124 | completionfeaturemodelPackageImpl thecompletionfeaturemodelPackage = (completionfeaturemodelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof completionfeaturemodelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new completionfeaturemodelPackageImpl()); |
125 | |
126 | isInited = true; |
127 | |
128 | // Initialize simple dependencies |
129 | CopyExceptionPackage.eINSTANCE.eClass(); |
130 | featuremodelPackage.eINSTANCE.eClass(); |
131 | EMOFPackage.eINSTANCE.eClass(); |
132 | EssentialOCLPackage.eINSTANCE.eClass(); |
133 | QVTBasePackage.eINSTANCE.eClass(); |
134 | |
135 | // Create package meta-data objects |
136 | thecompletionfeaturemodelPackage.createPackageContents(); |
137 | |
138 | // Initialize created meta-data |
139 | thecompletionfeaturemodelPackage.initializePackageContents(); |
140 | |
141 | // Mark meta-data to indicate it can't be changed |
142 | thecompletionfeaturemodelPackage.freeze(); |
143 | |
144 | |
145 | // Update the registry and return the package |
146 | EPackage.Registry.INSTANCE.put(completionfeaturemodelPackage.eNS_URI, thecompletionfeaturemodelPackage); |
147 | return thecompletionfeaturemodelPackage; |
148 | } |
149 | |
150 | /** |
151 | * <!-- begin-user-doc --> |
152 | * <!-- end-user-doc --> |
153 | * @generated |
154 | */ |
155 | public EClass getCompletionFeature() { |
156 | return completionFeatureEClass; |
157 | } |
158 | |
159 | /** |
160 | * <!-- begin-user-doc --> |
161 | * <!-- end-user-doc --> |
162 | * @generated |
163 | */ |
164 | public EReference getCompletionFeature_CopyException() { |
165 | return (EReference)completionFeatureEClass.getEStructuralFeatures().get(0); |
166 | } |
167 | |
168 | /** |
169 | * <!-- begin-user-doc --> |
170 | * <!-- end-user-doc --> |
171 | * @generated |
172 | */ |
173 | public EReference getCompletionFeature_DisambiguationRule() { |
174 | return (EReference)completionFeatureEClass.getEStructuralFeatures().get(1); |
175 | } |
176 | |
177 | /** |
178 | * <!-- begin-user-doc --> |
179 | * <!-- end-user-doc --> |
180 | * @generated |
181 | */ |
182 | public EReference getCompletionFeature_TransformationFragment() { |
183 | return (EReference)completionFeatureEClass.getEStructuralFeatures().get(2); |
184 | } |
185 | |
186 | /** |
187 | * <!-- begin-user-doc --> |
188 | * <!-- end-user-doc --> |
189 | * @generated |
190 | */ |
191 | public EAttribute getCompletionFeature_FeatureState() { |
192 | return (EAttribute)completionFeatureEClass.getEStructuralFeatures().get(3); |
193 | } |
194 | |
195 | /** |
196 | * <!-- begin-user-doc --> |
197 | * <!-- end-user-doc --> |
198 | * @generated |
199 | */ |
200 | public EClass getDisambiguationRule() { |
201 | return disambiguationRuleEClass; |
202 | } |
203 | |
204 | /** |
205 | * <!-- begin-user-doc --> |
206 | * <!-- end-user-doc --> |
207 | * @generated |
208 | */ |
209 | public EReference getDisambiguationRule_Feature() { |
210 | return (EReference)disambiguationRuleEClass.getEStructuralFeatures().get(0); |
211 | } |
212 | |
213 | /** |
214 | * <!-- begin-user-doc --> |
215 | * <!-- end-user-doc --> |
216 | * @generated |
217 | */ |
218 | public EReference getDisambiguationRule_DisambiguationCondition() { |
219 | return (EReference)disambiguationRuleEClass.getEStructuralFeatures().get(1); |
220 | } |
221 | |
222 | /** |
223 | * <!-- begin-user-doc --> |
224 | * <!-- end-user-doc --> |
225 | * @generated |
226 | */ |
227 | public EReference getDisambiguationRule_TransformationFragment() { |
228 | return (EReference)disambiguationRuleEClass.getEStructuralFeatures().get(2); |
229 | } |
230 | |
231 | /** |
232 | * <!-- begin-user-doc --> |
233 | * <!-- end-user-doc --> |
234 | * @generated |
235 | */ |
236 | public EClass getCompletionFeatureDiagram() { |
237 | return completionFeatureDiagramEClass; |
238 | } |
239 | |
240 | /** |
241 | * <!-- begin-user-doc --> |
242 | * <!-- end-user-doc --> |
243 | * @generated |
244 | */ |
245 | public EReference getCompletionFeatureDiagram_AnnotatableElementType() { |
246 | return (EReference)completionFeatureDiagramEClass.getEStructuralFeatures().get(0); |
247 | } |
248 | |
249 | /** |
250 | * <!-- begin-user-doc --> |
251 | * <!-- end-user-doc --> |
252 | * @generated |
253 | */ |
254 | public EClass getCompletionSimple() { |
255 | return completionSimpleEClass; |
256 | } |
257 | |
258 | /** |
259 | * <!-- begin-user-doc --> |
260 | * <!-- end-user-doc --> |
261 | * @generated |
262 | */ |
263 | public EClass getCompletionFeatureGroup() { |
264 | return completionFeatureGroupEClass; |
265 | } |
266 | |
267 | /** |
268 | * <!-- begin-user-doc --> |
269 | * <!-- end-user-doc --> |
270 | * @generated |
271 | */ |
272 | public EEnum getFeatureState() { |
273 | return featureStateEEnum; |
274 | } |
275 | |
276 | /** |
277 | * <!-- begin-user-doc --> |
278 | * <!-- end-user-doc --> |
279 | * @generated |
280 | */ |
281 | public completionfeaturemodelFactory getcompletionfeaturemodelFactory() { |
282 | return (completionfeaturemodelFactory)getEFactoryInstance(); |
283 | } |
284 | |
285 | /** |
286 | * <!-- begin-user-doc --> |
287 | * <!-- end-user-doc --> |
288 | * @generated |
289 | */ |
290 | private boolean isCreated = false; |
291 | |
292 | /** |
293 | * Creates the meta-model objects for the package. This method is |
294 | * guarded to have no affect on any invocation but its first. |
295 | * <!-- begin-user-doc --> |
296 | * <!-- end-user-doc --> |
297 | * @generated |
298 | */ |
299 | public void createPackageContents() { |
300 | if (isCreated) return; |
301 | isCreated = true; |
302 | |
303 | // Create classes and their features |
304 | completionFeatureEClass = createEClass(COMPLETION_FEATURE); |
305 | createEReference(completionFeatureEClass, COMPLETION_FEATURE__COPY_EXCEPTION); |
306 | createEReference(completionFeatureEClass, COMPLETION_FEATURE__DISAMBIGUATION_RULE); |
307 | createEReference(completionFeatureEClass, COMPLETION_FEATURE__TRANSFORMATION_FRAGMENT); |
308 | createEAttribute(completionFeatureEClass, COMPLETION_FEATURE__FEATURE_STATE); |
309 | |
310 | disambiguationRuleEClass = createEClass(DISAMBIGUATION_RULE); |
311 | createEReference(disambiguationRuleEClass, DISAMBIGUATION_RULE__FEATURE); |
312 | createEReference(disambiguationRuleEClass, DISAMBIGUATION_RULE__DISAMBIGUATION_CONDITION); |
313 | createEReference(disambiguationRuleEClass, DISAMBIGUATION_RULE__TRANSFORMATION_FRAGMENT); |
314 | |
315 | completionFeatureDiagramEClass = createEClass(COMPLETION_FEATURE_DIAGRAM); |
316 | createEReference(completionFeatureDiagramEClass, COMPLETION_FEATURE_DIAGRAM__ANNOTATABLE_ELEMENT_TYPE); |
317 | |
318 | completionSimpleEClass = createEClass(COMPLETION_SIMPLE); |
319 | |
320 | completionFeatureGroupEClass = createEClass(COMPLETION_FEATURE_GROUP); |
321 | |
322 | // Create enums |
323 | featureStateEEnum = createEEnum(FEATURE_STATE); |
324 | } |
325 | |
326 | /** |
327 | * <!-- begin-user-doc --> |
328 | * <!-- end-user-doc --> |
329 | * @generated |
330 | */ |
331 | private boolean isInitialized = false; |
332 | |
333 | /** |
334 | * Complete the initialization of the package and its meta-model. This |
335 | * method is guarded to have no affect on any invocation but its first. |
336 | * <!-- begin-user-doc --> |
337 | * <!-- end-user-doc --> |
338 | * @generated |
339 | */ |
340 | public void initializePackageContents() { |
341 | if (isInitialized) return; |
342 | isInitialized = true; |
343 | |
344 | // Initialize package |
345 | setName(eNAME); |
346 | setNsPrefix(eNS_PREFIX); |
347 | setNsURI(eNS_URI); |
348 | |
349 | // Obtain other dependent packages |
350 | featuremodelPackage thefeaturemodelPackage = (featuremodelPackage)EPackage.Registry.INSTANCE.getEPackage(featuremodelPackage.eNS_URI); |
351 | CopyExceptionPackage theCopyExceptionPackage = (CopyExceptionPackage)EPackage.Registry.INSTANCE.getEPackage(CopyExceptionPackage.eNS_URI); |
352 | QVTBasePackage theQVTBasePackage = (QVTBasePackage)EPackage.Registry.INSTANCE.getEPackage(QVTBasePackage.eNS_URI); |
353 | EssentialOCLPackage theEssentialOCLPackage = (EssentialOCLPackage)EPackage.Registry.INSTANCE.getEPackage(EssentialOCLPackage.eNS_URI); |
354 | EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); |
355 | |
356 | // Create type parameters |
357 | |
358 | // Set bounds for type parameters |
359 | |
360 | // Add supertypes to classes |
361 | completionFeatureEClass.getESuperTypes().add(thefeaturemodelPackage.getFeature()); |
362 | completionFeatureDiagramEClass.getESuperTypes().add(thefeaturemodelPackage.getFeatureDiagram()); |
363 | completionSimpleEClass.getESuperTypes().add(thefeaturemodelPackage.getSimple()); |
364 | completionFeatureGroupEClass.getESuperTypes().add(thefeaturemodelPackage.getFeatureGroup()); |
365 | |
366 | // Initialize classes and features; add operations and parameters |
367 | initEClass(completionFeatureEClass, CompletionFeature.class, "CompletionFeature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
368 | initEReference(getCompletionFeature_CopyException(), theCopyExceptionPackage.getException(), null, "copyException", null, 0, -1, CompletionFeature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
369 | initEReference(getCompletionFeature_DisambiguationRule(), this.getDisambiguationRule(), null, "disambiguationRule", null, 0, -1, CompletionFeature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
370 | initEReference(getCompletionFeature_TransformationFragment(), theQVTBasePackage.getTransformation(), null, "transformationFragment", null, 0, -1, CompletionFeature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
371 | initEAttribute(getCompletionFeature_FeatureState(), this.getFeatureState(), "FeatureState", "NOT_SET", 1, 1, CompletionFeature.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); |
372 | |
373 | addEOperation(completionFeatureEClass, this.getFeatureState(), "showFeatureState", 1, 1, IS_UNIQUE, !IS_ORDERED); |
374 | |
375 | initEClass(disambiguationRuleEClass, DisambiguationRule.class, "DisambiguationRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
376 | initEReference(getDisambiguationRule_Feature(), this.getCompletionFeature(), null, "feature", null, 0, 1, DisambiguationRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
377 | initEReference(getDisambiguationRule_DisambiguationCondition(), theEssentialOCLPackage.getOperationCallExp(), null, "disambiguationCondition", null, 0, -1, DisambiguationRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
378 | initEReference(getDisambiguationRule_TransformationFragment(), theQVTBasePackage.getTransformation(), null, "transformationFragment", null, 0, -1, DisambiguationRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
379 | |
380 | initEClass(completionFeatureDiagramEClass, CompletionFeatureDiagram.class, "CompletionFeatureDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
381 | initEReference(getCompletionFeatureDiagram_AnnotatableElementType(), theEcorePackage.getEClass(), null, "annotatableElementType", null, 1, 1, CompletionFeatureDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
382 | |
383 | initEClass(completionSimpleEClass, CompletionSimple.class, "CompletionSimple", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
384 | |
385 | initEClass(completionFeatureGroupEClass, CompletionFeatureGroup.class, "CompletionFeatureGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
386 | |
387 | // Initialize enums and add enum literals |
388 | initEEnum(featureStateEEnum, FeatureState.class, "FeatureState"); |
389 | addEEnumLiteral(featureStateEEnum, FeatureState.NOT_SET); |
390 | addEEnumLiteral(featureStateEEnum, FeatureState.OPTIONAL); |
391 | addEEnumLiteral(featureStateEEnum, FeatureState.MANDATORY); |
392 | |
393 | // Create resource |
394 | createResource(eNS_URI); |
395 | } |
396 | |
397 | } //completionfeaturemodelPackageImpl |