KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > ecore > sdo > impl > SDOFactoryImpl


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2003-2004 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: SDOFactoryImpl.java,v 1.5 2005/06/08 06:24:25 nickb Exp $
16  */

17 package org.eclipse.emf.ecore.sdo.impl;
18
19
20 import org.eclipse.emf.ecore.EClass;
21 import org.eclipse.emf.ecore.EDataType;
22 import org.eclipse.emf.ecore.EObject;
23 import org.eclipse.emf.ecore.EStructuralFeature;
24 import org.eclipse.emf.ecore.impl.EFactoryImpl;
25 import org.eclipse.emf.ecore.sdo.*;
26
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 SDOFactoryImpl extends EFactoryImpl implements SDOFactory
35 {
36   /**
37    * Creates an instance of the factory.
38    * <!-- begin-user-doc -->
39    * <!-- end-user-doc -->
40    * @generated
41    */

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

52   public EObject create(EClass eClass)
53   {
54     switch (eClass.getClassifierID())
55     {
56       case SDOPackage.ECHANGE_SUMMARY: return createEChangeSummary();
57       case SDOPackage.ECHANGE_SUMMARY_SETTING: return createEChangeSummarySetting();
58       case SDOPackage.EDATA_GRAPH: return createEDataGraph();
59       case SDOPackage.EDATA_OBJECT: return createEDataObject();
60       case SDOPackage.EPROPERTY: return createEProperty();
61       case SDOPackage.ETYPE: return createEType();
62       case SDOPackage.EDATA_OBJECT_ANY_TYPE: return createEDataObjectAnyType();
63       case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE: return createEDataObjectSimpleAnyType();
64       default:
65         throw new IllegalArgumentException JavaDoc("The class '" + eClass.getName() + "' is not a valid classifier");
66     }
67   }
68
69   /**
70    * <!-- begin-user-doc -->
71    * <!-- end-user-doc -->
72    * @generated
73    */

74   public Object JavaDoc createFromString(EDataType eDataType, String JavaDoc initialValue)
75   {
76     switch (eDataType.getClassifierID())
77     {
78       default:
79         throw new IllegalArgumentException JavaDoc("The datatype '" + eDataType.getName() + "' is not a valid classifier");
80     }
81   }
82
83   /**
84    * <!-- begin-user-doc -->
85    * <!-- end-user-doc -->
86    * @generated
87    */

88   public String JavaDoc convertToString(EDataType eDataType, Object JavaDoc instanceValue)
89   {
90     switch (eDataType.getClassifierID())
91     {
92       default:
93         throw new IllegalArgumentException JavaDoc("The datatype '" + eDataType.getName() + "' is not a valid classifier");
94     }
95   }
96
97   /**
98    * <!-- begin-user-doc -->
99    * <!-- end-user-doc -->
100    * @generated
101    */

102   public EDataObject createEDataObject()
103   {
104     EDataObjectImpl eDataObject = new EDataObjectImpl();
105     return eDataObject;
106   }
107
108   /**
109    * <!-- begin-user-doc -->
110    * <!-- end-user-doc -->
111    * @generated
112    */

113   public EDataGraph createEDataGraph()
114   {
115     EDataGraphImpl eDataGraph = new EDataGraphImpl();
116     return eDataGraph;
117   }
118
119   /**
120    * <!-- begin-user-doc -->
121    * <!-- end-user-doc -->
122    * @generated
123    */

124   public EChangeSummary createEChangeSummary()
125   {
126     EChangeSummaryImpl eChangeSummary = new EChangeSummaryImpl();
127     return eChangeSummary;
128   }
129
130   /**
131    * <!-- begin-user-doc -->
132    * <!-- end-user-doc -->
133    * @generated
134    */

135   public EProperty createEProperty()
136   {
137     EPropertyImpl eProperty = new EPropertyImpl();
138     return eProperty;
139   }
140
141   /**
142    * <!-- begin-user-doc -->
143    * <!-- end-user-doc -->
144    * @generated
145    */

146   public EType createEType()
147   {
148     ETypeImpl eType = new ETypeImpl();
149     return eType;
150   }
151
152   /**
153    * <!-- begin-user-doc -->
154    * <!-- end-user-doc -->
155    * @generated
156    */

157   public EDataObjectAnyType createEDataObjectAnyType()
158   {
159     EDataObjectAnyTypeImpl eDataObjectAnyType = new EDataObjectAnyTypeImpl();
160     return eDataObjectAnyType;
161   }
162
163   /**
164    * <!-- begin-user-doc -->
165    * <!-- end-user-doc -->
166    * @generated
167    */

168   public EDataObjectSimpleAnyType createEDataObjectSimpleAnyType()
169   {
170     EDataObjectSimpleAnyTypeImpl eDataObjectSimpleAnyType = new EDataObjectSimpleAnyTypeImpl();
171     return eDataObjectSimpleAnyType;
172   }
173
174   /**
175    * <!-- begin-user-doc -->
176    * <!-- end-user-doc -->
177    * @generated
178    */

179   public EChangeSummarySetting createEChangeSummarySetting()
180   {
181     EChangeSummarySettingImpl eChangeSummarySetting = new EChangeSummarySettingImpl();
182     return eChangeSummarySetting;
183   }
184
185   /**
186    * <!-- begin-user-doc -->
187    * <!-- end-user-doc -->
188    * @generated
189    */

190   public SDOPackage getSDOPackage()
191   {
192     return (SDOPackage)getEPackage();
193   }
194
195   /**
196    * <!-- begin-user-doc -->
197    * <!-- end-user-doc -->
198    * @deprecated
199    * @generated
200    */

201   public static SDOPackage getPackage()
202   {
203     return SDOPackage.eINSTANCE;
204   }
205
206   public EChangeSummarySetting createEChangeSummarySetting(EStructuralFeature eStructuralFeature, Object JavaDoc value, boolean isSet)
207   {
208     EChangeSummarySettingImpl eChangeSummarySetting = new EChangeSummarySettingImpl(eStructuralFeature, value, isSet);
209     return eChangeSummarySetting;
210   }
211
212 } //SDOFactoryImpl
213
Popular Tags