diff options
Diffstat (limited to 'plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationPackageImpl.java')
-rw-r--r-- | plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationPackageImpl.java | 484 |
1 files changed, 484 insertions, 0 deletions
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationPackageImpl.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationPackageImpl.java new file mode 100644 index 00000000000..0eb6e133c31 --- /dev/null +++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationPackageImpl.java @@ -0,0 +1,484 @@ +/** + * Copyright (c) 2016 CEA LIST. + * + * 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: + * Maged Elaasar - Initial API and implementation + * + * + */ +package org.eclipse.papyrus.infra.architecture.representation.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.papyrus.infra.architecture.representation.ModelAutoCreate; +import org.eclipse.papyrus.infra.architecture.representation.ModelRule; +import org.eclipse.papyrus.infra.architecture.representation.OwningRule; +import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind; +import org.eclipse.papyrus.infra.architecture.representation.RepresentationFactory; +import org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage; +import org.eclipse.papyrus.infra.architecture.representation.RootAutoSelect; +import org.eclipse.papyrus.infra.architecture.representation.Rule; +import org.eclipse.papyrus.infra.constraints.ConstraintsPackage; + +import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class RepresentationPackageImpl extends EPackageImpl implements RepresentationPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass papyrusRepresentationKindEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass ruleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass modelRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass owningRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass modelAutoCreateEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass rootAutoSelectEClass = 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.papyrus.infra.architecture.representation.RepresentationPackage#eNS_URI + * @see #init() + * @generated + */ + private RepresentationPackageImpl() { + super(eNS_URI, RepresentationFactory.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 RepresentationPackage#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 RepresentationPackage init() { + if (isInited) return (RepresentationPackage)EPackage.Registry.INSTANCE.getEPackage(RepresentationPackage.eNS_URI); + + // Obtain or create and register package + RepresentationPackageImpl theRepresentationPackage = (RepresentationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RepresentationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RepresentationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ArchitecturePackage.eINSTANCE.eClass(); + ConstraintsPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theRepresentationPackage.createPackageContents(); + + // Initialize created meta-data + theRepresentationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theRepresentationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(RepresentationPackage.eNS_URI, theRepresentationPackage); + return theRepresentationPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPapyrusRepresentationKind() { + return papyrusRepresentationKindEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPapyrusRepresentationKind_Parent() { + return (EReference)papyrusRepresentationKindEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPapyrusRepresentationKind_ModelRules() { + return (EReference)papyrusRepresentationKindEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPapyrusRepresentationKind_OwningRules() { + return (EReference)papyrusRepresentationKindEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPapyrusRepresentationKind_ImplementationID() { + return (EAttribute)papyrusRepresentationKindEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRule() { + return ruleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getRule_Permit() { + return (EAttribute)ruleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getModelRule() { + return modelRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getModelRule_Element() { + return (EReference)modelRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getModelRule_Stereotypes() { + return (EReference)modelRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getModelRule_Multiplicity() { + return (EAttribute)modelRuleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getOwningRule() { + return owningRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOwningRule_Element() { + return (EReference)owningRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOwningRule_Stereotypes() { + return (EReference)owningRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getOwningRule_Multiplicity() { + return (EAttribute)owningRuleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOwningRule_NewModelPath() { + return (EReference)owningRuleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getOwningRule_SelectDiagramRoot() { + return (EReference)owningRuleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getModelAutoCreate() { + return modelAutoCreateEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getModelAutoCreate_Feature() { + return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getModelAutoCreate_Origin() { + return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getModelAutoCreate_CreationType() { + return (EAttribute)modelAutoCreateEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRootAutoSelect() { + return rootAutoSelectEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getRootAutoSelect_Feature() { + return (EReference)rootAutoSelectEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RepresentationFactory getRepresentationFactory() { + return (RepresentationFactory)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 + papyrusRepresentationKindEClass = createEClass(PAPYRUS_REPRESENTATION_KIND); + createEReference(papyrusRepresentationKindEClass, PAPYRUS_REPRESENTATION_KIND__PARENT); + createEReference(papyrusRepresentationKindEClass, PAPYRUS_REPRESENTATION_KIND__MODEL_RULES); + createEReference(papyrusRepresentationKindEClass, PAPYRUS_REPRESENTATION_KIND__OWNING_RULES); + createEAttribute(papyrusRepresentationKindEClass, PAPYRUS_REPRESENTATION_KIND__IMPLEMENTATION_ID); + + ruleEClass = createEClass(RULE); + createEAttribute(ruleEClass, RULE__PERMIT); + + modelRuleEClass = createEClass(MODEL_RULE); + createEReference(modelRuleEClass, MODEL_RULE__ELEMENT); + createEReference(modelRuleEClass, MODEL_RULE__STEREOTYPES); + createEAttribute(modelRuleEClass, MODEL_RULE__MULTIPLICITY); + + owningRuleEClass = createEClass(OWNING_RULE); + createEReference(owningRuleEClass, OWNING_RULE__ELEMENT); + createEReference(owningRuleEClass, OWNING_RULE__STEREOTYPES); + createEAttribute(owningRuleEClass, OWNING_RULE__MULTIPLICITY); + createEReference(owningRuleEClass, OWNING_RULE__NEW_MODEL_PATH); + createEReference(owningRuleEClass, OWNING_RULE__SELECT_DIAGRAM_ROOT); + + modelAutoCreateEClass = createEClass(MODEL_AUTO_CREATE); + createEReference(modelAutoCreateEClass, MODEL_AUTO_CREATE__FEATURE); + createEReference(modelAutoCreateEClass, MODEL_AUTO_CREATE__ORIGIN); + createEAttribute(modelAutoCreateEClass, MODEL_AUTO_CREATE__CREATION_TYPE); + + rootAutoSelectEClass = createEClass(ROOT_AUTO_SELECT); + createEReference(rootAutoSelectEClass, ROOT_AUTO_SELECT__FEATURE); + } + + /** + * <!-- 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 + ArchitecturePackage theArchitecturePackage = (ArchitecturePackage)EPackage.Registry.INSTANCE.getEPackage(ArchitecturePackage.eNS_URI); + ConstraintsPackage theConstraintsPackage = (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + papyrusRepresentationKindEClass.getESuperTypes().add(theArchitecturePackage.getRepresentationKind()); + modelRuleEClass.getESuperTypes().add(this.getRule()); + modelRuleEClass.getESuperTypes().add(theConstraintsPackage.getDisplayUnit()); + owningRuleEClass.getESuperTypes().add(this.getRule()); + + // Initialize classes, features, and operations; add parameters + initEClass(papyrusRepresentationKindEClass, PapyrusRepresentationKind.class, "PapyrusRepresentationKind", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getPapyrusRepresentationKind_Parent(), this.getPapyrusRepresentationKind(), null, "parent", null, 0, 1, PapyrusRepresentationKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPapyrusRepresentationKind_ModelRules(), this.getModelRule(), null, "modelRules", null, 1, -1, PapyrusRepresentationKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPapyrusRepresentationKind_OwningRules(), this.getOwningRule(), null, "owningRules", null, 1, -1, PapyrusRepresentationKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPapyrusRepresentationKind_ImplementationID(), ecorePackage.getEString(), "implementationID", null, 1, 1, PapyrusRepresentationKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(ruleEClass, Rule.class, "Rule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getRule_Permit(), ecorePackage.getEBoolean(), "permit", "true", 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modelRuleEClass, ModelRule.class, "ModelRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModelRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModelRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getModelRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(owningRuleEClass, OwningRule.class, "OwningRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOwningRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOwningRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOwningRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOwningRule_NewModelPath(), this.getModelAutoCreate(), null, "newModelPath", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOwningRule_SelectDiagramRoot(), this.getRootAutoSelect(), null, "selectDiagramRoot", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modelAutoCreateEClass, ModelAutoCreate.class, "ModelAutoCreate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModelAutoCreate_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, ModelAutoCreate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModelAutoCreate_Origin(), ecorePackage.getEClass(), null, "origin", null, 1, 1, ModelAutoCreate.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEAttribute(getModelAutoCreate_CreationType(), ecorePackage.getEString(), "creationType", null, 1, 1, ModelAutoCreate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(rootAutoSelectEClass, RootAutoSelect.class, "RootAutoSelect", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRootAutoSelect_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, RootAutoSelect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //RepresentationPackageImpl |