/** * <copyright> * </copyright> * * $Id$ */ package edu.isistan.uima.unified.typesystems.srs.impl; import edu.isistan.uima.unified.typesystems.srs.*; 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; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class SRSFactoryImpl extends EFactoryImpl implements SRSFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static SRSFactory init() { try { SRSFactory theSRSFactory = (SRSFactory)EPackage.Registry.INSTANCE.getEFactory("http:///edu/isistan/uima/unified/typesystems/srs.ecore"); if (theSRSFactory != null) { return theSRSFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new SRSFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SRSFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case SRSPackage.DOCUMENT: return createDocument(); case SRSPackage.PROJECT: return createProject(); case SRSPackage.SECTION: return createSection(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Document createDocument() { DocumentImpl document = new DocumentImpl(); return document; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Project createProject() { ProjectImpl project = new ProjectImpl(); return project; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Section createSection() { SectionImpl section = new SectionImpl(); return section; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SRSPackage getSRSPackage() { return (SRSPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static SRSPackage getPackage() { return SRSPackage.eINSTANCE; } } //SRSFactoryImpl