/* license-start
*
* Copyright (C) 2008 - 2013 Crispico, <http://www.crispico.com/>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details, at <http://www.gnu.org/licenses/>.
*
* Contributors:
* Crispico - Initial API and implementation
*
* license-end
*/
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.flowerplatform.emf_model.notation.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.flowerplatform.emf_model.notation.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class NotationFactoryImpl extends EFactoryImpl implements NotationFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static NotationFactory init() {
try {
NotationFactory theNotationFactory = (NotationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.flower-platform.com/xmi/notation_1.0.0");
if (theNotationFactory != null) {
return theNotationFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new NotationFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotationFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case NotationPackage.NODE: return createNode();
case NotationPackage.CATEGORY_SEPARATOR: return createCategorySeparator();
case NotationPackage.EDGE: return createEdge();
case NotationPackage.DIAGRAM: return createDiagram();
case NotationPackage.LOCATION: return createLocation();
case NotationPackage.BOUNDS: return createBounds();
case NotationPackage.NOTE: return createNote();
case NotationPackage.MIND_MAP_NODE: return createMindMapNode();
case NotationPackage.EXPANDABLE_NODE: return createExpandableNode();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Node createNode() {
NodeImpl node = new NodeImpl();
return node;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CategorySeparator createCategorySeparator() {
CategorySeparatorImpl categorySeparator = new CategorySeparatorImpl();
return categorySeparator;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Edge createEdge() {
EdgeImpl edge = new EdgeImpl();
return edge;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Diagram createDiagram() {
DiagramImpl diagram = new DiagramImpl();
return diagram;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Location createLocation() {
LocationImpl location = new LocationImpl();
return location;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Bounds createBounds() {
BoundsImpl bounds = new BoundsImpl();
return bounds;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Note createNote() {
NoteImpl note = new NoteImpl();
return note;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MindMapNode createMindMapNode() {
MindMapNodeImpl mindMapNode = new MindMapNodeImpl();
return mindMapNode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpandableNode createExpandableNode() {
ExpandableNodeImpl expandableNode = new ExpandableNodeImpl();
return expandableNode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotationPackage getNotationPackage() {
return (NotationPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static NotationPackage getPackage() {
return NotationPackage.eINSTANCE;
}
} //NotationFactoryImpl