/** | |
* ******************************************************************************* | |
* * Copyright (c) 2012 INRIA. 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: Guillaume Doux - INRIA - Initial API and implementation | |
* * | |
* ****************************************************************************** | |
* | |
*/ | |
package org.eclipse.modisco.utils.chart.metamodel.internal.chart.impl; | |
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.modisco.utils.chart.metamodel.internal.chart.Axe; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.Chart; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.ChartFactory; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.ChartPackage; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.Coordinate; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.Point; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.Serie; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Package</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class ChartPackageImpl extends EPackageImpl implements ChartPackage { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static final String copyright = "*******************************************************************************\r\n * Copyright (c) 2012 INRIA. All rights reserved. This program and the\r\n * accompanying materials are made available under the terms of the Eclipse\r\n * Public License v1.0 which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors: Guillaume Doux - INRIA - Initial API and implementation\r\n * \r\n ******************************************************************************\r\n"; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass chartEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass axeEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass serieEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass pointEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass coordinateEClass = 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.modisco.utils.chart.metamodel.internal.chart.ChartPackage#eNS_URI | |
* @see #init() | |
* @generated | |
*/ | |
private ChartPackageImpl() { | |
super(eNS_URI, ChartFactory.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 ChartPackage#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 ChartPackage init() { | |
if (isInited) return (ChartPackage)EPackage.Registry.INSTANCE.getEPackage(ChartPackage.eNS_URI); | |
// Obtain or create and register package | |
ChartPackageImpl theChartPackage = (ChartPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ChartPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ChartPackageImpl()); | |
isInited = true; | |
// Create package meta-data objects | |
theChartPackage.createPackageContents(); | |
// Initialize created meta-data | |
theChartPackage.initializePackageContents(); | |
// Mark meta-data to indicate it can't be changed | |
theChartPackage.freeze(); | |
// Update the registry and return the package | |
EPackage.Registry.INSTANCE.put(ChartPackage.eNS_URI, theChartPackage); | |
return theChartPackage; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getChart() { | |
return chartEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getChart_Axes() { | |
return (EReference)chartEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getChart_Series() { | |
return (EReference)chartEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getChart_Title() { | |
return (EAttribute)chartEClass.getEStructuralFeatures().get(2); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getAxe() { | |
return axeEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getAxe_Legend() { | |
return (EAttribute)axeEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getAxe_Unit() { | |
return (EAttribute)axeEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getSerie() { | |
return serieEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getSerie_Name() { | |
return (EAttribute)serieEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getSerie_Points() { | |
return (EReference)serieEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getPoint() { | |
return pointEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getPoint_Serie() { | |
return (EReference)pointEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getPoint_Coordinates() { | |
return (EReference)pointEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getCoordinate() { | |
return coordinateEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EReference getCoordinate_Axe() { | |
return (EReference)coordinateEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getCoordinate_Value() { | |
return (EAttribute)coordinateEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public ChartFactory getChartFactory() { | |
return (ChartFactory)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 | |
chartEClass = createEClass(CHART); | |
createEReference(chartEClass, CHART__AXES); | |
createEReference(chartEClass, CHART__SERIES); | |
createEAttribute(chartEClass, CHART__TITLE); | |
axeEClass = createEClass(AXE); | |
createEAttribute(axeEClass, AXE__LEGEND); | |
createEAttribute(axeEClass, AXE__UNIT); | |
serieEClass = createEClass(SERIE); | |
createEAttribute(serieEClass, SERIE__NAME); | |
createEReference(serieEClass, SERIE__POINTS); | |
pointEClass = createEClass(POINT); | |
createEReference(pointEClass, POINT__SERIE); | |
createEReference(pointEClass, POINT__COORDINATES); | |
coordinateEClass = createEClass(COORDINATE); | |
createEReference(coordinateEClass, COORDINATE__AXE); | |
createEAttribute(coordinateEClass, COORDINATE__VALUE); | |
} | |
/** | |
* <!-- 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 | |
// Initialize classes and features; add operations and parameters | |
initEClass(chartEClass, Chart.class, "Chart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEReference(getChart_Axes(), this.getAxe(), null, "axes", null, 0, -1, Chart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEReference(getChart_Series(), this.getSerie(), null, "series", null, 0, -1, Chart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEAttribute(getChart_Title(), ecorePackage.getEString(), "title", null, 0, 1, Chart.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(axeEClass, Axe.class, "Axe", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEAttribute(getAxe_Legend(), ecorePackage.getEString(), "legend", null, 0, 1, Axe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEAttribute(getAxe_Unit(), ecorePackage.getEString(), "unit", null, 0, 1, Axe.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(serieEClass, Serie.class, "Serie", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEAttribute(getSerie_Name(), ecorePackage.getEString(), "name", null, 0, 1, Serie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEReference(getSerie_Points(), this.getPoint(), this.getPoint_Serie(), "points", null, 0, -1, Serie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(pointEClass, Point.class, "Point", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEReference(getPoint_Serie(), this.getSerie(), this.getSerie_Points(), "serie", null, 1, 1, Point.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEReference(getPoint_Coordinates(), this.getCoordinate(), null, "coordinates", null, 0, -1, Point.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(coordinateEClass, Coordinate.class, "Coordinate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEReference(getCoordinate_Axe(), this.getAxe(), null, "axe", null, 0, 1, Coordinate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEAttribute(getCoordinate_Value(), ecorePackage.getEDouble(), "value", null, 0, 1, Coordinate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
// Create resource | |
createResource(eNS_URI); | |
} | |
} //ChartPackageImpl |