| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package scheduler.impl; |
| 8 | |
| 9 | import de.uka.ipd.sdq.identifier.IdentifierPackage; |
| 10 | |
| 11 | import org.eclipse.emf.ecore.EClass; |
| 12 | import org.eclipse.emf.ecore.EPackage; |
| 13 | import org.eclipse.emf.ecore.EReference; |
| 14 | |
| 15 | import org.eclipse.emf.ecore.impl.EPackageImpl; |
| 16 | |
| 17 | import scheduler.SchedulerFactory; |
| 18 | import scheduler.SchedulerLibrary; |
| 19 | import scheduler.SchedulerPackage; |
| 20 | import scheduler.SystemConfiguration; |
| 21 | |
| 22 | import scheduler.configuration.ConfigurationPackage; |
| 23 | |
| 24 | import scheduler.configuration.impl.ConfigurationPackageImpl; |
| 25 | |
| 26 | /** |
| 27 | * <!-- begin-user-doc --> |
| 28 | * An implementation of the model <b>Package</b>. |
| 29 | * <!-- end-user-doc --> |
| 30 | * @generated |
| 31 | */ |
| 32 | public class SchedulerPackageImpl extends EPackageImpl implements SchedulerPackage { |
| 33 | /** |
| 34 | * <!-- begin-user-doc --> |
| 35 | * <!-- end-user-doc --> |
| 36 | * @generated |
| 37 | */ |
| 38 | private EClass schedulerLibraryEClass = null; |
| 39 | |
| 40 | /** |
| 41 | * <!-- begin-user-doc --> |
| 42 | * <!-- end-user-doc --> |
| 43 | * @generated |
| 44 | */ |
| 45 | private EClass systemConfigurationEClass = null; |
| 46 | |
| 47 | /** |
| 48 | * Creates an instance of the model <b>Package</b>, registered with |
| 49 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
| 50 | * package URI value. |
| 51 | * <p>Note: the correct way to create the package is via the static |
| 52 | * factory method {@link #init init()}, which also performs |
| 53 | * initialization of the package, or returns the registered package, |
| 54 | * if one already exists. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * <!-- end-user-doc --> |
| 57 | * @see org.eclipse.emf.ecore.EPackage.Registry |
| 58 | * @see scheduler.SchedulerPackage#eNS_URI |
| 59 | * @see #init() |
| 60 | * @generated |
| 61 | */ |
| 62 | private SchedulerPackageImpl() { |
| 63 | super(eNS_URI, SchedulerFactory.eINSTANCE); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * <!-- begin-user-doc --> |
| 68 | * <!-- end-user-doc --> |
| 69 | * @generated |
| 70 | */ |
| 71 | private static boolean isInited = false; |
| 72 | |
| 73 | /** |
| 74 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
| 75 | * |
| 76 | * <p>This method is used to initialize {@link SchedulerPackage#eINSTANCE} when that field is accessed. |
| 77 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
| 78 | * <!-- begin-user-doc --> |
| 79 | * <!-- end-user-doc --> |
| 80 | * @see #eNS_URI |
| 81 | * @see #createPackageContents() |
| 82 | * @see #initializePackageContents() |
| 83 | * @generated |
| 84 | */ |
| 85 | public static SchedulerPackage init() { |
| 86 | if (isInited) return (SchedulerPackage)EPackage.Registry.INSTANCE.getEPackage(SchedulerPackage.eNS_URI); |
| 87 | |
| 88 | // Obtain or create and register package |
| 89 | SchedulerPackageImpl theSchedulerPackage = (SchedulerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SchedulerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SchedulerPackageImpl()); |
| 90 | |
| 91 | isInited = true; |
| 92 | |
| 93 | // Initialize simple dependencies |
| 94 | IdentifierPackage.eINSTANCE.eClass(); |
| 95 | |
| 96 | // Obtain or create and register interdependencies |
| 97 | ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI) : ConfigurationPackage.eINSTANCE); |
| 98 | |
| 99 | // Create package meta-data objects |
| 100 | theSchedulerPackage.createPackageContents(); |
| 101 | theConfigurationPackage.createPackageContents(); |
| 102 | |
| 103 | // Initialize created meta-data |
| 104 | theSchedulerPackage.initializePackageContents(); |
| 105 | theConfigurationPackage.initializePackageContents(); |
| 106 | |
| 107 | // Mark meta-data to indicate it can't be changed |
| 108 | theSchedulerPackage.freeze(); |
| 109 | |
| 110 | |
| 111 | // Update the registry and return the package |
| 112 | EPackage.Registry.INSTANCE.put(SchedulerPackage.eNS_URI, theSchedulerPackage); |
| 113 | return theSchedulerPackage; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * <!-- begin-user-doc --> |
| 118 | * <!-- end-user-doc --> |
| 119 | * @generated |
| 120 | */ |
| 121 | public EClass getSchedulerLibrary() { |
| 122 | return schedulerLibraryEClass; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * <!-- begin-user-doc --> |
| 127 | * <!-- end-user-doc --> |
| 128 | * @generated |
| 129 | */ |
| 130 | public EReference getSchedulerLibrary_SchedulerConfiguration() { |
| 131 | return (EReference)schedulerLibraryEClass.getEStructuralFeatures().get(0); |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * <!-- begin-user-doc --> |
| 136 | * <!-- end-user-doc --> |
| 137 | * @generated |
| 138 | */ |
| 139 | public EClass getSystemConfiguration() { |
| 140 | return systemConfigurationEClass; |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * <!-- begin-user-doc --> |
| 145 | * <!-- end-user-doc --> |
| 146 | * @generated |
| 147 | */ |
| 148 | public EReference getSystemConfiguration_ProcessConfiguration() { |
| 149 | return (EReference)systemConfigurationEClass.getEStructuralFeatures().get(0); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * <!-- begin-user-doc --> |
| 154 | * <!-- end-user-doc --> |
| 155 | * @generated |
| 156 | */ |
| 157 | public EReference getSystemConfiguration_ActiveResourceConfiguration() { |
| 158 | return (EReference)systemConfigurationEClass.getEStructuralFeatures().get(1); |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * <!-- begin-user-doc --> |
| 163 | * <!-- end-user-doc --> |
| 164 | * @generated |
| 165 | */ |
| 166 | public EReference getSystemConfiguration_PassiveResourceConfiguration() { |
| 167 | return (EReference)systemConfigurationEClass.getEStructuralFeatures().get(2); |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * <!-- begin-user-doc --> |
| 172 | * <!-- end-user-doc --> |
| 173 | * @generated |
| 174 | */ |
| 175 | public SchedulerFactory getSchedulerFactory() { |
| 176 | return (SchedulerFactory)getEFactoryInstance(); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * <!-- begin-user-doc --> |
| 181 | * <!-- end-user-doc --> |
| 182 | * @generated |
| 183 | */ |
| 184 | private boolean isCreated = false; |
| 185 | |
| 186 | /** |
| 187 | * Creates the meta-model objects for the package. This method is |
| 188 | * guarded to have no affect on any invocation but its first. |
| 189 | * <!-- begin-user-doc --> |
| 190 | * <!-- end-user-doc --> |
| 191 | * @generated |
| 192 | */ |
| 193 | public void createPackageContents() { |
| 194 | if (isCreated) return; |
| 195 | isCreated = true; |
| 196 | |
| 197 | // Create classes and their features |
| 198 | schedulerLibraryEClass = createEClass(SCHEDULER_LIBRARY); |
| 199 | createEReference(schedulerLibraryEClass, SCHEDULER_LIBRARY__SCHEDULER_CONFIGURATION); |
| 200 | |
| 201 | systemConfigurationEClass = createEClass(SYSTEM_CONFIGURATION); |
| 202 | createEReference(systemConfigurationEClass, SYSTEM_CONFIGURATION__PROCESS_CONFIGURATION); |
| 203 | createEReference(systemConfigurationEClass, SYSTEM_CONFIGURATION__ACTIVE_RESOURCE_CONFIGURATION); |
| 204 | createEReference(systemConfigurationEClass, SYSTEM_CONFIGURATION__PASSIVE_RESOURCE_CONFIGURATION); |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * <!-- begin-user-doc --> |
| 209 | * <!-- end-user-doc --> |
| 210 | * @generated |
| 211 | */ |
| 212 | private boolean isInitialized = false; |
| 213 | |
| 214 | /** |
| 215 | * Complete the initialization of the package and its meta-model. This |
| 216 | * method is guarded to have no affect on any invocation but its first. |
| 217 | * <!-- begin-user-doc --> |
| 218 | * <!-- end-user-doc --> |
| 219 | * @generated |
| 220 | */ |
| 221 | public void initializePackageContents() { |
| 222 | if (isInitialized) return; |
| 223 | isInitialized = true; |
| 224 | |
| 225 | // Initialize package |
| 226 | setName(eNAME); |
| 227 | setNsPrefix(eNS_PREFIX); |
| 228 | setNsURI(eNS_URI); |
| 229 | |
| 230 | // Obtain other dependent packages |
| 231 | ConfigurationPackage theConfigurationPackage = (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI); |
| 232 | |
| 233 | // Add subpackages |
| 234 | getESubpackages().add(theConfigurationPackage); |
| 235 | |
| 236 | // Create type parameters |
| 237 | |
| 238 | // Set bounds for type parameters |
| 239 | |
| 240 | // Add supertypes to classes |
| 241 | |
| 242 | // Initialize classes and features; add operations and parameters |
| 243 | initEClass(schedulerLibraryEClass, SchedulerLibrary.class, "SchedulerLibrary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| 244 | initEReference(getSchedulerLibrary_SchedulerConfiguration(), theConfigurationPackage.getSchedulerConfiguration(), null, "schedulerConfiguration", null, 0, -1, SchedulerLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| 245 | |
| 246 | initEClass(systemConfigurationEClass, SystemConfiguration.class, "SystemConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| 247 | initEReference(getSystemConfiguration_ProcessConfiguration(), theConfigurationPackage.getProcessConfiguration(), null, "processConfiguration", null, 0, -1, SystemConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| 248 | initEReference(getSystemConfiguration_ActiveResourceConfiguration(), theConfigurationPackage.getActiveResourceConfiguration(), null, "activeResourceConfiguration", null, 0, -1, SystemConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| 249 | initEReference(getSystemConfiguration_PassiveResourceConfiguration(), theConfigurationPackage.getPassiveResourceConfiguration(), null, "passiveResourceConfiguration", null, 0, -1, SystemConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
| 250 | |
| 251 | // Create resource |
| 252 | createResource(eNS_URI); |
| 253 | } |
| 254 | |
| 255 | } //SchedulerPackageImpl |