/**
* <copyright>
* </copyright>
*
* $Id$
*/
package uima.tcas.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 uima.tcas.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class TCasFactoryImpl extends EFactoryImpl implements TCasFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TCasFactory init() {
try {
TCasFactory theTCasFactory = (TCasFactory)EPackage.Registry.INSTANCE.getEFactory("http:///uima/tcas.ecore");
if (theTCasFactory != null) {
return theTCasFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new TCasFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TCasFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case TCasPackage.ANNOTATION: return createAnnotation();
case TCasPackage.DOCUMENT_ANNOTATION: return createDocumentAnnotation();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Annotation createAnnotation() {
AnnotationImpl annotation = new AnnotationImpl();
return annotation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DocumentAnnotation createDocumentAnnotation() {
DocumentAnnotationImpl documentAnnotation = new DocumentAnnotationImpl();
return documentAnnotation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TCasPackage getTCasPackage() {
return (TCasPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static TCasPackage getPackage() {
return TCasPackage.eINSTANCE;
}
} //TCasFactoryImpl