| /** |
| * * 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.asm.enums.impl; |
| |
| import org.eclipse.emf.ecore.EEnum; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| 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.ChangeKind; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsFactory; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind; |
| |
| 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.DeletionPackage; |
| |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl; |
| |
| 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 EnumsPackageImpl extends EPackageImpl implements EnumsPackage |
| { |
| /** |
| * <!-- 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 EEnum copySemanticsEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum deleteSemanticsEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum logLevelEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum containmentModeEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum valueKindEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum directionKindEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum multiplicityKindEEnum = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EEnum changeKindEEnum = 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.asm.enums.EnumsPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private EnumsPackageImpl() |
| { |
| super(eNS_URI, EnumsFactory.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 EnumsPackage#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 EnumsPackage init() |
| { |
| if (isInited) return (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EnumsPackageImpl()); |
| |
| 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); |
| DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.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); |
| 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 |
| theEnumsPackage.createPackageContents(); |
| theEditmodelPackage.createPackageContents(); |
| theQueryFunctionsPackage.createPackageContents(); |
| theDeletionPackage.createPackageContents(); |
| theCreationPackage.createPackageContents(); |
| theCopymovePackage.createPackageContents(); |
| theUpdatePackage.createPackageContents(); |
| theDefinitionsPackage.createPackageContents(); |
| theCorePackage.createPackageContents(); |
| theSimpleRulesPackage.createPackageContents(); |
| theCompoundRulesPackage.createPackageContents(); |
| theTermsPackage.createPackageContents(); |
| theBuiltInFunctionsPackage.createPackageContents(); |
| theGtPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theEnumsPackage.initializePackageContents(); |
| theEditmodelPackage.initializePackageContents(); |
| theQueryFunctionsPackage.initializePackageContents(); |
| theDeletionPackage.initializePackageContents(); |
| theCreationPackage.initializePackageContents(); |
| theCopymovePackage.initializePackageContents(); |
| theUpdatePackage.initializePackageContents(); |
| theDefinitionsPackage.initializePackageContents(); |
| theCorePackage.initializePackageContents(); |
| theSimpleRulesPackage.initializePackageContents(); |
| theCompoundRulesPackage.initializePackageContents(); |
| theTermsPackage.initializePackageContents(); |
| theBuiltInFunctionsPackage.initializePackageContents(); |
| theGtPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theEnumsPackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(EnumsPackage.eNS_URI, theEnumsPackage); |
| return theEnumsPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getCopySemantics() |
| { |
| return copySemanticsEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getDeleteSemantics() |
| { |
| return deleteSemanticsEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getLogLevel() |
| { |
| return logLevelEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getContainmentMode() |
| { |
| return containmentModeEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getValueKind() |
| { |
| return valueKindEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getDirectionKind() |
| { |
| return directionKindEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getMultiplicityKind() |
| { |
| return multiplicityKindEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EEnum getChangeKind() |
| { |
| return changeKindEEnum; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EnumsFactory getEnumsFactory() |
| { |
| return (EnumsFactory)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 enums |
| copySemanticsEEnum = createEEnum(COPY_SEMANTICS); |
| deleteSemanticsEEnum = createEEnum(DELETE_SEMANTICS); |
| logLevelEEnum = createEEnum(LOG_LEVEL); |
| containmentModeEEnum = createEEnum(CONTAINMENT_MODE); |
| valueKindEEnum = createEEnum(VALUE_KIND); |
| directionKindEEnum = createEEnum(DIRECTION_KIND); |
| multiplicityKindEEnum = createEEnum(MULTIPLICITY_KIND); |
| changeKindEEnum = createEEnum(CHANGE_KIND); |
| } |
| |
| /** |
| * <!-- 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); |
| |
| // Initialize enums and add enum literals |
| initEEnum(copySemanticsEEnum, CopySemantics.class, "CopySemantics"); |
| addEEnumLiteral(copySemanticsEEnum, CopySemantics.DROP_OUTER_EDGES_LITERAL); |
| addEEnumLiteral(copySemanticsEEnum, CopySemantics.COPY_OUTER_EDGES_LITERAL); |
| |
| initEEnum(deleteSemanticsEEnum, DeleteSemantics.class, "DeleteSemantics"); |
| addEEnumLiteral(deleteSemanticsEEnum, DeleteSemantics.DROP_CONTENT_LITERAL); |
| addEEnumLiteral(deleteSemanticsEEnum, DeleteSemantics.MOVE_CONTENT_LITERAL); |
| |
| initEEnum(logLevelEEnum, LogLevel.class, "LogLevel"); |
| addEEnumLiteral(logLevelEEnum, LogLevel.DEBUG_LITERAL); |
| addEEnumLiteral(logLevelEEnum, LogLevel.WARNING_LITERAL); |
| addEEnumLiteral(logLevelEEnum, LogLevel.ERROR_LITERAL); |
| addEEnumLiteral(logLevelEEnum, LogLevel.FATAL_LITERAL); |
| addEEnumLiteral(logLevelEEnum, LogLevel.INFO_LITERAL); |
| |
| initEEnum(containmentModeEEnum, ContainmentMode.class, "ContainmentMode"); |
| addEEnumLiteral(containmentModeEEnum, ContainmentMode.IN_LITERAL); |
| addEEnumLiteral(containmentModeEEnum, ContainmentMode.BELOW_LITERAL); |
| |
| initEEnum(valueKindEEnum, ValueKind.class, "ValueKind"); |
| addEEnumLiteral(valueKindEEnum, ValueKind.UNDEF_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.BOOLEAN_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.STRING_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.INTEGER_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.DOUBLE_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.MODELELEMENT_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.MULTIPLICITY_LITERAL); |
| addEEnumLiteral(valueKindEEnum, ValueKind.ERROR_LITERAL); |
| |
| initEEnum(directionKindEEnum, DirectionKind.class, "DirectionKind"); |
| addEEnumLiteral(directionKindEEnum, DirectionKind.IN_LITERAL); |
| addEEnumLiteral(directionKindEEnum, DirectionKind.INOUT_LITERAL); |
| addEEnumLiteral(directionKindEEnum, DirectionKind.OUT_LITERAL); |
| |
| initEEnum(multiplicityKindEEnum, MultiplicityKind.class, "MultiplicityKind"); |
| addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_TO_ONE_LITERAL); |
| addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_TO_MANY_LITERAL); |
| addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_TO_ONE_LITERAL); |
| addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_TO_MANY_LITERAL); |
| |
| initEEnum(changeKindEEnum, ChangeKind.class, "ChangeKind"); |
| addEEnumLiteral(changeKindEEnum, ChangeKind.NEW); |
| addEEnumLiteral(changeKindEEnum, ChangeKind.DELETE); |
| addEEnumLiteral(changeKindEEnum, ChangeKind.CHANGED); |
| |
| // Create resource |
| createResource(eNS_URI); |
| } |
| |
| } //EnumsPackageImpl |