| /** |
| * ******************************************************************************* |
| * Copyright (c) 2020 Robert Bosch GmbH and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.validation.core.test.model.impl; |
| |
| import org.eclipse.app4mc.validation.core.test.model.BaseObject; |
| import org.eclipse.app4mc.validation.core.test.model.ElementB1; |
| import org.eclipse.app4mc.validation.core.test.model.ElementN1; |
| import org.eclipse.app4mc.validation.core.test.model.ElementN2; |
| import org.eclipse.app4mc.validation.core.test.model.ElementN3; |
| import org.eclipse.app4mc.validation.core.test.model.ElementS1; |
| import org.eclipse.app4mc.validation.core.test.model.ElementS2; |
| import org.eclipse.app4mc.validation.core.test.model.ElementS3; |
| import org.eclipse.app4mc.validation.core.test.model.NormalObject; |
| import org.eclipse.app4mc.validation.core.test.model.Root; |
| import org.eclipse.app4mc.validation.core.test.model.SpecialObject; |
| import org.eclipse.app4mc.validation.core.test.model.TestmodelFactory; |
| import org.eclipse.app4mc.validation.core.test.model.TestmodelPackage; |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EReference; |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class TestmodelPackageImpl extends EPackageImpl implements TestmodelPackage { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final String copyright = "*******************************************************************************\n Copyright (c) 2020 Robert Bosch GmbH and others.\n\n This program and the accompanying materials are made\n available under the terms of the Eclipse Public License 2.0\n which is available at https://www.eclipse.org/legal/epl-2.0/\n\n SPDX-License-Identifier: EPL-2.0\n\n Generated using Eclipse EMF\n\n*******************************************************************************"; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass baseObjectEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass normalObjectEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass specialObjectEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass rootEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementB1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementN1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementN2EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementN3EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementS1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementS2EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementS3EClass = null; |
| |
| /** |
| * Creates an instance of the model <b>Package</b>, registered with |
| * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
| * package URI value. |
| * <p>Note: the correct way to create the package is via the static |
| * factory method {@link #init init()}, which also performs |
| * initialization of the package, or returns the registered package, |
| * if one already exists. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see org.eclipse.emf.ecore.EPackage.Registry |
| * @see org.eclipse.app4mc.validation.core.test.model.TestmodelPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private TestmodelPackageImpl() { |
| super(eNS_URI, TestmodelFactory.eINSTANCE); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static boolean isInited = false; |
| |
| /** |
| * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
| * |
| * <p>This method is used to initialize {@link TestmodelPackage#eINSTANCE} when that field is accessed. |
| * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #eNS_URI |
| * @see #createPackageContents() |
| * @see #initializePackageContents() |
| * @generated |
| */ |
| public static TestmodelPackage init() { |
| if (isInited) return (TestmodelPackage)EPackage.Registry.INSTANCE.getEPackage(TestmodelPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| Object registeredTestmodelPackage = EPackage.Registry.INSTANCE.get(eNS_URI); |
| TestmodelPackageImpl theTestmodelPackage = registeredTestmodelPackage instanceof TestmodelPackageImpl ? (TestmodelPackageImpl)registeredTestmodelPackage : new TestmodelPackageImpl(); |
| |
| isInited = true; |
| |
| // Create package meta-data objects |
| theTestmodelPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theTestmodelPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theTestmodelPackage.freeze(); |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(TestmodelPackage.eNS_URI, theTestmodelPackage); |
| return theTestmodelPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getBaseObject() { |
| return baseObjectEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getBaseObject_Name() { |
| return (EAttribute)baseObjectEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getNormalObject() { |
| return normalObjectEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalObject_NormalDescription() { |
| return (EAttribute)normalObjectEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalObject_NormalCount() { |
| return (EAttribute)normalObjectEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getSpecialObject() { |
| return specialObjectEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getSpecialObject_SpecialDescription() { |
| return (EAttribute)specialObjectEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getSpecialObject_SpecialCount() { |
| return (EAttribute)specialObjectEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getRoot() { |
| return rootEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EReference getRoot_BaseObjects() { |
| return (EReference)rootEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EReference getRoot_NormalObjects() { |
| return (EReference)rootEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EReference getRoot_SpecialObjects() { |
| return (EReference)rootEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementB1() { |
| return elementB1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementN1() { |
| return elementN1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementN2() { |
| return elementN2EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementN3() { |
| return elementN3EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementS1() { |
| return elementS1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementS2() { |
| return elementS2EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getElementS3() { |
| return elementS3EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public TestmodelFactory getTestmodelFactory() { |
| return (TestmodelFactory)getEFactoryInstance(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isCreated = false; |
| |
| /** |
| * Creates the meta-model objects for the package. This method is |
| * guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void createPackageContents() { |
| if (isCreated) return; |
| isCreated = true; |
| |
| // Create classes and their features |
| baseObjectEClass = createEClass(BASE_OBJECT); |
| createEAttribute(baseObjectEClass, BASE_OBJECT__NAME); |
| |
| normalObjectEClass = createEClass(NORMAL_OBJECT); |
| createEAttribute(normalObjectEClass, NORMAL_OBJECT__NORMAL_DESCRIPTION); |
| createEAttribute(normalObjectEClass, NORMAL_OBJECT__NORMAL_COUNT); |
| |
| specialObjectEClass = createEClass(SPECIAL_OBJECT); |
| createEAttribute(specialObjectEClass, SPECIAL_OBJECT__SPECIAL_DESCRIPTION); |
| createEAttribute(specialObjectEClass, SPECIAL_OBJECT__SPECIAL_COUNT); |
| |
| rootEClass = createEClass(ROOT); |
| createEReference(rootEClass, ROOT__BASE_OBJECTS); |
| createEReference(rootEClass, ROOT__NORMAL_OBJECTS); |
| createEReference(rootEClass, ROOT__SPECIAL_OBJECTS); |
| |
| elementB1EClass = createEClass(ELEMENT_B1); |
| |
| elementN1EClass = createEClass(ELEMENT_N1); |
| |
| elementN2EClass = createEClass(ELEMENT_N2); |
| |
| elementN3EClass = createEClass(ELEMENT_N3); |
| |
| elementS1EClass = createEClass(ELEMENT_S1); |
| |
| elementS2EClass = createEClass(ELEMENT_S2); |
| |
| elementS3EClass = createEClass(ELEMENT_S3); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isInitialized = false; |
| |
| /** |
| * Complete the initialization of the package and its meta-model. This |
| * method is guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void initializePackageContents() { |
| if (isInitialized) return; |
| isInitialized = true; |
| |
| // Initialize package |
| setName(eNAME); |
| setNsPrefix(eNS_PREFIX); |
| setNsURI(eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| normalObjectEClass.getESuperTypes().add(getBaseObject()); |
| specialObjectEClass.getESuperTypes().add(getBaseObject()); |
| rootEClass.getESuperTypes().add(getBaseObject()); |
| elementB1EClass.getESuperTypes().add(getBaseObject()); |
| elementN1EClass.getESuperTypes().add(getNormalObject()); |
| elementN2EClass.getESuperTypes().add(getNormalObject()); |
| elementN3EClass.getESuperTypes().add(getNormalObject()); |
| elementS1EClass.getESuperTypes().add(getSpecialObject()); |
| elementS2EClass.getESuperTypes().add(getSpecialObject()); |
| elementS3EClass.getESuperTypes().add(getSpecialObject()); |
| |
| // Initialize classes, features, and operations; add parameters |
| initEClass(baseObjectEClass, BaseObject.class, "BaseObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getBaseObject_Name(), ecorePackage.getEString(), "name", null, 0, 1, BaseObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(normalObjectEClass, NormalObject.class, "NormalObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getNormalObject_NormalDescription(), ecorePackage.getEString(), "normalDescription", null, 0, 1, NormalObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getNormalObject_NormalCount(), ecorePackage.getEInt(), "normalCount", null, 0, 1, NormalObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(specialObjectEClass, SpecialObject.class, "SpecialObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getSpecialObject_SpecialDescription(), ecorePackage.getEString(), "specialDescription", null, 0, 1, SpecialObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getSpecialObject_SpecialCount(), ecorePackage.getEInt(), "specialCount", null, 0, 1, SpecialObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getRoot_BaseObjects(), getBaseObject(), null, "baseObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getRoot_NormalObjects(), getNormalObject(), null, "normalObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getRoot_SpecialObjects(), getSpecialObject(), null, "specialObjects", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(elementB1EClass, ElementB1.class, "ElementB1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementN1EClass, ElementN1.class, "ElementN1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementN2EClass, ElementN2.class, "ElementN2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementN3EClass, ElementN3.class, "ElementN3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementS1EClass, ElementS1.class, "ElementS1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementS2EClass, ElementS2.class, "ElementS2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(elementS3EClass, ElementS3.class, "ElementS3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| // Create resource |
| createResource(eNS_URI); |
| } |
| |
| } //TestmodelPackageImpl |