| /** |
| * Copyright (c) 2017 CEA LIST. 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 a; http://www.eclipse.org/legal/epl-v10.html Contributors: - Initial API and implementation Yupanqui Munoz Julho (CEA LIST) - Initial API and implementation |
| */ |
| package org.eclipse.papyrus.requirements.sysml.papyrusre.papyrusre.Glossary.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.papyrus.requirements.sysml.papyrusre.papyrusre.Glossary.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class GlossaryFactoryImpl extends EFactoryImpl implements GlossaryFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static GlossaryFactory init() { |
| try { |
| GlossaryFactory theGlossaryFactory = (GlossaryFactory)EPackage.Registry.INSTANCE.getEFactory(GlossaryPackage.eNS_URI); |
| if (theGlossaryFactory != null) { |
| return theGlossaryFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new GlossaryFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public GlossaryFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case GlossaryPackage.GLOSSARY: return createGlossary(); |
| case GlossaryPackage.TERM: return createTerm(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Glossary createGlossary() { |
| GlossaryImpl glossary = new GlossaryImpl(); |
| return glossary; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Term createTerm() { |
| TermImpl term = new TermImpl(); |
| return term; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public GlossaryPackage getGlossaryPackage() { |
| return (GlossaryPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static GlossaryPackage getPackage() { |
| return GlossaryPackage.eINSTANCE; |
| } |
| |
| } //GlossaryFactoryImpl |