1 7 package org.enhydra.dods.editor.Doml.util; 8 9 import org.eclipse.emf.common.notify.Adapter; 10 import org.eclipse.emf.common.notify.Notifier; 11 12 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; 13 14 import org.eclipse.emf.ecore.EObject; 15 16 import org.enhydra.dods.editor.Doml.*; 17 18 26 public class DomlAdapterFactory extends AdapterFactoryImpl { 27 33 protected static DomlPackage modelPackage; 34 35 41 public DomlAdapterFactory() { 42 if (modelPackage == null) { 43 modelPackage = DomlPackage.eINSTANCE; 44 } 45 } 46 47 55 public boolean isFactoryForType(Object object) { 56 if (object == modelPackage) { 57 return true; 58 } 59 if (object instanceof EObject) { 60 return ((EObject)object).eClass().getEPackage() == modelPackage; 61 } 62 return false; 63 } 64 65 71 protected DomlSwitch modelSwitch = 72 new DomlSwitch() { 73 public Object caseColumnType(ColumnType object) { 74 return createColumnTypeAdapter(); 75 } 76 public Object caseDatabaseType(DatabaseType object) { 77 return createDatabaseTypeAdapter(); 78 } 79 public Object caseDocumentRoot(DocumentRoot object) { 80 return createDocumentRootAdapter(); 81 } 82 public Object caseDomlType(DomlType object) { 83 return createDomlTypeAdapter(); 84 } 85 public Object caseIndexColumnType(IndexColumnType object) { 86 return createIndexColumnTypeAdapter(); 87 } 88 public Object caseIndexType(IndexType object) { 89 return createIndexTypeAdapter(); 90 } 91 public Object casePackageType(PackageType object) { 92 return createPackageTypeAdapter(); 93 } 94 public Object caseReferenceObjectType(ReferenceObjectType object) { 95 return createReferenceObjectTypeAdapter(); 96 } 97 public Object caseTableType(TableType object) { 98 return createTableTypeAdapter(); 99 } 100 public Object caseTypeType(TypeType object) { 101 return createTypeTypeAdapter(); 102 } 103 public Object defaultCase(EObject object) { 104 return createEObjectAdapter(); 105 } 106 }; 107 108 116 public Adapter createAdapter(Notifier target) { 117 return (Adapter)modelSwitch.doSwitch((EObject)target); 118 } 119 120 121 131 public Adapter createColumnTypeAdapter() { 132 return null; 133 } 134 135 145 public Adapter createDatabaseTypeAdapter() { 146 return null; 147 } 148 149 159 public Adapter createDocumentRootAdapter() { 160 return null; 161 } 162 163 173 public Adapter createDomlTypeAdapter() { 174 return null; 175 } 176 177 187 public Adapter createIndexColumnTypeAdapter() { 188 return null; 189 } 190 191 201 public Adapter createIndexTypeAdapter() { 202 return null; 203 } 204 205 215 public Adapter createPackageTypeAdapter() { 216 return null; 217 } 218 219 229 public Adapter createReferenceObjectTypeAdapter() { 230 return null; 231 } 232 233 243 public Adapter createTableTypeAdapter() { 244 return null; 245 } 246 247 257 public Adapter createTypeTypeAdapter() { 258 return null; 259 } 260 261 269 public Adapter createEObjectAdapter() { 270 return null; 271 } 272 273 } | Popular Tags |