/** | |
* 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: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.ecore.sew.impl; | |
import org.eclipse.efm.ecore.sew.SEWorkflow; | |
import org.eclipse.efm.ecore.sew.SewFactory; | |
import org.eclipse.efm.ecore.sew.SewPackage; | |
import org.eclipse.efm.ecore.sew.WAttribute; | |
import org.eclipse.efm.ecore.sew.WNamedElement; | |
import org.eclipse.efm.ecore.sew.WObject; | |
import org.eclipse.efm.ecore.sew.WProperty; | |
import org.eclipse.efm.ecore.sew.WSection; | |
import org.eclipse.efm.ecore.sew.WValueSpecification; | |
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; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Package</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class SewPackageImpl extends EPackageImpl implements SewPackage { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wNamedElementEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass seWorkflowEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wObjectEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wPropertyEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wSectionEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wAttributeEClass = null; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass wValueSpecificationEClass = 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.efm.ecore.sew.SewPackage#eNS_URI | |
* @see #init() | |
* @generated | |
*/ | |
private SewPackageImpl() { | |
super(eNS_URI, SewFactory.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 SewPackage#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 SewPackage init() { | |
if (isInited) return (SewPackage)EPackage.Registry.INSTANCE.getEPackage(SewPackage.eNS_URI); | |
// Obtain or create and register package | |
Object registeredSewPackage = EPackage.Registry.INSTANCE.get(eNS_URI); | |
SewPackageImpl theSewPackage = registeredSewPackage instanceof SewPackageImpl ? (SewPackageImpl)registeredSewPackage : new SewPackageImpl(); | |
isInited = true; | |
// Create package meta-data objects | |
theSewPackage.createPackageContents(); | |
// Initialize created meta-data | |
theSewPackage.initializePackageContents(); | |
// Mark meta-data to indicate it can't be changed | |
theSewPackage.freeze(); | |
// Update the registry and return the package | |
EPackage.Registry.INSTANCE.put(SewPackage.eNS_URI, theSewPackage); | |
return theSewPackage; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWNamedElement() { | |
return wNamedElementEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EAttribute getWNamedElement_Name() { | |
return (EAttribute)wNamedElementEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EAttribute getWNamedElement_Description() { | |
return (EAttribute)wNamedElementEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getSEWorkflow() { | |
return seWorkflowEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWObject() { | |
return wObjectEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EAttribute getWObject_Type() { | |
return (EAttribute)wObjectEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EReference getWObject_Element() { | |
return (EReference)wObjectEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWProperty() { | |
return wPropertyEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWSection() { | |
return wSectionEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EReference getWSection_Element() { | |
return (EReference)wSectionEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWAttribute() { | |
return wAttributeEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EReference getWAttribute_Value() { | |
return (EReference)wAttributeEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public EClass getWValueSpecification() { | |
return wValueSpecificationEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public SewFactory getSewFactory() { | |
return (SewFactory)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 | |
wNamedElementEClass = createEClass(WNAMED_ELEMENT); | |
createEAttribute(wNamedElementEClass, WNAMED_ELEMENT__NAME); | |
createEAttribute(wNamedElementEClass, WNAMED_ELEMENT__DESCRIPTION); | |
seWorkflowEClass = createEClass(SE_WORKFLOW); | |
wObjectEClass = createEClass(WOBJECT); | |
createEAttribute(wObjectEClass, WOBJECT__TYPE); | |
createEReference(wObjectEClass, WOBJECT__ELEMENT); | |
wPropertyEClass = createEClass(WPROPERTY); | |
wSectionEClass = createEClass(WSECTION); | |
createEReference(wSectionEClass, WSECTION__ELEMENT); | |
wAttributeEClass = createEClass(WATTRIBUTE); | |
createEReference(wAttributeEClass, WATTRIBUTE__VALUE); | |
wValueSpecificationEClass = createEClass(WVALUE_SPECIFICATION); | |
} | |
/** | |
* <!-- 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); | |
// Create type parameters | |
// Set bounds for type parameters | |
// Add supertypes to classes | |
seWorkflowEClass.getESuperTypes().add(this.getWObject()); | |
wObjectEClass.getESuperTypes().add(this.getWNamedElement()); | |
wPropertyEClass.getESuperTypes().add(this.getWNamedElement()); | |
wSectionEClass.getESuperTypes().add(this.getWProperty()); | |
wAttributeEClass.getESuperTypes().add(this.getWProperty()); | |
// Initialize classes, features, and operations; add parameters | |
initEClass(wNamedElementEClass, WNamedElement.class, "WNamedElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEAttribute(getWNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, WNamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEAttribute(getWNamedElement_Description(), ecorePackage.getEString(), "description", null, 0, 1, WNamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(seWorkflowEClass, SEWorkflow.class, "SEWorkflow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEClass(wObjectEClass, WObject.class, "WObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEAttribute(getWObject_Type(), ecorePackage.getEString(), "type", null, 0, 1, WObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEReference(getWObject_Element(), this.getWNamedElement(), null, "element", null, 0, -1, WObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(wPropertyEClass, WProperty.class, "WProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEClass(wSectionEClass, WSection.class, "WSection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEReference(getWSection_Element(), this.getWNamedElement(), null, "element", null, 0, -1, WSection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(wAttributeEClass, WAttribute.class, "WAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
initEReference(getWAttribute_Value(), this.getWValueSpecification(), null, "value", null, 1, 1, WAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | |
initEClass(wValueSpecificationEClass, WValueSpecification.class, "WValueSpecification", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | |
// Create resource | |
createResource(eNS_URI); | |
// Create annotations | |
// http://www.eclipse.org/OCL/Import | |
createImportAnnotations(); | |
} | |
/** | |
* Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected void createImportAnnotations() { | |
String source = "http://www.eclipse.org/OCL/Import"; | |
addAnnotation | |
(this, | |
source, | |
new String[] { | |
"ecore", "http://www.eclipse.org/emf/2002/Ecore" | |
}); | |
} | |
} //SewPackageImpl |