/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * 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 at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Berlin, Germany * - initial API and implementation ******************************************************************************/ /** * <copyright> * </copyright> * * $Id$ */ package org.purl.dc.elements.dc.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.purl.dc.elements.dc.DCFactory; import org.purl.dc.elements.dc.DCPackage; import org.purl.dc.elements.dc.DocumentRoot; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class DCFactoryImpl extends EFactoryImpl implements DCFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DCFactory init() { try { DCFactory theDCFactory = (DCFactory)EPackage.Registry.INSTANCE.getEFactory("http://purl.org/dc/elements/1.1/"); if (theDCFactory != null) { return theDCFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DCFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DCFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case DCPackage.DOCUMENT_ROOT: return createDocumentRoot(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DocumentRoot createDocumentRoot() { DocumentRootImpl documentRoot = new DocumentRootImpl(); return documentRoot; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DCPackage getDCPackage() { return (DCPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static DCPackage getPackage() { return DCPackage.eINSTANCE; } } //DCFactoryImpl