Regenerates EMF Compare static test profile.
[EMFCompare2.git] / plugins / org.eclipse.emf.compare.uml2.tests / profile / org / eclipse / emf / compare / uml2 / profile / test / uml2comparetestprofile / impl / UML2CompareTestProfilePackageImpl.java
blob5118a983241557c74499397d3683010e0bed9213
1 /*******************************************************************************
2 * Copyright (c) 2011, 2014 Obeo.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Obeo - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl;
13 import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche;
14 import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2;
15 import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3;
16 import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfileFactory;
17 import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
18 import org.eclipse.emf.ecore.EAttribute;
19 import org.eclipse.emf.ecore.EClass;
20 import org.eclipse.emf.ecore.EPackage;
21 import org.eclipse.emf.ecore.EReference;
22 import org.eclipse.emf.ecore.impl.EPackageImpl;
23 import org.eclipse.uml2.types.TypesPackage;
24 import org.eclipse.uml2.uml.UMLPackage;
26 /**
27 * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
29 * @generated
31 public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements UML2CompareTestProfilePackage {
32 /**
33 * <!-- begin-user-doc --> <!-- end-user-doc -->
35 * @generated
37 private EClass aClicheEClass = null;
39 /**
40 * <!-- begin-user-doc --> <!-- end-user-doc -->
42 * @generated
44 private EClass aCliche2EClass = null;
46 /**
47 * <!-- begin-user-doc --> <!-- end-user-doc -->
49 * @generated
51 private EClass aCliche3EClass = null;
53 /**
54 * Creates an instance of the model <b>Package</b>, registered with
55 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI value.
56 * <p>
57 * Note: the correct way to create the package is via the static factory method {@link #init init()},
58 * which also performs initialization of the package, or returns the registered package, if one already
59 * exists. <!-- begin-user-doc --> <!-- end-user-doc -->
61 * @see org.eclipse.emf.ecore.EPackage.Registry
62 * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#eNS_URI
63 * @see #init()
64 * @generated
66 private UML2CompareTestProfilePackageImpl() {
67 super(eNS_URI, UML2CompareTestProfileFactory.eINSTANCE);
70 /**
71 * <!-- begin-user-doc --> <!-- end-user-doc -->
73 * @generated
75 private static boolean isInited = false;
77 /**
78 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it
79 * depends.
80 * <p>
81 * This method is used to initialize {@link UML2CompareTestProfilePackage#eINSTANCE} when that field is
82 * accessed. Clients should not invoke it directly. Instead, they should simply access that field to
83 * obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
85 * @see #eNS_URI
86 * @see #createPackageContents()
87 * @see #initializePackageContents()
88 * @generated
90 public static UML2CompareTestProfilePackage init() {
91 if (isInited)
92 return (UML2CompareTestProfilePackage)EPackage.Registry.INSTANCE
93 .getEPackage(UML2CompareTestProfilePackage.eNS_URI);
95 // Obtain or create and register package
96 UML2CompareTestProfilePackageImpl theUML2CompareTestProfilePackage = (UML2CompareTestProfilePackageImpl)(EPackage.Registry.INSTANCE
97 .get(eNS_URI) instanceof UML2CompareTestProfilePackageImpl ? EPackage.Registry.INSTANCE
98 .get(eNS_URI) : new UML2CompareTestProfilePackageImpl());
100 isInited = true;
102 // Initialize simple dependencies
103 UMLPackage.eINSTANCE.eClass();
105 // Create package meta-data objects
106 theUML2CompareTestProfilePackage.createPackageContents();
108 // Initialize created meta-data
109 theUML2CompareTestProfilePackage.initializePackageContents();
111 // Mark meta-data to indicate it can't be changed
112 theUML2CompareTestProfilePackage.freeze();
114 // Update the registry and return the package
115 EPackage.Registry.INSTANCE.put(UML2CompareTestProfilePackage.eNS_URI,
116 theUML2CompareTestProfilePackage);
117 return theUML2CompareTestProfilePackage;
121 * <!-- begin-user-doc --> <!-- end-user-doc -->
123 * @generated
125 public EClass getACliche() {
126 return aClicheEClass;
130 * <!-- begin-user-doc --> <!-- end-user-doc -->
132 * @generated
134 public EAttribute getACliche_SingleValuedAttribute() {
135 return (EAttribute)aClicheEClass.getEStructuralFeatures().get(0);
139 * <!-- begin-user-doc --> <!-- end-user-doc -->
141 * @generated
143 public EAttribute getACliche_ManyValuedAttribute() {
144 return (EAttribute)aClicheEClass.getEStructuralFeatures().get(1);
148 * <!-- begin-user-doc --> <!-- end-user-doc -->
150 * @generated
152 public EReference getACliche_SingleValuedReference() {
153 return (EReference)aClicheEClass.getEStructuralFeatures().get(2);
157 * <!-- begin-user-doc --> <!-- end-user-doc -->
159 * @generated
161 public EReference getACliche_ManyValuedReference() {
162 return (EReference)aClicheEClass.getEStructuralFeatures().get(3);
166 * <!-- begin-user-doc --> <!-- end-user-doc -->
168 * @generated
170 public EReference getACliche_Base_Class() {
171 return (EReference)aClicheEClass.getEStructuralFeatures().get(4);
175 * <!-- begin-user-doc --> <!-- end-user-doc -->
177 * @generated
179 public EClass getACliche2() {
180 return aCliche2EClass;
184 * <!-- begin-user-doc --> <!-- end-user-doc -->
186 * @generated
188 public EAttribute getACliche2_SingleValuedAttribute() {
189 return (EAttribute)aCliche2EClass.getEStructuralFeatures().get(0);
193 * <!-- begin-user-doc --> <!-- end-user-doc -->
195 * @generated
197 public EAttribute getACliche2_ManyValuedAttribute() {
198 return (EAttribute)aCliche2EClass.getEStructuralFeatures().get(1);
202 * <!-- begin-user-doc --> <!-- end-user-doc -->
204 * @generated
206 public EReference getACliche2_SingleValuedReference() {
207 return (EReference)aCliche2EClass.getEStructuralFeatures().get(2);
211 * <!-- begin-user-doc --> <!-- end-user-doc -->
213 * @generated
215 public EReference getACliche2_ManyValuedReference() {
216 return (EReference)aCliche2EClass.getEStructuralFeatures().get(3);
220 * <!-- begin-user-doc --> <!-- end-user-doc -->
222 * @generated
224 public EReference getACliche2_Base_Class() {
225 return (EReference)aCliche2EClass.getEStructuralFeatures().get(4);
229 * <!-- begin-user-doc --> <!-- end-user-doc -->
231 * @generated
233 public EClass getACliche3() {
234 return aCliche3EClass;
238 * <!-- begin-user-doc --> <!-- end-user-doc -->
240 * @generated
242 public EReference getACliche3_Base_Class() {
243 return (EReference)aCliche3EClass.getEStructuralFeatures().get(0);
247 * <!-- begin-user-doc --> <!-- end-user-doc -->
249 * @generated
251 public UML2CompareTestProfileFactory getUML2CompareTestProfileFactory() {
252 return (UML2CompareTestProfileFactory)getEFactoryInstance();
256 * <!-- begin-user-doc --> <!-- end-user-doc -->
258 * @generated
260 private boolean isCreated = false;
263 * Creates the meta-model objects for the package. This method is guarded to have no affect on any
264 * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
266 * @generated
268 public void createPackageContents() {
269 if (isCreated)
270 return;
271 isCreated = true;
273 // Create classes and their features
274 aClicheEClass = createEClass(ACLICHE);
275 createEAttribute(aClicheEClass, ACLICHE__SINGLE_VALUED_ATTRIBUTE);
276 createEAttribute(aClicheEClass, ACLICHE__MANY_VALUED_ATTRIBUTE);
277 createEReference(aClicheEClass, ACLICHE__SINGLE_VALUED_REFERENCE);
278 createEReference(aClicheEClass, ACLICHE__MANY_VALUED_REFERENCE);
279 createEReference(aClicheEClass, ACLICHE__BASE_CLASS);
281 aCliche2EClass = createEClass(ACLICHE2);
282 createEAttribute(aCliche2EClass, ACLICHE2__SINGLE_VALUED_ATTRIBUTE);
283 createEAttribute(aCliche2EClass, ACLICHE2__MANY_VALUED_ATTRIBUTE);
284 createEReference(aCliche2EClass, ACLICHE2__SINGLE_VALUED_REFERENCE);
285 createEReference(aCliche2EClass, ACLICHE2__MANY_VALUED_REFERENCE);
286 createEReference(aCliche2EClass, ACLICHE2__BASE_CLASS);
288 aCliche3EClass = createEClass(ACLICHE3);
289 createEReference(aCliche3EClass, ACLICHE3__BASE_CLASS);
293 * <!-- begin-user-doc --> <!-- end-user-doc -->
295 * @generated
297 private boolean isInitialized = false;
300 * Complete the initialization of the package and its meta-model. This method is guarded to have no affect
301 * on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
303 * @generated
305 public void initializePackageContents() {
306 if (isInitialized)
307 return;
308 isInitialized = true;
310 // Initialize package
311 setName(eNAME);
312 setNsPrefix(eNS_PREFIX);
313 setNsURI(eNS_URI);
315 // Obtain other dependent packages
316 TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE
317 .getEPackage(TypesPackage.eNS_URI);
318 UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
320 // Create type parameters
322 // Set bounds for type parameters
324 // Add supertypes to classes
326 // Initialize classes and features; add operations and parameters
327 initEClass(aClicheEClass, ACliche.class,
328 "ACliche", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
329 initEAttribute(
330 getACliche_SingleValuedAttribute(),
331 theTypesPackage.getString(),
332 "singleValuedAttribute", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
333 initEAttribute(
334 getACliche_ManyValuedAttribute(),
335 theTypesPackage.getString(),
336 "manyValuedAttribute", null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
337 initEReference(
338 getACliche_SingleValuedReference(),
339 theUMLPackage.getClass_(),
340 null,
341 "singleValuedReference", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
342 initEReference(
343 getACliche_ManyValuedReference(),
344 theUMLPackage.getClass_(),
345 null,
346 "manyValuedReference", null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
347 initEReference(
348 getACliche_Base_Class(),
349 theUMLPackage.getClass_(),
350 null,
351 "base_Class", null, 1, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
353 initEClass(aCliche2EClass, ACliche2.class,
354 "ACliche2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
355 initEAttribute(
356 getACliche2_SingleValuedAttribute(),
357 theTypesPackage.getString(),
358 "singleValuedAttribute", null, 0, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
359 initEAttribute(
360 getACliche2_ManyValuedAttribute(),
361 theTypesPackage.getString(),
362 "manyValuedAttribute", null, 0, -1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
363 initEReference(
364 getACliche2_SingleValuedReference(),
365 theUMLPackage.getClass_(),
366 null,
367 "singleValuedReference", null, 0, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
368 initEReference(
369 getACliche2_ManyValuedReference(),
370 theUMLPackage.getClass_(),
371 null,
372 "manyValuedReference", null, 0, -1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
373 initEReference(
374 getACliche2_Base_Class(),
375 theUMLPackage.getClass_(),
376 null,
377 "base_Class", null, 1, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
379 initEClass(aCliche3EClass, ACliche3.class,
380 "ACliche3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
381 initEReference(
382 getACliche3_Base_Class(),
383 theUMLPackage.getClass_(),
384 null,
385 "base_Class", null, 1, 1, ACliche3.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
387 // Create resource
388 createResource(eNS_URI);
390 // Create annotations
391 // http://www.eclipse.org/uml2/2.0.0/UML
392 createUMLAnnotations();
396 * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>. <!-- begin-user-doc -->
397 * <!-- end-user-doc -->
399 * @generated
401 protected void createUMLAnnotations() {
402 String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$
403 addAnnotation(this, source, new String[] {"originalName", "UML2CompareTestProfile" //$NON-NLS-1$ //$NON-NLS-2$
407 } // UML2CompareTestProfilePackageImpl