| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id$ |
| */ |
| package org.eclipse.mylyn.docs.epub.ocf.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.mylyn.docs.epub.ocf.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class OCFFactoryImpl extends EFactoryImpl implements OCFFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static OCFFactory init() { |
| try { |
| OCFFactory theOCFFactory = (OCFFactory)EPackage.Registry.INSTANCE.getEFactory(OCFPackage.eNS_URI); |
| if (theOCFFactory != null) { |
| return theOCFFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new OCFFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public OCFFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case OCFPackage.CONTAINER: return createContainer(); |
| case OCFPackage.ROOT_FILES: return createRootFiles(); |
| case OCFPackage.ROOT_FILE: return createRootFile(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mylyn.docs.epub.ocf.Container createContainer() { |
| ContainerImpl container = new ContainerImpl(); |
| return container; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RootFiles createRootFiles() { |
| RootFilesImpl rootFiles = new RootFilesImpl(); |
| return rootFiles; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RootFile createRootFile() { |
| RootFileImpl rootFile = new RootFileImpl(); |
| return rootFile; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public OCFPackage getOCFPackage() { |
| return (OCFPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static OCFPackage getPackage() { |
| return OCFPackage.eINSTANCE; |
| } |
| |
| } //OCFFactoryImpl |