| /** |
| * Copyright (c) 2018 CEA |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Jérémie Tatibouet (CEA) jeremie.tatibouet@cea.fr - Initial API and implementation |
| * Benoit Maggi (CEA) benoit.maggi@cea.fr - Initial API and implementation |
| * |
| */ |
| package org.eclipse.papyrus.iotml.software.impl; |
| |
| import org.eclipse.emf.ecore.EEnum; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EcorePackage; |
| |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| |
| import org.eclipse.papyrus.MARTE.MARTEPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.BasicNFP_Types.BasicNFP_TypesPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.GRM_BasicTypes.GRM_BasicTypesPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.MARTE_DataTypes.MARTE_DataTypesPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.MARTE_PrimitivesTypes.MARTE_PrimitivesTypesPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.MeasurementUnits.MeasurementUnitsPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.RS_Library.RS_LibraryPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.TimeLibrary.TimeLibraryPackage; |
| |
| import org.eclipse.papyrus.MARTE_Library.TimeTypesLibrary.TimeTypesLibraryPackage; |
| |
| import org.eclipse.papyrus.iotml.IoTMLPackage; |
| |
| import org.eclipse.papyrus.iotml.animate.AnimatePackage; |
| |
| import org.eclipse.papyrus.iotml.animate.impl.AnimatePackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hardware.HardwarePackage; |
| |
| import org.eclipse.papyrus.iotml.hardware.actuator.ActuatorPackage; |
| |
| import org.eclipse.papyrus.iotml.hardware.actuator.impl.ActuatorPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hardware.core.CorePackage; |
| |
| import org.eclipse.papyrus.iotml.hardware.core.impl.CorePackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hardware.impl.HardwarePackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hardware.network.NetworkPackage; |
| |
| import org.eclipse.papyrus.iotml.hardware.network.impl.NetworkPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hardware.sensor.SensorPackage; |
| |
| import org.eclipse.papyrus.iotml.hardware.sensor.impl.SensorPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.hybrid.HybridPackage; |
| |
| import org.eclipse.papyrus.iotml.hybrid.impl.HybridPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.impl.IoTMLPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.s3pml.S3pmlPackage; |
| import org.eclipse.papyrus.iotml.s3pml.hardware.store.StorePackage; |
| |
| import org.eclipse.papyrus.iotml.s3pml.hardware.store.impl.StorePackageImpl; |
| |
| import org.eclipse.papyrus.iotml.s3pml.impl.S3pmlPackageImpl; |
| import org.eclipse.papyrus.iotml.s3pml.protocol.ProtocolPackage; |
| |
| import org.eclipse.papyrus.iotml.s3pml.protocol.impl.ProtocolPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.software.Dummy; |
| import org.eclipse.papyrus.iotml.software.SoftwareFactory; |
| import org.eclipse.papyrus.iotml.software.SoftwarePackage; |
| |
| import org.eclipse.papyrus.iotml.software.artefact.ArtefactPackage; |
| |
| import org.eclipse.papyrus.iotml.software.artefact.impl.ArtefactPackageImpl; |
| |
| import org.eclipse.papyrus.iotml.software.core.structure.StructurePackage; |
| |
| import org.eclipse.papyrus.iotml.software.core.structure.impl.StructurePackageImpl; |
| |
| import org.eclipse.papyrus.iotml.software.resource.ResourcePackage; |
| |
| import org.eclipse.papyrus.iotml.software.resource.impl.ResourcePackageImpl; |
| |
| import org.eclipse.papyrus.sysml14.sysmlPackage; |
| |
| import org.eclipse.uml2.types.TypesPackage; |
| |
| import org.eclipse.uml2.uml.UMLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class SoftwarePackageImpl extends EPackageImpl implements SoftwarePackage { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum dummyEEnum = 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.papyrus.iotml.software.SoftwarePackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private SoftwarePackageImpl() { |
| super(eNS_URI, SoftwareFactory.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 SoftwarePackage#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 SoftwarePackage init() { |
| if (isInited) return (SoftwarePackage)EPackage.Registry.INSTANCE.getEPackage(SoftwarePackage.eNS_URI); |
| |
| // Obtain or create and register package |
| SoftwarePackageImpl theSoftwarePackage = (SoftwarePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SoftwarePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SoftwarePackageImpl()); |
| |
| isInited = true; |
| |
| // Initialize simple dependencies |
| EcorePackage.eINSTANCE.eClass(); |
| MARTEPackage.eINSTANCE.eClass(); |
| MARTE_PrimitivesTypesPackage.eINSTANCE.eClass(); |
| MeasurementUnitsPackage.eINSTANCE.eClass(); |
| GRM_BasicTypesPackage.eINSTANCE.eClass(); |
| BasicNFP_TypesPackage.eINSTANCE.eClass(); |
| MARTE_DataTypesPackage.eINSTANCE.eClass(); |
| TimeTypesLibraryPackage.eINSTANCE.eClass(); |
| TimeLibraryPackage.eINSTANCE.eClass(); |
| RS_LibraryPackage.eINSTANCE.eClass(); |
| sysmlPackage.eINSTANCE.eClass(); |
| TypesPackage.eINSTANCE.eClass(); |
| UMLPackage.eINSTANCE.eClass(); |
| |
| // Obtain or create and register interdependencies |
| IoTMLPackageImpl theIoTMLPackage = (IoTMLPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(IoTMLPackage.eNS_URI) instanceof IoTMLPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(IoTMLPackage.eNS_URI) : IoTMLPackage.eINSTANCE); |
| AnimatePackageImpl theAnimatePackage = (AnimatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AnimatePackage.eNS_URI) instanceof AnimatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AnimatePackage.eNS_URI) : AnimatePackage.eINSTANCE); |
| HardwarePackageImpl theHardwarePackage = (HardwarePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(HardwarePackage.eNS_URI) instanceof HardwarePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(HardwarePackage.eNS_URI) : HardwarePackage.eINSTANCE); |
| ActuatorPackageImpl theActuatorPackage = (ActuatorPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ActuatorPackage.eNS_URI) instanceof ActuatorPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActuatorPackage.eNS_URI) : ActuatorPackage.eINSTANCE); |
| SensorPackageImpl theSensorPackage = (SensorPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SensorPackage.eNS_URI) instanceof SensorPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SensorPackage.eNS_URI) : SensorPackage.eINSTANCE); |
| NetworkPackageImpl theNetworkPackage = (NetworkPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NetworkPackage.eNS_URI) instanceof NetworkPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NetworkPackage.eNS_URI) : NetworkPackage.eINSTANCE); |
| CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE); |
| S3pmlPackageImpl theS3pmlPackage = (S3pmlPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(S3pmlPackage.eNS_URI) instanceof S3pmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(S3pmlPackage.eNS_URI) : S3pmlPackage.eINSTANCE); |
| org.eclipse.papyrus.iotml.s3pml.software.impl.SoftwarePackageImpl theSoftwarePackage_1 = (org.eclipse.papyrus.iotml.s3pml.software.impl.SoftwarePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.s3pml.software.SoftwarePackage.eNS_URI) instanceof org.eclipse.papyrus.iotml.s3pml.software.impl.SoftwarePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.s3pml.software.SoftwarePackage.eNS_URI) : org.eclipse.papyrus.iotml.s3pml.software.SoftwarePackage.eINSTANCE); |
| ProtocolPackageImpl theProtocolPackage = (ProtocolPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProtocolPackage.eNS_URI) instanceof ProtocolPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProtocolPackage.eNS_URI) : ProtocolPackage.eINSTANCE); |
| org.eclipse.papyrus.iotml.s3pml.hardware.impl.HardwarePackageImpl theHardwarePackage_1 = (org.eclipse.papyrus.iotml.s3pml.hardware.impl.HardwarePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.s3pml.hardware.HardwarePackage.eNS_URI) instanceof org.eclipse.papyrus.iotml.s3pml.hardware.impl.HardwarePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.s3pml.hardware.HardwarePackage.eNS_URI) : org.eclipse.papyrus.iotml.s3pml.hardware.HardwarePackage.eINSTANCE); |
| StorePackageImpl theStorePackage = (StorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) instanceof StorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) : StorePackage.eINSTANCE); |
| org.eclipse.papyrus.iotml.software.core.impl.CorePackageImpl theCorePackage_1 = (org.eclipse.papyrus.iotml.software.core.impl.CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.software.core.CorePackage.eNS_URI) instanceof org.eclipse.papyrus.iotml.software.core.impl.CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.software.core.CorePackage.eNS_URI) : org.eclipse.papyrus.iotml.software.core.CorePackage.eINSTANCE); |
| StructurePackageImpl theStructurePackage = (StructurePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StructurePackage.eNS_URI) instanceof StructurePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StructurePackage.eNS_URI) : StructurePackage.eINSTANCE); |
| ResourcePackageImpl theResourcePackage = (ResourcePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI) instanceof ResourcePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI) : ResourcePackage.eINSTANCE); |
| ArtefactPackageImpl theArtefactPackage = (ArtefactPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI) instanceof ArtefactPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI) : ArtefactPackage.eINSTANCE); |
| HybridPackageImpl theHybridPackage = (HybridPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(HybridPackage.eNS_URI) instanceof HybridPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(HybridPackage.eNS_URI) : HybridPackage.eINSTANCE); |
| |
| // Create package meta-data objects |
| theSoftwarePackage.createPackageContents(); |
| theIoTMLPackage.createPackageContents(); |
| theAnimatePackage.createPackageContents(); |
| theHardwarePackage.createPackageContents(); |
| theActuatorPackage.createPackageContents(); |
| theSensorPackage.createPackageContents(); |
| theNetworkPackage.createPackageContents(); |
| theCorePackage.createPackageContents(); |
| theS3pmlPackage.createPackageContents(); |
| theSoftwarePackage_1.createPackageContents(); |
| theProtocolPackage.createPackageContents(); |
| theHardwarePackage_1.createPackageContents(); |
| theStorePackage.createPackageContents(); |
| theCorePackage_1.createPackageContents(); |
| theStructurePackage.createPackageContents(); |
| theResourcePackage.createPackageContents(); |
| theArtefactPackage.createPackageContents(); |
| theHybridPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theSoftwarePackage.initializePackageContents(); |
| theIoTMLPackage.initializePackageContents(); |
| theAnimatePackage.initializePackageContents(); |
| theHardwarePackage.initializePackageContents(); |
| theActuatorPackage.initializePackageContents(); |
| theSensorPackage.initializePackageContents(); |
| theNetworkPackage.initializePackageContents(); |
| theCorePackage.initializePackageContents(); |
| theS3pmlPackage.initializePackageContents(); |
| theSoftwarePackage_1.initializePackageContents(); |
| theProtocolPackage.initializePackageContents(); |
| theHardwarePackage_1.initializePackageContents(); |
| theStorePackage.initializePackageContents(); |
| theCorePackage_1.initializePackageContents(); |
| theStructurePackage.initializePackageContents(); |
| theResourcePackage.initializePackageContents(); |
| theArtefactPackage.initializePackageContents(); |
| theHybridPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theSoftwarePackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(SoftwarePackage.eNS_URI, theSoftwarePackage); |
| return theSoftwarePackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getDummy() { |
| return dummyEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SoftwareFactory getSoftwareFactory() { |
| return (SoftwareFactory)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 enums |
| dummyEEnum = createEEnum(DUMMY); |
| } |
| |
| /** |
| * <!-- 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); |
| |
| // Obtain other dependent packages |
| org.eclipse.papyrus.iotml.software.core.CorePackage theCorePackage_1 = (org.eclipse.papyrus.iotml.software.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.iotml.software.core.CorePackage.eNS_URI); |
| ResourcePackage theResourcePackage = (ResourcePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcePackage.eNS_URI); |
| ArtefactPackage theArtefactPackage = (ArtefactPackage)EPackage.Registry.INSTANCE.getEPackage(ArtefactPackage.eNS_URI); |
| |
| // Add subpackages |
| getESubpackages().add(theCorePackage_1); |
| getESubpackages().add(theResourcePackage); |
| getESubpackages().add(theArtefactPackage); |
| |
| // Initialize enums and add enum literals |
| initEEnum(dummyEEnum, Dummy.class, "Dummy"); |
| |
| // Create annotations |
| // http://www.eclipse.org/uml2/2.0.0/UML |
| createUMLAnnotations(); |
| } |
| |
| /** |
| * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void createUMLAnnotations() { |
| String source = "http://www.eclipse.org/uml2/2.0.0/UML"; |
| addAnnotation |
| (this, |
| source, |
| new String[] { |
| "originalName", "Software" |
| }); |
| } |
| |
| } //SoftwarePackageImpl |