| /** |
| * * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro |
| * * All rights reserved. This program and the accompanying materials |
| * * are made available under the terms of the Eclipse Public License v1.0 |
| * * which accompanies this distribution, and is available at |
| * * http://www.eclipse.org/legal/epl-v10.html |
| * * |
| * * Contributors: |
| * * Istvan Rath, Daniel Varro - initial API and implementation |
| * |
| */ |
| package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl; |
| |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EReference; |
| |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl; |
| |
| import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class DeletionPackageImpl extends EPackageImpl implements DeletionPackage |
| { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Istvan Rath, Daniel Varro - initial API and implementation\r\n"; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass relationshipDeleteRuleEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass elementDeleteRuleEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass deleteInstanceOfEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass deleteSupertypeOfEClass = null; |
| |
| /** |
| * Creates an instance of the model <b>Package</b>, registered with |
| * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
| * package URI value. |
| * <p>Note: the correct way to create the package is via the static |
| * factory method {@link #init init()}, which also performs |
| * initialization of the package, or returns the registered package, |
| * if one already exists. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see org.eclipse.emf.ecore.EPackage.Registry |
| * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private DeletionPackageImpl() |
| { |
| super(eNS_URI, DeletionFactory.eINSTANCE); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static boolean isInited = false; |
| |
| /** |
| * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
| * |
| * <p>This method is used to initialize {@link DeletionPackage#eINSTANCE} when that field is accessed. |
| * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #eNS_URI |
| * @see #createPackageContents() |
| * @see #initializePackageContents() |
| * @generated |
| */ |
| public static DeletionPackage init() |
| { |
| if (isInited) return (DeletionPackage)EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DeletionPackageImpl()); |
| |
| isInited = true; |
| |
| // Obtain or create and register interdependencies |
| EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE); |
| QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE); |
| CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE); |
| CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE); |
| UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE); |
| DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE); |
| CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE); |
| SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE); |
| CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE); |
| EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE); |
| TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE); |
| BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE); |
| GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE); |
| |
| // Create package meta-data objects |
| theDeletionPackage.createPackageContents(); |
| theEditmodelPackage.createPackageContents(); |
| theQueryFunctionsPackage.createPackageContents(); |
| theCreationPackage.createPackageContents(); |
| theCopymovePackage.createPackageContents(); |
| theUpdatePackage.createPackageContents(); |
| theDefinitionsPackage.createPackageContents(); |
| theCorePackage.createPackageContents(); |
| theSimpleRulesPackage.createPackageContents(); |
| theCompoundRulesPackage.createPackageContents(); |
| theEnumsPackage.createPackageContents(); |
| theTermsPackage.createPackageContents(); |
| theBuiltInFunctionsPackage.createPackageContents(); |
| theGtPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theDeletionPackage.initializePackageContents(); |
| theEditmodelPackage.initializePackageContents(); |
| theQueryFunctionsPackage.initializePackageContents(); |
| theCreationPackage.initializePackageContents(); |
| theCopymovePackage.initializePackageContents(); |
| theUpdatePackage.initializePackageContents(); |
| theDefinitionsPackage.initializePackageContents(); |
| theCorePackage.initializePackageContents(); |
| theSimpleRulesPackage.initializePackageContents(); |
| theCompoundRulesPackage.initializePackageContents(); |
| theEnumsPackage.initializePackageContents(); |
| theTermsPackage.initializePackageContents(); |
| theBuiltInFunctionsPackage.initializePackageContents(); |
| theGtPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theDeletionPackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(DeletionPackage.eNS_URI, theDeletionPackage); |
| return theDeletionPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getRelationshipDeleteRule() |
| { |
| return relationshipDeleteRuleEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getRelationshipDeleteRule_Super() |
| { |
| return (EReference)relationshipDeleteRuleEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getRelationshipDeleteRule_Sub() |
| { |
| return (EReference)relationshipDeleteRuleEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getElementDeleteRule() |
| { |
| return elementDeleteRuleEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getElementDeleteRule_Element() |
| { |
| return (EReference)elementDeleteRuleEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getElementDeleteRule_Semantics() |
| { |
| return (EAttribute)elementDeleteRuleEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getDeleteInstanceOf() |
| { |
| return deleteInstanceOfEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getDeleteSupertypeOf() |
| { |
| return deleteSupertypeOfEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DeletionFactory getDeletionFactory() |
| { |
| return (DeletionFactory)getEFactoryInstance(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isCreated = false; |
| |
| /** |
| * Creates the meta-model objects for the package. This method is |
| * guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void createPackageContents() |
| { |
| if (isCreated) return; |
| isCreated = true; |
| |
| // Create classes and their features |
| relationshipDeleteRuleEClass = createEClass(RELATIONSHIP_DELETE_RULE); |
| createEReference(relationshipDeleteRuleEClass, RELATIONSHIP_DELETE_RULE__SUPER); |
| createEReference(relationshipDeleteRuleEClass, RELATIONSHIP_DELETE_RULE__SUB); |
| |
| elementDeleteRuleEClass = createEClass(ELEMENT_DELETE_RULE); |
| createEReference(elementDeleteRuleEClass, ELEMENT_DELETE_RULE__ELEMENT); |
| createEAttribute(elementDeleteRuleEClass, ELEMENT_DELETE_RULE__SEMANTICS); |
| |
| deleteInstanceOfEClass = createEClass(DELETE_INSTANCE_OF); |
| |
| deleteSupertypeOfEClass = createEClass(DELETE_SUPERTYPE_OF); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isInitialized = false; |
| |
| /** |
| * Complete the initialization of the package and its meta-model. This |
| * method is guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void initializePackageContents() |
| { |
| if (isInitialized) return; |
| isInitialized = true; |
| |
| // Initialize package |
| setName(eNAME); |
| setNsPrefix(eNS_PREFIX); |
| setNsURI(eNS_URI); |
| |
| // Obtain other dependent packages |
| SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI); |
| TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI); |
| EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| relationshipDeleteRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule()); |
| elementDeleteRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule()); |
| deleteInstanceOfEClass.getESuperTypes().add(this.getRelationshipDeleteRule()); |
| deleteSupertypeOfEClass.getESuperTypes().add(this.getRelationshipDeleteRule()); |
| |
| // Initialize classes and features; add operations and parameters |
| initEClass(relationshipDeleteRuleEClass, RelationshipDeleteRule.class, "RelationshipDeleteRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getRelationshipDeleteRule_Super(), theTermsPackage.getTerm(), null, "super", null, 1, 1, RelationshipDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| initEReference(getRelationshipDeleteRule_Sub(), theTermsPackage.getTerm(), null, "sub", null, 1, 1, RelationshipDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| |
| initEClass(elementDeleteRuleEClass, ElementDeleteRule.class, "ElementDeleteRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getElementDeleteRule_Element(), theTermsPackage.getTerm(), null, "element", null, 1, 1, ElementDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| initEAttribute(getElementDeleteRule_Semantics(), theEnumsPackage.getDeleteSemantics(), "semantics", "dropContent", 1, 1, ElementDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| |
| initEClass(deleteInstanceOfEClass, DeleteInstanceOf.class, "DeleteInstanceOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| initEClass(deleteSupertypeOfEClass, DeleteSupertypeOf.class, "DeleteSupertypeOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| |
| // Create resource |
| createResource(eNS_URI); |
| } |
| |
| } //DeletionPackageImpl |