/**
*/
package net.cis.common.model.spaceobject.impl;
import net.cis.common.model.base.BasePackage;
import net.cis.common.model.base.impl.BasePackageImpl;
import net.cis.common.model.descriptor.DescriptorPackage;
import net.cis.common.model.descriptor.impl.DescriptorPackageImpl;
import net.cis.common.model.modeler.ModelerPackage;
import net.cis.common.model.modeler.impl.ModelerPackageImpl;
import net.cis.common.model.sector.SectorPackage;
import net.cis.common.model.sector.impl.SectorPackageImpl;
import net.cis.common.model.shipdevice.ShipdevicePackage;
import net.cis.common.model.shipdevice.impl.ShipdevicePackageImpl;
import net.cis.common.model.spaceobject.Asteroid;
import net.cis.common.model.spaceobject.Cloud;
import net.cis.common.model.spaceobject.Comet;
import net.cis.common.model.spaceobject.Debries;
import net.cis.common.model.spaceobject.SpaceObject;
import net.cis.common.model.spaceobject.SpaceobjectFactory;
import net.cis.common.model.spaceobject.SpaceobjectPackage;
import net.cis.common.model.structure.StructurePackage;
import net.cis.common.model.structure.impl.StructurePackageImpl;
import net.cis.common.model.universe.UniversePackage;
import net.cis.common.model.universe.impl.UniversePackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SpaceobjectPackageImpl extends EPackageImpl implements SpaceobjectPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass spaceObjectEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass asteroidEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass cometEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass cloudEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass debriesEClass = 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 net.cis.common.model.spaceobject.SpaceobjectPackage#eNS_URI
* @see #init()
* @generated
*/
private SpaceobjectPackageImpl() {
super(eNS_URI, SpaceobjectFactory.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 SpaceobjectPackage#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 SpaceobjectPackage init() {
if (isInited) return (SpaceobjectPackage)EPackage.Registry.INSTANCE.getEPackage(SpaceobjectPackage.eNS_URI);
// Obtain or create and register package
SpaceobjectPackageImpl theSpaceobjectPackage = (SpaceobjectPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SpaceobjectPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SpaceobjectPackageImpl());
isInited = true;
// Obtain or create and register interdependencies
BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI) : BasePackage.eINSTANCE);
ShipdevicePackageImpl theShipdevicePackage = (ShipdevicePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ShipdevicePackage.eNS_URI) instanceof ShipdevicePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ShipdevicePackage.eNS_URI) : ShipdevicePackage.eINSTANCE);
ModelerPackageImpl theModelerPackage = (ModelerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ModelerPackage.eNS_URI) instanceof ModelerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ModelerPackage.eNS_URI) : ModelerPackage.eINSTANCE);
StructurePackageImpl theStructurePackage = (StructurePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StructurePackage.eNS_URI) instanceof StructurePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StructurePackage.eNS_URI) : StructurePackage.eINSTANCE);
DescriptorPackageImpl theDescriptorPackage = (DescriptorPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DescriptorPackage.eNS_URI) instanceof DescriptorPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DescriptorPackage.eNS_URI) : DescriptorPackage.eINSTANCE);
SectorPackageImpl theSectorPackage = (SectorPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SectorPackage.eNS_URI) instanceof SectorPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SectorPackage.eNS_URI) : SectorPackage.eINSTANCE);
UniversePackageImpl theUniversePackage = (UniversePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UniversePackage.eNS_URI) instanceof UniversePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UniversePackage.eNS_URI) : UniversePackage.eINSTANCE);
// Create package meta-data objects
theSpaceobjectPackage.createPackageContents();
theBasePackage.createPackageContents();
theShipdevicePackage.createPackageContents();
theModelerPackage.createPackageContents();
theStructurePackage.createPackageContents();
theDescriptorPackage.createPackageContents();
theSectorPackage.createPackageContents();
theUniversePackage.createPackageContents();
// Initialize created meta-data
theSpaceobjectPackage.initializePackageContents();
theBasePackage.initializePackageContents();
theShipdevicePackage.initializePackageContents();
theModelerPackage.initializePackageContents();
theStructurePackage.initializePackageContents();
theDescriptorPackage.initializePackageContents();
theSectorPackage.initializePackageContents();
theUniversePackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theSpaceobjectPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(SpaceobjectPackage.eNS_URI, theSpaceobjectPackage);
return theSpaceobjectPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getSpaceObject() {
return spaceObjectEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSpaceObject_Width() {
return (EAttribute)spaceObjectEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSpaceObject_Height() {
return (EAttribute)spaceObjectEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getSpaceObject_Length() {
return (EAttribute)spaceObjectEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getAsteroid() {
return asteroidEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getComet() {
return cometEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCloud() {
return cloudEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getDebries() {
return debriesEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SpaceobjectFactory getSpaceobjectFactory() {
return (SpaceobjectFactory)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
spaceObjectEClass = createEClass(SPACE_OBJECT);
createEAttribute(spaceObjectEClass, SPACE_OBJECT__WIDTH);
createEAttribute(spaceObjectEClass, SPACE_OBJECT__HEIGHT);
createEAttribute(spaceObjectEClass, SPACE_OBJECT__LENGTH);
asteroidEClass = createEClass(ASTEROID);
cometEClass = createEClass(COMET);
cloudEClass = createEClass(CLOUD);
debriesEClass = createEClass(DEBRIES);
}
/**
* <!-- 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
BasePackage theBasePackage = (BasePackage)EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
spaceObjectEClass.getESuperTypes().add(theBasePackage.getAbstractNamedEntity());
asteroidEClass.getESuperTypes().add(this.getSpaceObject());
cometEClass.getESuperTypes().add(this.getSpaceObject());
cloudEClass.getESuperTypes().add(this.getSpaceObject());
debriesEClass.getESuperTypes().add(this.getSpaceObject());
// Initialize classes and features; add operations and parameters
initEClass(spaceObjectEClass, SpaceObject.class, "SpaceObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getSpaceObject_Width(), ecorePackage.getEFloat(), "width", null, 1, 1, SpaceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getSpaceObject_Height(), ecorePackage.getEFloat(), "height", null, 1, 1, SpaceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getSpaceObject_Length(), ecorePackage.getEFloat(), "length", null, 1, 1, SpaceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(asteroidEClass, Asteroid.class, "Asteroid", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(cometEClass, Comet.class, "Comet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(cloudEClass, Cloud.class, "Cloud", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(debriesEClass, Debries.class, "Debries", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://net.cis.common.model/serializable
createSerializableAnnotations();
}
/**
* Initializes the annotations for <b>http://net.cis.common.model/serializable</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createSerializableAnnotations() {
String source = "http://net.cis.common.model/serializable";
addAnnotation
(this,
source,
new String[] {
});
}
} //SpaceobjectPackageImpl