KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > ecore > sdo > util > SDOAdapterFactory


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: SDOAdapterFactory.java,v 1.3 2005/06/08 06:24:25 nickb Exp $
16  */

17 package org.eclipse.emf.ecore.sdo.util;
18
19 import org.eclipse.emf.common.notify.Adapter;
20 import org.eclipse.emf.common.notify.Notifier;
21 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
22 import org.eclipse.emf.ecore.EObject;
23 import org.eclipse.emf.ecore.change.ChangeDescription;
24 import org.eclipse.emf.ecore.change.FeatureChange;
25 import org.eclipse.emf.ecore.sdo.*;
26
27 import org.eclipse.emf.ecore.xml.type.AnyType;
28 import org.eclipse.emf.ecore.xml.type.SimpleAnyType;
29
30 import commonj.sdo.ChangeSummary;
31 import commonj.sdo.DataGraph;
32 import commonj.sdo.DataObject;
33 import commonj.sdo.Property;
34 import commonj.sdo.Sequence;
35 import commonj.sdo.Type;
36
37 /**
38  * <!-- begin-user-doc -->
39  * The <b>Adapter Factory</b> for the model.
40  * It provides an adapter <code>createXXX</code> method for each class of the model.
41  * <!-- end-user-doc -->
42  * @see org.eclipse.emf.ecore.sdo.SDOPackage
43  * @generated
44  */

45 public class SDOAdapterFactory extends AdapterFactoryImpl
46 {
47   /**
48    * The cached model package.
49    * <!-- begin-user-doc -->
50    * <!-- end-user-doc -->
51    * @generated
52    */

53   protected static SDOPackage modelPackage;
54
55   /**
56    * Creates an instance of the adapter factory.
57    * <!-- begin-user-doc -->
58    * <!-- end-user-doc -->
59    * @generated
60    */

61   public SDOAdapterFactory()
62   {
63     if (modelPackage == null)
64     {
65       modelPackage = SDOPackage.eINSTANCE;
66     }
67   }
68
69   /**
70    * Returns whether this factory is applicable for the type of the object.
71    * <!-- begin-user-doc -->
72    * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
73    * <!-- end-user-doc -->
74    * @return whether this factory is applicable for the type of the object.
75    * @generated
76    */

77   public boolean isFactoryForType(Object JavaDoc object)
78   {
79     if (object == modelPackage)
80     {
81       return true;
82     }
83     if (object instanceof EObject)
84     {
85       return ((EObject)object).eClass().getEPackage() == modelPackage;
86     }
87     return false;
88   }
89
90   /**
91    * The switch the delegates to the <code>createXXX</code> methods.
92    * <!-- begin-user-doc -->
93    * <!-- end-user-doc -->
94    * @generated
95    */

96   protected SDOSwitch modelSwitch =
97     new SDOSwitch()
98     {
99       public Object JavaDoc caseEChangeSummary(EChangeSummary object)
100       {
101         return createEChangeSummaryAdapter();
102       }
103       public Object JavaDoc caseEChangeSummarySetting(EChangeSummarySetting object)
104       {
105         return createEChangeSummarySettingAdapter();
106       }
107       public Object JavaDoc caseEDataGraph(EDataGraph object)
108       {
109         return createEDataGraphAdapter();
110       }
111       public Object JavaDoc caseEDataObject(EDataObject object)
112       {
113         return createEDataObjectAdapter();
114       }
115       public Object JavaDoc caseEProperty(EProperty object)
116       {
117         return createEPropertyAdapter();
118       }
119       public Object JavaDoc caseChangeSummary(ChangeSummary object)
120       {
121         return createChangeSummaryAdapter();
122       }
123       public Object JavaDoc caseChangeSummarySetting(ChangeSummary.Setting object)
124       {
125         return createChangeSummarySettingAdapter();
126       }
127       public Object JavaDoc caseDataGraph(DataGraph object)
128       {
129         return createDataGraphAdapter();
130       }
131       public Object JavaDoc caseDataObject(DataObject object)
132       {
133         return createDataObjectAdapter();
134       }
135       public Object JavaDoc caseESequence(ESequence object)
136       {
137         return createESequenceAdapter();
138       }
139       public Object JavaDoc caseEType(EType object)
140       {
141         return createETypeAdapter();
142       }
143       public Object JavaDoc caseProperty(Property object)
144       {
145         return createPropertyAdapter();
146       }
147       public Object JavaDoc caseSequence(Sequence object)
148       {
149         return createSequenceAdapter();
150       }
151       public Object JavaDoc caseType(Type object)
152       {
153         return createTypeAdapter();
154       }
155       public Object JavaDoc caseInternalEDataObject(InternalEDataObject object)
156       {
157         return createInternalEDataObjectAdapter();
158       }
159       public Object JavaDoc caseEDataObjectAnyType(EDataObjectAnyType object)
160       {
161         return createEDataObjectAnyTypeAdapter();
162       }
163       public Object JavaDoc caseEDataObjectSimpleAnyType(EDataObjectSimpleAnyType object)
164       {
165         return createEDataObjectSimpleAnyTypeAdapter();
166       }
167       public Object JavaDoc caseChangeDescription(ChangeDescription object)
168       {
169         return createChangeDescriptionAdapter();
170       }
171       public Object JavaDoc caseFeatureChange(FeatureChange object)
172       {
173         return createFeatureChangeAdapter();
174       }
175       public Object JavaDoc caseAnyType(AnyType object)
176       {
177         return createAnyTypeAdapter();
178       }
179       public Object JavaDoc caseSimpleAnyType(SimpleAnyType object)
180       {
181         return createSimpleAnyTypeAdapter();
182       }
183       public Object JavaDoc defaultCase(EObject object)
184       {
185         return createEObjectAdapter();
186       }
187     };
188
189   /**
190    * Creates an adapter for the <code>target</code>.
191    * <!-- begin-user-doc -->
192    * <!-- end-user-doc -->
193    * @param target the object to adapt.
194    * @return the adapter for the <code>target</code>.
195    * @generated
196    */

197   public Adapter createAdapter(Notifier target)
198   {
199     return (Adapter)modelSwitch.doSwitch((EObject)target);
200   }
201
202
203   /**
204    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EDataObject <em>EData Object</em>}'.
205    * <!-- begin-user-doc -->
206    * This default implementation returns null so that we can easily ignore cases;
207    * it's useful to ignore a case when inheritance will catch all the cases anyway.
208    * <!-- end-user-doc -->
209    * @return the new adapter.
210    * @see org.eclipse.emf.ecore.sdo.EDataObject
211    * @generated
212    */

213   public Adapter createEDataObjectAdapter()
214   {
215     return null;
216   }
217
218   /**
219    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EDataGraph <em>EData Graph</em>}'.
220    * <!-- begin-user-doc -->
221    * This default implementation returns null so that we can easily ignore cases;
222    * it's useful to ignore a case when inheritance will catch all the cases anyway.
223    * <!-- end-user-doc -->
224    * @return the new adapter.
225    * @see org.eclipse.emf.ecore.sdo.EDataGraph
226    * @generated
227    */

228   public Adapter createEDataGraphAdapter()
229   {
230     return null;
231   }
232
233   /**
234    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EChangeSummary <em>EChange Summary</em>}'.
235    * <!-- begin-user-doc -->
236    * This default implementation returns null so that we can easily ignore cases;
237    * it's useful to ignore a case when inheritance will catch all the cases anyway.
238    * <!-- end-user-doc -->
239    * @return the new adapter.
240    * @see org.eclipse.emf.ecore.sdo.EChangeSummary
241    * @generated
242    */

243   public Adapter createEChangeSummaryAdapter()
244   {
245     return null;
246   }
247
248   /**
249    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EProperty <em>EProperty</em>}'.
250    * <!-- begin-user-doc -->
251    * This default implementation returns null so that we can easily ignore cases;
252    * it's useful to ignore a case when inheritance will catch all the cases anyway.
253    * <!-- end-user-doc -->
254    * @return the new adapter.
255    * @see org.eclipse.emf.ecore.sdo.EProperty
256    * @generated
257    */

258   public Adapter createEPropertyAdapter()
259   {
260     return null;
261   }
262
263   /**
264    * Creates a new adapter for an object of class '{@link commonj.sdo.DataObject <em>Data Object</em>}'.
265    * <!-- begin-user-doc -->
266    * This default implementation returns null so that we can easily ignore cases;
267    * it's useful to ignore a case when inheritance will catch all the cases anyway.
268    * <!-- end-user-doc -->
269    * @return the new adapter.
270    * @see commonj.sdo.DataObject
271    * @generated
272    */

273   public Adapter createDataObjectAdapter()
274   {
275     return null;
276   }
277
278   /**
279    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.util.ESequence <em>ESequence</em>}'.
280    * <!-- begin-user-doc -->
281    * This default implementation returns null so that we can easily ignore cases;
282    * it's useful to ignore a case when inheritance will catch all the cases anyway.
283    * <!-- end-user-doc -->
284    * @return the new adapter.
285    * @see org.eclipse.emf.ecore.sdo.util.ESequence
286    * @generated
287    */

288   public Adapter createESequenceAdapter()
289   {
290     return null;
291   }
292
293   /**
294    * Creates a new adapter for an object of class '{@link commonj.sdo.DataGraph <em>Data Graph</em>}'.
295    * <!-- begin-user-doc -->
296    * This default implementation returns null so that we can easily ignore cases;
297    * it's useful to ignore a case when inheritance will catch all the cases anyway.
298    * <!-- end-user-doc -->
299    * @return the new adapter.
300    * @see commonj.sdo.DataGraph
301    * @generated
302    */

303   public Adapter createDataGraphAdapter()
304   {
305     return null;
306   }
307
308   /**
309    * Creates a new adapter for an object of class '{@link commonj.sdo.ChangeSummary <em>Change Summary</em>}'.
310    * <!-- begin-user-doc -->
311    * This default implementation returns null so that we can easily ignore cases;
312    * it's useful to ignore a case when inheritance will catch all the cases anyway.
313    * <!-- end-user-doc -->
314    * @return the new adapter.
315    * @see commonj.sdo.ChangeSummary
316    * @generated
317    */

318   public Adapter createChangeSummaryAdapter()
319   {
320     return null;
321   }
322
323   /**
324    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EType <em>EType</em>}'.
325    * <!-- begin-user-doc -->
326    * This default implementation returns null so that we can easily ignore cases;
327    * it's useful to ignore a case when inheritance will catch all the cases anyway.
328    * <!-- end-user-doc -->
329    * @return the new adapter.
330    * @see org.eclipse.emf.ecore.sdo.EType
331    * @generated
332    */

333   public Adapter createETypeAdapter()
334   {
335     return null;
336   }
337
338   /**
339    * Creates a new adapter for an object of class '{@link commonj.sdo.Type <em>Type</em>}'.
340    * <!-- begin-user-doc -->
341    * This default implementation returns null so that we can easily ignore cases;
342    * it's useful to ignore a case when inheritance will catch all the cases anyway.
343    * <!-- end-user-doc -->
344    * @return the new adapter.
345    * @see commonj.sdo.Type
346    * @generated
347    */

348   public Adapter createTypeAdapter()
349   {
350     return null;
351   }
352
353   /**
354    * Creates a new adapter for an object of class '{@link commonj.sdo.Property <em>Property</em>}'.
355    * <!-- begin-user-doc -->
356    * This default implementation returns null so that we can easily ignore cases;
357    * it's useful to ignore a case when inheritance will catch all the cases anyway.
358    * <!-- end-user-doc -->
359    * @return the new adapter.
360    * @see commonj.sdo.Property
361    * @generated
362    */

363   public Adapter createPropertyAdapter()
364   {
365     return null;
366   }
367
368   /**
369    * Creates a new adapter for an object of class '{@link commonj.sdo.Sequence <em>Sequence</em>}'.
370    * <!-- begin-user-doc -->
371    * This default implementation returns null so that we can easily ignore cases;
372    * it's useful to ignore a case when inheritance will catch all the cases anyway.
373    * <!-- end-user-doc -->
374    * @return the new adapter.
375    * @see commonj.sdo.Sequence
376    * @generated
377    */

378   public Adapter createSequenceAdapter()
379   {
380     return null;
381   }
382
383   /**
384    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EChangeSummarySetting <em>EChange Summary Setting</em>}'.
385    * <!-- begin-user-doc -->
386    * This default implementation returns null so that we can easily ignore cases;
387    * it's useful to ignore a case when inheritance will catch all the cases anyway.
388    * <!-- end-user-doc -->
389    * @return the new adapter.
390    * @see org.eclipse.emf.ecore.sdo.EChangeSummarySetting
391    * @generated
392    */

393   public Adapter createEChangeSummarySettingAdapter()
394   {
395     return null;
396   }
397
398   /**
399    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.InternalEDataObject <em>Internal EData Object</em>}'.
400    * <!-- begin-user-doc -->
401    * This default implementation returns null so that we can easily ignore cases;
402    * it's useful to ignore a case when inheritance will catch all the cases anyway.
403    * <!-- end-user-doc -->
404    * @return the new adapter.
405    * @see org.eclipse.emf.ecore.sdo.InternalEDataObject
406    * @generated
407    */

408   public Adapter createInternalEDataObjectAdapter()
409   {
410     return null;
411   }
412
413   /**
414    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EDataObjectAnyType <em>EData Object Any Type</em>}'.
415    * <!-- begin-user-doc -->
416    * This default implementation returns null so that we can easily ignore cases;
417    * it's useful to ignore a case when inheritance will catch all the cases anyway.
418    * <!-- end-user-doc -->
419    * @return the new adapter.
420    * @see org.eclipse.emf.ecore.sdo.EDataObjectAnyType
421    * @generated
422    */

423   public Adapter createEDataObjectAnyTypeAdapter()
424   {
425     return null;
426   }
427
428   /**
429    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.sdo.EDataObjectSimpleAnyType <em>EData Object Simple Any Type</em>}'.
430    * <!-- begin-user-doc -->
431    * This default implementation returns null so that we can easily ignore cases;
432    * it's useful to ignore a case when inheritance will catch all the cases anyway.
433    * <!-- end-user-doc -->
434    * @return the new adapter.
435    * @see org.eclipse.emf.ecore.sdo.EDataObjectSimpleAnyType
436    * @generated
437    */

438   public Adapter createEDataObjectSimpleAnyTypeAdapter()
439   {
440     return null;
441   }
442
443   /**
444    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.change.ChangeDescription <em>Description</em>}'.
445    * <!-- begin-user-doc -->
446    * This default implementation returns null so that we can easily ignore cases;
447    * it's useful to ignore a case when inheritance will catch all the cases anyway.
448    * <!-- end-user-doc -->
449    * @return the new adapter.
450    * @see org.eclipse.emf.ecore.change.ChangeDescription
451    * @generated
452    */

453   public Adapter createChangeDescriptionAdapter()
454   {
455     return null;
456   }
457
458   /**
459    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.change.FeatureChange <em>Feature Change</em>}'.
460    * <!-- begin-user-doc -->
461    * This default implementation returns null so that we can easily ignore cases;
462    * it's useful to ignore a case when inheritance will catch all the cases anyway.
463    * <!-- end-user-doc -->
464    * @return the new adapter.
465    * @see org.eclipse.emf.ecore.change.FeatureChange
466    * @generated
467    */

468   public Adapter createFeatureChangeAdapter()
469   {
470     return null;
471   }
472
473   /**
474    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.AnyType <em>Any Type</em>}'.
475    * <!-- begin-user-doc -->
476    * This default implementation returns null so that we can easily ignore cases;
477    * it's useful to ignore a case when inheritance will catch all the cases anyway.
478    * <!-- end-user-doc -->
479    * @return the new adapter.
480    * @see org.eclipse.emf.ecore.xml.type.AnyType
481    * @generated
482    */

483   public Adapter createAnyTypeAdapter()
484   {
485     return null;
486   }
487
488   /**
489    * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.SimpleAnyType <em>Simple Any Type</em>}'.
490    * <!-- begin-user-doc -->
491    * This default implementation returns null so that we can easily ignore cases;
492    * it's useful to ignore a case when inheritance will catch all the cases anyway.
493    * <!-- end-user-doc -->
494    * @return the new adapter.
495    * @see org.eclipse.emf.ecore.xml.type.SimpleAnyType
496    * @generated
497    */

498   public Adapter createSimpleAnyTypeAdapter()
499   {
500     return null;
501   }
502
503   /**
504    * Creates a new adapter for an object of class '{@link commonj.sdo.ChangeSummary.Setting <em>Change Summary Setting</em>}'.
505    * <!-- begin-user-doc -->
506    * This default implementation returns null so that we can easily ignore cases;
507    * it's useful to ignore a case when inheritance will catch all the cases anyway.
508    * <!-- end-user-doc -->
509    * @return the new adapter.
510    * @see commonj.sdo.ChangeSummary.Setting
511    * @generated
512    */

513   public Adapter createChangeSummarySettingAdapter()
514   {
515     return null;
516   }
517
518   /**
519    * Creates a new adapter for the default case.
520    * <!-- begin-user-doc -->
521    * This default implementation returns null.
522    * <!-- end-user-doc -->
523    * @return the new adapter.
524    * @generated
525    */

526   public Adapter createEObjectAdapter()
527   {
528     return null;
529   }
530
531 } //SDOAdapterFactory
532
Popular Tags