1 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 45 public class SDOAdapterFactory extends AdapterFactoryImpl 46 { 47 53 protected static SDOPackage modelPackage; 54 55 61 public SDOAdapterFactory() 62 { 63 if (modelPackage == null) 64 { 65 modelPackage = SDOPackage.eINSTANCE; 66 } 67 } 68 69 77 public boolean isFactoryForType(Object 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 96 protected SDOSwitch modelSwitch = 97 new SDOSwitch() 98 { 99 public Object caseEChangeSummary(EChangeSummary object) 100 { 101 return createEChangeSummaryAdapter(); 102 } 103 public Object caseEChangeSummarySetting(EChangeSummarySetting object) 104 { 105 return createEChangeSummarySettingAdapter(); 106 } 107 public Object caseEDataGraph(EDataGraph object) 108 { 109 return createEDataGraphAdapter(); 110 } 111 public Object caseEDataObject(EDataObject object) 112 { 113 return createEDataObjectAdapter(); 114 } 115 public Object caseEProperty(EProperty object) 116 { 117 return createEPropertyAdapter(); 118 } 119 public Object caseChangeSummary(ChangeSummary object) 120 { 121 return createChangeSummaryAdapter(); 122 } 123 public Object caseChangeSummarySetting(ChangeSummary.Setting object) 124 { 125 return createChangeSummarySettingAdapter(); 126 } 127 public Object caseDataGraph(DataGraph object) 128 { 129 return createDataGraphAdapter(); 130 } 131 public Object caseDataObject(DataObject object) 132 { 133 return createDataObjectAdapter(); 134 } 135 public Object caseESequence(ESequence object) 136 { 137 return createESequenceAdapter(); 138 } 139 public Object caseEType(EType object) 140 { 141 return createETypeAdapter(); 142 } 143 public Object caseProperty(Property object) 144 { 145 return createPropertyAdapter(); 146 } 147 public Object caseSequence(Sequence object) 148 { 149 return createSequenceAdapter(); 150 } 151 public Object caseType(Type object) 152 { 153 return createTypeAdapter(); 154 } 155 public Object caseInternalEDataObject(InternalEDataObject object) 156 { 157 return createInternalEDataObjectAdapter(); 158 } 159 public Object caseEDataObjectAnyType(EDataObjectAnyType object) 160 { 161 return createEDataObjectAnyTypeAdapter(); 162 } 163 public Object caseEDataObjectSimpleAnyType(EDataObjectSimpleAnyType object) 164 { 165 return createEDataObjectSimpleAnyTypeAdapter(); 166 } 167 public Object caseChangeDescription(ChangeDescription object) 168 { 169 return createChangeDescriptionAdapter(); 170 } 171 public Object caseFeatureChange(FeatureChange object) 172 { 173 return createFeatureChangeAdapter(); 174 } 175 public Object caseAnyType(AnyType object) 176 { 177 return createAnyTypeAdapter(); 178 } 179 public Object caseSimpleAnyType(SimpleAnyType object) 180 { 181 return createSimpleAnyTypeAdapter(); 182 } 183 public Object defaultCase(EObject object) 184 { 185 return createEObjectAdapter(); 186 } 187 }; 188 189 197 public Adapter createAdapter(Notifier target) 198 { 199 return (Adapter)modelSwitch.doSwitch((EObject)target); 200 } 201 202 203 213 public Adapter createEDataObjectAdapter() 214 { 215 return null; 216 } 217 218 228 public Adapter createEDataGraphAdapter() 229 { 230 return null; 231 } 232 233 243 public Adapter createEChangeSummaryAdapter() 244 { 245 return null; 246 } 247 248 258 public Adapter createEPropertyAdapter() 259 { 260 return null; 261 } 262 263 273 public Adapter createDataObjectAdapter() 274 { 275 return null; 276 } 277 278 288 public Adapter createESequenceAdapter() 289 { 290 return null; 291 } 292 293 303 public Adapter createDataGraphAdapter() 304 { 305 return null; 306 } 307 308 318 public Adapter createChangeSummaryAdapter() 319 { 320 return null; 321 } 322 323 333 public Adapter createETypeAdapter() 334 { 335 return null; 336 } 337 338 348 public Adapter createTypeAdapter() 349 { 350 return null; 351 } 352 353 363 public Adapter createPropertyAdapter() 364 { 365 return null; 366 } 367 368 378 public Adapter createSequenceAdapter() 379 { 380 return null; 381 } 382 383 393 public Adapter createEChangeSummarySettingAdapter() 394 { 395 return null; 396 } 397 398 408 public Adapter createInternalEDataObjectAdapter() 409 { 410 return null; 411 } 412 413 423 public Adapter createEDataObjectAnyTypeAdapter() 424 { 425 return null; 426 } 427 428 438 public Adapter createEDataObjectSimpleAnyTypeAdapter() 439 { 440 return null; 441 } 442 443 453 public Adapter createChangeDescriptionAdapter() 454 { 455 return null; 456 } 457 458 468 public Adapter createFeatureChangeAdapter() 469 { 470 return null; 471 } 472 473 483 public Adapter createAnyTypeAdapter() 484 { 485 return null; 486 } 487 488 498 public Adapter createSimpleAnyTypeAdapter() 499 { 500 return null; 501 } 502 503 513 public Adapter createChangeSummarySettingAdapter() 514 { 515 return null; 516 } 517 518 526 public Adapter createEObjectAdapter() 527 { 528 return null; 529 } 530 531 } | Popular Tags |