/** | |
* Copyright (c) 2011, 2012 Mia-Software. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v20.html | |
* | |
* Contributors: | |
* Gregoire Dupe (Mia-Software) - Design | |
* Nicolas Guyomar (Mia-Software) - Implementation | |
* Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values. | |
* Nicolas Bros (Mia-Software) - Bug 361823 - [Restructuring] eFacet2 meta-model | |
* Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework | |
* Gregoire Dupe (Mia-Software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet. | |
* Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning | |
*/ | |
package org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.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.EcorePackage; | |
import org.eclipse.emf.ecore.impl.EPackageImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.EFacetPackage; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensibleFactory; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensiblePackage; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.impl.EFacetPackageImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.QueryPackage; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.impl.QueryPackageImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.runtime.RuntimePackage; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.runtime.impl.RuntimePackageImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.serialization.SerializationPackage; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.serialization.impl.SerializationPackageImpl; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model <b>Package</b>. | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class ExtensiblePackageImpl extends EPackageImpl implements ExtensiblePackage { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private EClass queryEClass = 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.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensiblePackage#eNS_URI | |
* @see #init() | |
* @generated | |
*/ | |
private ExtensiblePackageImpl() { | |
super(eNS_URI, ExtensibleFactory.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 ExtensiblePackage#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 ExtensiblePackage init() { | |
if (isInited) return (ExtensiblePackage)EPackage.Registry.INSTANCE.getEPackage(ExtensiblePackage.eNS_URI); | |
// Obtain or create and register package | |
ExtensiblePackageImpl theExtensiblePackage = (ExtensiblePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExtensiblePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExtensiblePackageImpl()); | |
isInited = true; | |
// Initialize simple dependencies | |
EcorePackage.eINSTANCE.eClass(); | |
// Obtain or create and register interdependencies | |
EFacetPackageImpl theEFacetPackage = (EFacetPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EFacetPackage.eNS_URI) instanceof EFacetPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EFacetPackage.eNS_URI) : EFacetPackage.eINSTANCE); | |
SerializationPackageImpl theSerializationPackage = (SerializationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SerializationPackage.eNS_URI) instanceof SerializationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SerializationPackage.eNS_URI) : SerializationPackage.eINSTANCE); | |
QueryPackageImpl theQueryPackage = (QueryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryPackage.eNS_URI) instanceof QueryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryPackage.eNS_URI) : QueryPackage.eINSTANCE); | |
RuntimePackageImpl theRuntimePackage = (RuntimePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RuntimePackage.eNS_URI) instanceof RuntimePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RuntimePackage.eNS_URI) : RuntimePackage.eINSTANCE); | |
// Create package meta-data objects | |
theExtensiblePackage.createPackageContents(); | |
theEFacetPackage.createPackageContents(); | |
theSerializationPackage.createPackageContents(); | |
theQueryPackage.createPackageContents(); | |
theRuntimePackage.createPackageContents(); | |
// Initialize created meta-data | |
theExtensiblePackage.initializePackageContents(); | |
theEFacetPackage.initializePackageContents(); | |
theSerializationPackage.initializePackageContents(); | |
theQueryPackage.initializePackageContents(); | |
theRuntimePackage.initializePackageContents(); | |
// Mark meta-data to indicate it can't be changed | |
theExtensiblePackage.freeze(); | |
// Update the registry and return the package | |
EPackage.Registry.INSTANCE.put(ExtensiblePackage.eNS_URI, theExtensiblePackage); | |
return theExtensiblePackage; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EClass getQuery() { | |
return queryEClass; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getQuery_CanHaveSideEffects() { | |
return (EAttribute)queryEClass.getEStructuralFeatures().get(0); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EAttribute getQuery_CanBeCached() { | |
return (EAttribute)queryEClass.getEStructuralFeatures().get(1); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public ExtensibleFactory getExtensibleFactory() { | |
return (ExtensibleFactory)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 | |
queryEClass = createEClass(QUERY); | |
createEAttribute(queryEClass, QUERY__CAN_HAVE_SIDE_EFFECTS); | |
createEAttribute(queryEClass, QUERY__CAN_BE_CACHED); | |
} | |
/** | |
* <!-- 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 | |
// Initialize classes and features; add operations and parameters | |
initEClass(queryEClass, Query.class, "Query", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ | |
initEAttribute(getQuery_CanHaveSideEffects(), ecorePackage.getEBoolean(), "canHaveSideEffects", null, 0, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ | |
initEAttribute(getQuery_CanBeCached(), ecorePackage.getEBoolean(), "canBeCached", null, 0, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ | |
} | |
} //ExtensiblePackageImpl |