/******************************************************************************* * Copyright (c) 2013-2016 Jean-Marie Gauthier, University of Franche-Comte, and Samares-Engineering * 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: * Jean-Marie Gauthier, University of Franche-Comte - initial API and implementation * Jean-Marie Gauthier, Samares-Engineering - Neon implementation *******************************************************************************/ /** */ package edu.ufc.femtost.disc.sysml4modelica.profile.other.impl; import edu.ufc.femtost.disc.sysml4modelica.profile.classes.classesPackage; import edu.ufc.femtost.disc.sysml4modelica.profile.classes.impl.classesPackageImpl; import edu.ufc.femtost.disc.sysml4modelica.profile.components.componentsPackage; import edu.ufc.femtost.disc.sysml4modelica.profile.components.impl.componentsPackageImpl; import edu.ufc.femtost.disc.sysml4modelica.profile.equationsandalgorithms.equationsandalgorithmsPackage; import edu.ufc.femtost.disc.sysml4modelica.profile.equationsandalgorithms.impl.equationsandalgorithmsPackageImpl; import edu.ufc.femtost.disc.sysml4modelica.profile.other.ModelicaAnnotation; import edu.ufc.femtost.disc.sysml4modelica.profile.other.ModelicaSimulation; import edu.ufc.femtost.disc.sysml4modelica.profile.other.otherFactory; import edu.ufc.femtost.disc.sysml4modelica.profile.other.otherPackage; import edu.ufc.femtost.disc.sysml4modelica.profile.sysml4modelica.impl.sysml4modelicaPackageImpl; import edu.ufc.femtost.disc.sysml4modelica.profile.sysml4modelica.sysml4modelicaPackage; import edu.ufc.femtost.disc.sysml4modelica.profile.types.impl.typesPackageImpl; import edu.ufc.femtost.disc.sysml4modelica.profile.types.typesPackage; 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; 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 otherPackageImpl extends EPackageImpl implements otherPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass modelicaAnnotationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass modelicaSimulationEClass = 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 edu.ufc.femtost.disc.sysml4modelica.profile.other.otherPackage#eNS_URI * @see #init() * @generated */ private otherPackageImpl() { super(eNS_URI, otherFactory.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 otherPackage#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 otherPackage init() { if (isInited) return (otherPackage)EPackage.Registry.INSTANCE.getEPackage(otherPackage.eNS_URI); // Obtain or create and register package otherPackageImpl theotherPackage = (otherPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof otherPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new otherPackageImpl()); isInited = true; // Initialize simple dependencies sysmlPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies sysml4modelicaPackageImpl thesysml4modelicaPackage = (sysml4modelicaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(sysml4modelicaPackage.eNS_URI) instanceof sysml4modelicaPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(sysml4modelicaPackage.eNS_URI) : sysml4modelicaPackage.eINSTANCE); classesPackageImpl theclassesPackage = (classesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(classesPackage.eNS_URI) instanceof classesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(classesPackage.eNS_URI) : classesPackage.eINSTANCE); typesPackageImpl thetypesPackage = (typesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(typesPackage.eNS_URI) instanceof typesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(typesPackage.eNS_URI) : typesPackage.eINSTANCE); componentsPackageImpl thecomponentsPackage = (componentsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(componentsPackage.eNS_URI) instanceof componentsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(componentsPackage.eNS_URI) : componentsPackage.eINSTANCE); equationsandalgorithmsPackageImpl theequationsandalgorithmsPackage = (equationsandalgorithmsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(equationsandalgorithmsPackage.eNS_URI) instanceof equationsandalgorithmsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(equationsandalgorithmsPackage.eNS_URI) : equationsandalgorithmsPackage.eINSTANCE); // Create package meta-data objects theotherPackage.createPackageContents(); thesysml4modelicaPackage.createPackageContents(); theclassesPackage.createPackageContents(); thetypesPackage.createPackageContents(); thecomponentsPackage.createPackageContents(); theequationsandalgorithmsPackage.createPackageContents(); // Initialize created meta-data theotherPackage.initializePackageContents(); thesysml4modelicaPackage.initializePackageContents(); theclassesPackage.initializePackageContents(); thetypesPackage.initializePackageContents(); thecomponentsPackage.initializePackageContents(); theequationsandalgorithmsPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theotherPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(otherPackage.eNS_URI, theotherPackage); return theotherPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getModelicaAnnotation() { return modelicaAnnotationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getModelicaAnnotation_Base_Comment() { return (EReference)modelicaAnnotationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getModelicaSimulation() { return modelicaSimulationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getModelicaSimulation_StartTime() { return (EAttribute)modelicaSimulationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getModelicaSimulation_StopTime() { return (EAttribute)modelicaSimulationEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getModelicaSimulation_Model() { return (EReference)modelicaSimulationEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public otherFactory getotherFactory() { return (otherFactory)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 modelicaAnnotationEClass = createEClass(MODELICA_ANNOTATION); createEReference(modelicaAnnotationEClass, MODELICA_ANNOTATION__BASE_COMMENT); modelicaSimulationEClass = createEClass(MODELICA_SIMULATION); createEAttribute(modelicaSimulationEClass, MODELICA_SIMULATION__START_TIME); createEAttribute(modelicaSimulationEClass, MODELICA_SIMULATION__STOP_TIME); createEReference(modelicaSimulationEClass, MODELICA_SIMULATION__MODEL); } /** * <!-- 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 UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); classesPackage theclassesPackage = (classesPackage)EPackage.Registry.INSTANCE.getEPackage(classesPackage.eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes // Initialize classes, features, and operations; add parameters initEClass(modelicaAnnotationEClass, ModelicaAnnotation.class, "ModelicaAnnotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getModelicaAnnotation_Base_Comment(), theUMLPackage.getComment(), null, "base_Comment", null, 1, 1, ModelicaAnnotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); initEClass(modelicaSimulationEClass, ModelicaSimulation.class, "ModelicaSimulation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getModelicaSimulation_StartTime(), theTypesPackage.getReal(), "startTime", "0.0", 1, 1, ModelicaSimulation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); initEAttribute(getModelicaSimulation_StopTime(), theTypesPackage.getReal(), "stopTime", "1.0", 1, 1, ModelicaSimulation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); initEReference(getModelicaSimulation_Model(), theclassesPackage.getModelicaModel(), null, "model", null, 1, 1, ModelicaSimulation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); // 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", "Other" }); } } //otherPackageImpl