1 17 package org.eclipse.emf.mapping.impl; 18 19 20 import org.eclipse.emf.ecore.EAttribute; 21 import org.eclipse.emf.ecore.EClass; 22 import org.eclipse.emf.ecore.EPackage; 23 import org.eclipse.emf.ecore.EReference; 24 import org.eclipse.emf.ecore.EcorePackage; 25 import org.eclipse.emf.ecore.impl.EPackageImpl; 26 import org.eclipse.emf.ecore.impl.EcorePackageImpl; 27 import org.eclipse.emf.mapping.ComplexTypeConverter; 28 import org.eclipse.emf.mapping.FunctionNamePair; 29 import org.eclipse.emf.mapping.FunctionPair; 30 import org.eclipse.emf.mapping.Mapping; 31 import org.eclipse.emf.mapping.MappingFactory; 32 import org.eclipse.emf.mapping.MappingHelper; 33 import org.eclipse.emf.mapping.MappingPackage; 34 import org.eclipse.emf.mapping.MappingRoot; 35 import org.eclipse.emf.mapping.MappingStrategy; 36 import org.eclipse.emf.mapping.TypeConverter; 37 38 39 45 public class MappingPackageImpl extends EPackageImpl implements MappingPackage 46 { 47 52 private EClass mappingHelperEClass = null; 53 54 59 private EClass mappingEClass = null; 60 61 66 private EClass typeConverterEClass = null; 67 68 73 private EClass functionPairEClass = null; 74 75 80 private EClass functionNamePairEClass = null; 81 82 87 private EClass mappingStrategyEClass = null; 88 89 94 private EClass mappingRootEClass = null; 95 96 101 private EClass complexTypeConverterEClass = null; 102 103 118 private MappingPackageImpl() 119 { 120 super(eNS_URI, MappingFactory.eINSTANCE); 121 } 122 123 128 private static boolean isInited = false; 129 130 152 public static MappingPackage init() 153 { 154 if (isInited) return (MappingPackage)EPackage.Registry.INSTANCE.getEPackage(MappingPackage.eNS_URI); 155 156 MappingPackageImpl theMappingPackage = (MappingPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof MappingPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new MappingPackageImpl()); 158 159 isInited = true; 160 161 EcorePackageImpl.init(); 163 164 theMappingPackage.createPackageContents(); 166 167 theMappingPackage.initializePackageContents(); 169 170 theMappingPackage.freeze(); 172 173 return theMappingPackage; 174 } 175 176 181 public EClass getMappingHelper() 182 { 183 return mappingHelperEClass; 184 } 185 186 191 public EReference getMappingHelper_Mapper() 192 { 193 return (EReference)mappingHelperEClass.getEStructuralFeatures().get(0); 194 } 195 196 201 public EReference getMappingHelper_HelpedObject() 202 { 203 return (EReference)mappingHelperEClass.getEStructuralFeatures().get(1); 204 } 205 206 211 public EReference getMappingHelper_NestedIn() 212 { 213 return (EReference)mappingHelperEClass.getEStructuralFeatures().get(2); 214 } 215 216 221 public EReference getMappingHelper_Nested() 222 { 223 return (EReference)mappingHelperEClass.getEStructuralFeatures().get(3); 224 } 225 226 231 public EClass getMapping() 232 { 233 return mappingEClass; 234 } 235 236 241 public EReference getMapping_Helper() 242 { 243 return (EReference)mappingEClass.getEStructuralFeatures().get(0); 244 } 245 246 251 public EReference getMapping_Nested() 252 { 253 return (EReference)mappingEClass.getEStructuralFeatures().get(1); 254 } 255 256 261 public EReference getMapping_NestedIn() 262 { 263 return (EReference)mappingEClass.getEStructuralFeatures().get(2); 264 } 265 266 271 public EReference getMapping_Inputs() 272 { 273 return (EReference)mappingEClass.getEStructuralFeatures().get(3); 274 } 275 276 281 public EReference getMapping_Outputs() 282 { 283 return (EReference)mappingEClass.getEStructuralFeatures().get(4); 284 } 285 286 291 public EReference getMapping_TypeMapping() 292 { 293 return (EReference)mappingEClass.getEStructuralFeatures().get(5); 294 } 295 296 301 public EClass getTypeConverter() 302 { 303 return typeConverterEClass; 304 } 305 306 311 public EClass getFunctionPair() 312 { 313 return functionPairEClass; 314 } 315 316 321 public EReference getFunctionPair_In2out() 322 { 323 return (EReference)functionPairEClass.getEStructuralFeatures().get(0); 324 } 325 326 331 public EReference getFunctionPair_Out2in() 332 { 333 return (EReference)functionPairEClass.getEStructuralFeatures().get(1); 334 } 335 336 341 public EClass getFunctionNamePair() 342 { 343 return functionNamePairEClass; 344 } 345 346 351 public EAttribute getFunctionNamePair_In2out() 352 { 353 return (EAttribute)functionNamePairEClass.getEStructuralFeatures().get(0); 354 } 355 356 361 public EAttribute getFunctionNamePair_Out2in() 362 { 363 return (EAttribute)functionNamePairEClass.getEStructuralFeatures().get(1); 364 } 365 366 371 public EClass getMappingStrategy() 372 { 373 return mappingStrategyEClass; 374 } 375 376 381 public EClass getMappingRoot() 382 { 383 return mappingRootEClass; 384 } 385 386 391 public EAttribute getMappingRoot_OutputReadOnly() 392 { 393 return (EAttribute)mappingRootEClass.getEStructuralFeatures().get(0); 394 } 395 396 401 public EAttribute getMappingRoot_TopToBottom() 402 { 403 return (EAttribute)mappingRootEClass.getEStructuralFeatures().get(1); 404 } 405 406 411 public EAttribute getMappingRoot_CommandStack() 412 { 413 return (EAttribute)mappingRootEClass.getEStructuralFeatures().get(2); 414 } 415 416 421 public EClass getComplexTypeConverter() 422 { 423 return complexTypeConverterEClass; 424 } 425 426 431 public EReference getComplexTypeConverter_In2out() 432 { 433 return (EReference)complexTypeConverterEClass.getEStructuralFeatures().get(0); 434 } 435 436 441 public EReference getComplexTypeConverter_Out2in() 442 { 443 return (EReference)complexTypeConverterEClass.getEStructuralFeatures().get(1); 444 } 445 446 451 public MappingFactory getMappingFactory() 452 { 453 return (MappingFactory)getEFactoryInstance(); 454 } 455 456 461 private boolean isCreated = false; 462 463 470 public void createPackageContents() 471 { 472 if (isCreated) return; 473 isCreated = true; 474 475 mappingHelperEClass = createEClass(MAPPING_HELPER); 477 createEReference(mappingHelperEClass, MAPPING_HELPER__MAPPER); 478 createEReference(mappingHelperEClass, MAPPING_HELPER__HELPED_OBJECT); 479 createEReference(mappingHelperEClass, MAPPING_HELPER__NESTED_IN); 480 createEReference(mappingHelperEClass, MAPPING_HELPER__NESTED); 481 482 mappingEClass = createEClass(MAPPING); 483 createEReference(mappingEClass, MAPPING__HELPER); 484 createEReference(mappingEClass, MAPPING__NESTED); 485 createEReference(mappingEClass, MAPPING__NESTED_IN); 486 createEReference(mappingEClass, MAPPING__INPUTS); 487 createEReference(mappingEClass, MAPPING__OUTPUTS); 488 createEReference(mappingEClass, MAPPING__TYPE_MAPPING); 489 490 typeConverterEClass = createEClass(TYPE_CONVERTER); 491 492 functionPairEClass = createEClass(FUNCTION_PAIR); 493 createEReference(functionPairEClass, FUNCTION_PAIR__IN2OUT); 494 createEReference(functionPairEClass, FUNCTION_PAIR__OUT2IN); 495 496 functionNamePairEClass = createEClass(FUNCTION_NAME_PAIR); 497 createEAttribute(functionNamePairEClass, FUNCTION_NAME_PAIR__IN2OUT); 498 createEAttribute(functionNamePairEClass, FUNCTION_NAME_PAIR__OUT2IN); 499 500 mappingStrategyEClass = createEClass(MAPPING_STRATEGY); 501 502 mappingRootEClass = createEClass(MAPPING_ROOT); 503 createEAttribute(mappingRootEClass, MAPPING_ROOT__OUTPUT_READ_ONLY); 504 createEAttribute(mappingRootEClass, MAPPING_ROOT__TOP_TO_BOTTOM); 505 createEAttribute(mappingRootEClass, MAPPING_ROOT__COMMAND_STACK); 506 507 complexTypeConverterEClass = createEClass(COMPLEX_TYPE_CONVERTER); 508 createEReference(complexTypeConverterEClass, COMPLEX_TYPE_CONVERTER__IN2OUT); 509 createEReference(complexTypeConverterEClass, COMPLEX_TYPE_CONVERTER__OUT2IN); 510 } 511 512 517 private boolean isInitialized = false; 518 519 526 public void initializePackageContents() 527 { 528 if (isInitialized) return; 529 isInitialized = true; 530 531 setName(eNAME); 533 setNsPrefix(eNS_PREFIX); 534 setNsURI(eNS_URI); 535 536 EcorePackageImpl theEcorePackage = (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); 538 539 typeConverterEClass.getESuperTypes().add(this.getMappingHelper()); 541 functionPairEClass.getESuperTypes().add(this.getTypeConverter()); 542 functionNamePairEClass.getESuperTypes().add(this.getTypeConverter()); 543 mappingStrategyEClass.getESuperTypes().add(this.getMappingHelper()); 544 mappingRootEClass.getESuperTypes().add(this.getMapping()); 545 complexTypeConverterEClass.getESuperTypes().add(this.getTypeConverter()); 546 547 initEClass(mappingHelperEClass, MappingHelper.class, "MappingHelper", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 549 initEReference(getMappingHelper_Mapper(), this.getMapping(), this.getMapping_Helper(), "mapper", null, 0, 1, MappingHelper.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 550 initEReference(getMappingHelper_HelpedObject(), theEcorePackage.getEObject(), null, "helpedObject", null, 0, 1, MappingHelper.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 551 initEReference(getMappingHelper_NestedIn(), this.getMappingHelper(), this.getMappingHelper_Nested(), "nestedIn", null, 0, 1, MappingHelper.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 552 initEReference(getMappingHelper_Nested(), this.getMappingHelper(), this.getMappingHelper_NestedIn(), "nested", null, 0, -1, MappingHelper.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 553 554 initEClass(mappingEClass, Mapping.class, "Mapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 555 initEReference(getMapping_Helper(), this.getMappingHelper(), this.getMappingHelper_Mapper(), "helper", null, 0, 1, Mapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 556 initEReference(getMapping_Nested(), this.getMapping(), this.getMapping_NestedIn(), "nested", null, 0, -1, Mapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 557 initEReference(getMapping_NestedIn(), this.getMapping(), this.getMapping_Nested(), "nestedIn", null, 0, 1, Mapping.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 558 initEReference(getMapping_Inputs(), theEcorePackage.getEObject(), null, "inputs", null, 0, -1, Mapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 559 initEReference(getMapping_Outputs(), theEcorePackage.getEObject(), null, "outputs", null, 0, -1, Mapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 560 initEReference(getMapping_TypeMapping(), this.getMapping(), null, "typeMapping", null, 0, 1, Mapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 561 562 initEClass(typeConverterEClass, TypeConverter.class, "TypeConverter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 563 564 initEClass(functionPairEClass, FunctionPair.class, "FunctionPair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 565 initEReference(getFunctionPair_In2out(), theEcorePackage.getEOperation(), null, "in2out", null, 0, 1, FunctionPair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 566 initEReference(getFunctionPair_Out2in(), theEcorePackage.getEOperation(), null, "out2in", null, 0, 1, FunctionPair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 567 568 initEClass(functionNamePairEClass, FunctionNamePair.class, "FunctionNamePair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 569 initEAttribute(getFunctionNamePair_In2out(), ecorePackage.getEString(), "in2out", null, 0, 1, FunctionNamePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 570 initEAttribute(getFunctionNamePair_Out2in(), ecorePackage.getEString(), "out2in", null, 0, 1, FunctionNamePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 571 572 initEClass(mappingStrategyEClass, MappingStrategy.class, "MappingStrategy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 573 574 initEClass(mappingRootEClass, MappingRoot.class, "MappingRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 575 initEAttribute(getMappingRoot_OutputReadOnly(), ecorePackage.getEBoolean(), "outputReadOnly", null, 0, 1, MappingRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 576 initEAttribute(getMappingRoot_TopToBottom(), ecorePackage.getEBoolean(), "topToBottom", null, 0, 1, MappingRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 577 initEAttribute(getMappingRoot_CommandStack(), ecorePackage.getEString(), "commandStack", null, 0, 1, MappingRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 578 579 initEClass(complexTypeConverterEClass, ComplexTypeConverter.class, "ComplexTypeConverter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 580 initEReference(getComplexTypeConverter_In2out(), this.getMapping(), null, "in2out", null, 0, 1, ComplexTypeConverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 581 initEReference(getComplexTypeConverter_Out2in(), this.getMapping(), null, "out2in", null, 0, 1, ComplexTypeConverter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 582 583 createResource(eNS_URI); 585 } 586 587 } 589 | Popular Tags |