/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static PkmntcgoFactory init() { try { PkmntcgoFactory thePkmntcgoFactory = (PkmntcgoFactory)EPackage.Registry.INSTANCE.getEFactory(PkmntcgoPackage.eNS_URI); if (thePkmntcgoFactory != null) { return thePkmntcgoFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new PkmntcgoFactoryImpl(); }
/** * Laods the package and any sub-packages from their serialized form. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void loadPackage() { if (isLoaded) return; isLoaded = true; URL url = getClass().getResource(packageFilename); if (url == null) { throw new RuntimeException("Missing serialized package: " + packageFilename); } URI uri = URI.createURI(url.toString()); Resource resource = new EcoreResourceFactoryImpl().createResource(uri); try { resource.load(null); } catch (IOException exception) { throw new WrappedException(exception); } initializeFromLoadedEPackage(this, (EPackage) resource.getContents().get(0)); createResource(eNS_URI); }
/** * 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 FsmPackage#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 FsmPackage init() { if (isInited) return (FsmPackage)EPackage.Registry.INSTANCE.getEPackage(FsmPackage.eNS_URI); // Obtain or create and register package FsmPackageImpl theFsmPackage = (FsmPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FsmPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FsmPackageImpl()); isInited = true; // Initialize simple dependencies EcorePackage.eINSTANCE.eClass(); // Create package meta-data objects theFsmPackage.createPackageContents(); // Initialize created meta-data theFsmPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theFsmPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(FsmPackage.eNS_URI, theFsmPackage); return theFsmPackage; }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public static RuncmdsModuleFactory init() { try { RuncmdsModuleFactory theRuncmdsModuleFactory = (RuncmdsModuleFactory)EPackage.Registry.INSTANCE.getEFactory(RuncmdsModulePackage.eNS_URI); if (theRuncmdsModuleFactory != null) { return theRuncmdsModuleFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new RuncmdsModuleFactoryImpl(); }
/** * Laods the package and any sub-packages from their serialized form. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void loadPackage() { if (isLoaded) return; isLoaded = true; URL url = getClass().getResource(packageFilename); if (url == null) { throw new RuntimeException("Missing serialized package: " + packageFilename); } URI uri = URI.createURI(url.toString()); Resource resource = new EcoreResourceFactoryImpl().createResource(uri); try { resource.load(null); } catch (IOException exception) { throw new WrappedException(exception); } initializeFromLoadedEPackage(this, (EPackage)resource.getContents().get(0)); createResource(eNS_URI); }
@Override public void visit(Tuple tuple, String param) { if (hasElement(tuple)) { return; } EPackage firstRoot = this.m_rootPackages.iterator() .next(); EClass eClass = g_EcoreFactory.createEClass(); setElement(tuple, eClass); eClass.setName(getTupleName(tuple)); firstRoot.getEClassifiers() .add(eClass); int typeIndex = 1; for (Type type : tuple.getTypes()) { Field typeField = new Field(Name.getName(getTupleElementName(tuple, typeIndex++)), type, 1, 1); EStructuralFeature eStructFeat = (EStructuralFeature) getElement(typeField); eClass.getEStructuralFeatures() .add(eStructFeat); } }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.baernreuther.de/dsls/Pkmntcgo")) { EPackage.Registry.INSTANCE.put("http://www.baernreuther.de/dsls/Pkmntcgo", PkmntcgoPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ptcgo", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("ptcgo", serviceProvider); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static OperationalLimitsFactory init() { try { OperationalLimitsFactory theOperationalLimitsFactory = (OperationalLimitsFactory)EPackage.Registry.INSTANCE.getEFactory(OperationalLimitsPackage.eNS_URI); if (theOperationalLimitsFactory != null) { return theOperationalLimitsFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new OperationalLimitsFactoryImpl(); }
/** * 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 RulesPackage#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 * @generated */ public static RulesPackage init() { if (isInited) return (RulesPackage) EPackage.Registry.INSTANCE.getEPackage(RulesPackage.eNS_URI); // Obtain or create and register package RulesPackageImpl theRulesPackage = (RulesPackageImpl) (EPackage.Registry.INSTANCE .get(eNS_URI) instanceof RulesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RulesPackageImpl()); isInited = true; // Initialize simple dependencies OutagePreventionJointargetPackage.eINSTANCE.eClass(); GluemodelPackage.eINSTANCE.eClass(); LanguagePackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies Task2PackageImpl theTask2Package = (Task2PackageImpl) (EPackage.Registry.INSTANCE .getEPackage(Task2Package.eNS_URI) instanceof Task2PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Task2Package.eNS_URI) : Task2Package.eINSTANCE); // Load packages theTask2Package.loadPackage(); // Fix loaded packages theRulesPackage.fixPackageContents(); theTask2Package.fixPackageContents(); // Mark meta-data to indicate it can't be changed theRulesPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(RulesPackage.eNS_URI, theRulesPackage); return theRulesPackage; }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static FinancialFactory init() { try { FinancialFactory theFinancialFactory = (FinancialFactory)EPackage.Registry.INSTANCE.getEFactory(FinancialPackage.eNS_URI); if (theFinancialFactory != null) { return theFinancialFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new FinancialFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static CoreFactory init() { try { CoreFactory theCoreFactory = (CoreFactory)EPackage.Registry.INSTANCE.getEFactory(CorePackage.eNS_URI); if (theCoreFactory != null) { return theCoreFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new CoreFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DatatypesFactory init() { try { DatatypesFactory theDatatypesFactory = (DatatypesFactory)EPackage.Registry.INSTANCE.getEFactory(DatatypesPackage.eNS_URI); if (theDatatypesFactory != null) { return theDatatypesFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DatatypesFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static FsmTraceFactory init() { try { FsmTraceFactory theFsmTraceFactory = (FsmTraceFactory)EPackage.Registry.INSTANCE.getEFactory(FsmTracePackage.eNS_URI); if (theFsmTraceFactory != null) { return theFsmTraceFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new FsmTraceFactoryImpl(); }
/** * 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 ToscaPackage#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 ToscaPackage init() { if (isInited) return (ToscaPackage)EPackage.Registry.INSTANCE.getEPackage(ToscaPackage.eNS_URI); // Obtain or create and register package ToscaPackageImpl theToscaPackage = (ToscaPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ToscaPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ToscaPackageImpl()); isInited = true; // Initialize simple dependencies InfrastructurePackage.eINSTANCE.eClass(); PlatformPackage.eINSTANCE.eClass(); SlaPackage.eINSTANCE.eClass(); OCCIPackage.eINSTANCE.eClass(); // Create package meta-data objects theToscaPackage.createPackageContents(); // Initialize created meta-data theToscaPackage.initializePackageContents(); // Register package validator EValidator.Registry.INSTANCE.put (theToscaPackage, new EValidator.Descriptor() { public EValidator getEValidator() { return ToscaValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed theToscaPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(ToscaPackage.eNS_URI, theToscaPackage); return theToscaPackage; }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfMeteringFactory init() { try { InfMeteringFactory theInfMeteringFactory = (InfMeteringFactory)EPackage.Registry.INSTANCE.getEFactory(InfMeteringPackage.eNS_URI); if (theInfMeteringFactory != null) { return theInfMeteringFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfMeteringFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfAssetsFactory init() { try { InfAssetsFactory theInfAssetsFactory = (InfAssetsFactory)EPackage.Registry.INSTANCE.getEFactory(InfAssetsPackage.eNS_URI); if (theInfAssetsFactory != null) { return theInfAssetsFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfAssetsFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DataclassesFactory init() { try { DataclassesFactory theDataclassesFactory = (DataclassesFactory)EPackage.Registry.INSTANCE.getEFactory(DataclassesPackage.eNS_URI); if (theDataclassesFactory != null) { return theDataclassesFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DataclassesFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfTypeAssetFactory init() { try { InfTypeAssetFactory theInfTypeAssetFactory = (InfTypeAssetFactory)EPackage.Registry.INSTANCE.getEFactory(InfTypeAssetPackage.eNS_URI); if (theInfTypeAssetFactory != null) { return theInfTypeAssetFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfTypeAssetFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static StateVariablesFactory init() { try { StateVariablesFactory theStateVariablesFactory = (StateVariablesFactory)EPackage.Registry.INSTANCE.getEFactory(StateVariablesPackage.eNS_URI); if (theStateVariablesFactory != null) { return theStateVariablesFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new StateVariablesFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfCoreFactory init() { try { InfCoreFactory theInfCoreFactory = (InfCoreFactory)EPackage.Registry.INSTANCE.getEFactory(InfCorePackage.eNS_URI); if (theInfCoreFactory != null) { return theInfCoreFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfCoreFactoryImpl(); }
private static void recursiveGetEClasses(final EObject object, final List<EClass> classes) { for (final EObject eObject : object.eContents()) { if (eObject instanceof EClass) { classes.add((EClass) eObject); } else if (eObject instanceof EPackage) { EcoreUtilities.recursiveGetEClasses(eObject, classes); } } }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LNGroupTFactory init() { try { LNGroupTFactory theLNGroupTFactory = (LNGroupTFactory)EPackage.Registry.INSTANCE.getEFactory(LNGroupTPackage.eNS_URI); if (theLNGroupTFactory != null) { return theLNGroupTFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new LNGroupTFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LNGroupMFactory init() { try { LNGroupMFactory theLNGroupMFactory = (LNGroupMFactory)EPackage.Registry.INSTANCE.getEFactory(LNGroupMPackage.eNS_URI); if (theLNGroupMFactory != null) { return theLNGroupMFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new LNGroupMFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DomainLNsFactory init() { try { DomainLNsFactory theDomainLNsFactory = (DomainLNsFactory)EPackage.Registry.INSTANCE.getEFactory(DomainLNsPackage.eNS_URI); if (theDomainLNsFactory != null) { return theDomainLNsFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DomainLNsFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfPaymentMeteringFactory init() { try { InfPaymentMeteringFactory theInfPaymentMeteringFactory = (InfPaymentMeteringFactory)EPackage.Registry.INSTANCE.getEFactory(InfPaymentMeteringPackage.eNS_URI); if (theInfPaymentMeteringFactory != null) { return theInfPaymentMeteringFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfPaymentMeteringFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfWorkFactory init() { try { InfWorkFactory theInfWorkFactory = (InfWorkFactory)EPackage.Registry.INSTANCE.getEFactory(InfWorkPackage.eNS_URI); if (theInfWorkFactory != null) { return theInfWorkFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfWorkFactoryImpl(); }
/** * 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 WorldPackage theWorldPackage = (WorldPackage)EPackage.Registry.INSTANCE.getEPackage ( WorldPackage.eNS_URI ); OsgiPackage theOsgiPackage = (OsgiPackage)EPackage.Registry.INSTANCE.getEPackage ( OsgiPackage.eNS_URI ); InfrastructurePackage theInfrastructurePackage = (InfrastructurePackage)EPackage.Registry.INSTANCE.getEPackage ( InfrastructurePackage.eNS_URI ); // Create type parameters // Set bounds for type parameters // Add supertypes to classes arduinoDriverEClass.getESuperTypes ().add ( theWorldPackage.getDriver () ); arduinoDriverEClass.getESuperTypes ().add ( theOsgiPackage.getEquinoxApplication () ); arduinoConnectionEClass.getESuperTypes ().add ( theWorldPackage.getNamedDocumentable () ); arduinoDeviceEClass.getESuperTypes ().add ( theInfrastructurePackage.getDevice () ); // Initialize classes, features, and operations; add parameters initEClass ( arduinoDriverEClass, ArduinoDriver.class, "ArduinoDriver", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$ initEReference ( getArduinoDriver_ArduinoConnections (), this.getArduinoConnection (), null, "arduinoConnections", null, 0, -1, ArduinoDriver.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$ initEClass ( arduinoConnectionEClass, ArduinoConnection.class, "ArduinoConnection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$ initEReference ( getArduinoConnection_Endpoint (), theWorldPackage.getEndpoint (), null, "endpoint", null, 1, 1, ArduinoConnection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$ initEClass ( arduinoDeviceEClass, ArduinoDevice.class, "ArduinoDevice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS ); //$NON-NLS-1$ initEAttribute ( getArduinoDevice_Port (), ecorePackage.getEShort (), "port", null, 1, 1, ArduinoDevice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$ // Create resource createResource ( eNS_URI ); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ContingencyFactory init() { try { ContingencyFactory theContingencyFactory = (ContingencyFactory)EPackage.Registry.INSTANCE.getEFactory(ContingencyPackage.eNS_URI); if (theContingencyFactory != null) { return theContingencyFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ContingencyFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static LNGroupXFactory init() { try { LNGroupXFactory theLNGroupXFactory = (LNGroupXFactory)EPackage.Registry.INSTANCE.getEFactory(LNGroupXPackage.eNS_URI); if (theLNGroupXFactory != null) { return theLNGroupXFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new LNGroupXFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InterfaceClassesFactory init() { try { InterfaceClassesFactory theInterfaceClassesFactory = (InterfaceClassesFactory)EPackage.Registry.INSTANCE.getEFactory(InterfaceClassesPackage.eNS_URI); if (theInterfaceClassesFactory != null) { return theInterfaceClassesFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InterfaceClassesFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static COSEMFactory init() { try { COSEMFactory theCOSEMFactory = (COSEMFactory)EPackage.Registry.INSTANCE.getEFactory(COSEMPackage.eNS_URI); if (theCOSEMFactory != null) { return theCOSEMFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new COSEMFactoryImpl(); }
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InfGMLSupportFactory init() { try { InfGMLSupportFactory theInfGMLSupportFactory = (InfGMLSupportFactory)EPackage.Registry.INSTANCE.getEFactory(InfGMLSupportPackage.eNS_URI); if (theInfGMLSupportFactory != null) { return theInfGMLSupportFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new InfGMLSupportFactoryImpl(); }