KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > mapping > ecore2xml > impl > Ecore2XMLFactoryImpl


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2005 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: Ecore2XMLFactoryImpl.java,v 1.3 2005/06/21 16:17:03 khussey Exp $
16  */

17 package org.eclipse.emf.mapping.ecore2xml.impl;
18
19
20 import java.util.Map JavaDoc;
21
22 import org.eclipse.emf.ecore.EClass;
23 import org.eclipse.emf.ecore.EObject;
24
25 import org.eclipse.emf.ecore.impl.EFactoryImpl;
26 import org.eclipse.emf.mapping.ecore2xml.*;
27
28 /**
29  * <!-- begin-user-doc -->
30  * An implementation of the model <b>Factory</b>.
31  * <!-- end-user-doc -->
32  * @generated
33  */

34 public class Ecore2XMLFactoryImpl extends EFactoryImpl implements Ecore2XMLFactory
35 {
36   
37   /**
38    * Creates an instance of the factory.
39    * <!-- begin-user-doc -->
40    * <!-- end-user-doc -->
41    * @generated
42    */

43   public Ecore2XMLFactoryImpl()
44   {
45     super();
46   }
47
48   /**
49    * <!-- begin-user-doc -->
50    * <!-- end-user-doc -->
51    * @generated
52    */

53   public EObject create(EClass eClass)
54   {
55     switch (eClass.getClassifierID())
56     {
57       case Ecore2XMLPackage.XML_INFO: return createXMLInfo();
58       case Ecore2XMLPackage.XML_MAP: return createXMLMap();
59       case Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY: return (EObject)createENamedElementToXMLInfoMapEntry();
60       default:
61         throw new IllegalArgumentException JavaDoc("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
62
}
63   }
64
65   /**
66    * <!-- begin-user-doc -->
67    * <!-- end-user-doc -->
68    * @generated
69    */

70   public XMLInfo createXMLInfo()
71   {
72     XMLInfoImpl xmlInfo = new XMLInfoImpl();
73     return xmlInfo;
74   }
75
76   /**
77    * <!-- begin-user-doc -->
78    * <!-- end-user-doc -->
79    * @generated
80    */

81   public XMLMap createXMLMap()
82   {
83     XMLMapImpl xmlMap = new XMLMapImpl();
84     return xmlMap;
85   }
86
87   /**
88    * <!-- begin-user-doc -->
89    * <!-- end-user-doc -->
90    * @generated
91    */

92   public Map.Entry JavaDoc createENamedElementToXMLInfoMapEntry()
93   {
94     ENamedElementToXMLInfoMapEntryImpl eNamedElementToXMLInfoMapEntry = new ENamedElementToXMLInfoMapEntryImpl();
95     return eNamedElementToXMLInfoMapEntry;
96   }
97
98   /**
99    * <!-- begin-user-doc -->
100    * <!-- end-user-doc -->
101    * @generated
102    */

103   public Ecore2XMLPackage getEcore2XMLPackage()
104   {
105     return (Ecore2XMLPackage)getEPackage();
106   }
107
108   /**
109    * <!-- begin-user-doc -->
110    * <!-- end-user-doc -->
111    * @deprecated
112    * @generated
113    */

114   public static Ecore2XMLPackage getPackage()
115   {
116     return Ecore2XMLPackage.eINSTANCE;
117   }
118
119 } //Ecore2XMLFactoryImpl
120
Popular Tags