/** | |
* ******************************************************************************* | |
* * 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-v20.html | |
* * | |
* * Contributors: Guillaume Doux - INRIA - Initial API and implementation | |
* * | |
* ****************************************************************************** | |
* | |
*/ | |
package org.eclipse.modisco.utils.chart.metamodel.internal.chart.impl; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.EObject; | |
import org.eclipse.emf.ecore.EPackage; | |
import org.eclipse.emf.ecore.impl.EFactoryImpl; | |
import org.eclipse.emf.ecore.plugin.EcorePlugin; | |
import org.eclipse.modisco.utils.chart.metamodel.internal.chart.*; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Factory</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class ChartFactoryImpl extends EFactoryImpl implements ChartFactory { | |
/** | |
* <!-- 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-v20.html\r\n * \r\n * Contributors: Guillaume Doux - INRIA - Initial API and implementation\r\n * \r\n ******************************************************************************\r\n"; | |
/** | |
* Creates the default factory implementation. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static ChartFactory init() { | |
try { | |
ChartFactory theChartFactory = (ChartFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/modisco/utils/chart/0.11.incubation/internal/chart"); | |
if (theChartFactory != null) { | |
return theChartFactory; | |
} | |
} | |
catch (Exception exception) { | |
EcorePlugin.INSTANCE.log(exception); | |
} | |
return new ChartFactoryImpl(); | |
} | |
/** | |
* Creates an instance of the factory. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public ChartFactoryImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EObject create(EClass eClass) { | |
switch (eClass.getClassifierID()) { | |
case ChartPackage.CHART: return createChart(); | |
case ChartPackage.AXE: return createAxe(); | |
case ChartPackage.SERIE: return createSerie(); | |
case ChartPackage.POINT: return createPoint(); | |
case ChartPackage.COORDINATE: return createCoordinate(); | |
default: | |
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Chart createChart() { | |
ChartImpl chart = new ChartImpl(); | |
return chart; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Axe createAxe() { | |
AxeImpl axe = new AxeImpl(); | |
return axe; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Serie createSerie() { | |
SerieImpl serie = new SerieImpl(); | |
return serie; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Point createPoint() { | |
PointImpl point = new PointImpl(); | |
return point; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public Coordinate createCoordinate() { | |
CoordinateImpl coordinate = new CoordinateImpl(); | |
return coordinate; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public ChartPackage getChartPackage() { | |
return (ChartPackage)getEPackage(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @deprecated | |
* @generated | |
*/ | |
@Deprecated | |
public static ChartPackage getPackage() { | |
return ChartPackage.eINSTANCE; | |
} | |
} //ChartFactoryImpl |