Java Code Examples for org.eclipse.emf.ecore.EPackage

The following are top voted examples for showing how to use org.eclipse.emf.ecore.EPackage. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: pokemon-tcgo-deck-generator   File: PkmntcgoFactoryImpl.java   View source code 6 votes vote down vote up
/**
 * 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();
}
 
Example 2
Project: BIMplatform   File: Ifc2x3tc1PackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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);
}
 
Example 3
Project: BIMplatform   File: LogPackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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);
}
 
Example 4
Project: rgse.ttc17.emoflon.tgg   File: Task1PackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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);
}
 
Example 5
Project: gemoc-studio   File: FsmPackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 6
Project: Saturn   File: RuncmdsModuleFactoryImpl.java   View source code 6 votes vote down vote up
/**
 * 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();
}
 
Example 7
Project: ttc2017smartGrids   File: COSEMPackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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);
}
 
Example 8
Project: BIMplatform   File: Ifc4PackageImpl.java   View source code 6 votes vote down vote up
/**
 * 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);
}
 
Example 9
Project: JavaGraph   File: TypeToEcore.java   View source code 6 votes vote down vote up
@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);
    }
}
 
Example 10
Project: pokemon-tcgo-deck-generator   File: PkmntcgoStandaloneSetupGenerated.java   View source code 5 votes vote down vote up
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);
}
 
Example 11
Project: ttc2017smartGrids   File: OperationalLimitsFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 12
Project: ttc2017smartGrids   File: RulesPackageImpl.java   View source code 5 votes vote down vote up
/**
 * 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;
}
 
Example 13
Project: ttc2017smartGrids   File: FinancialFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 14
Project: rgse.ttc17.emoflon.tgg   File: CoreFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 15
Project: rgse.ttc17.emoflon.tgg   File: DatatypesFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 16
Project: gemoc-studio   File: FsmTraceFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 17
Project: TOSCA-Studio   File: ToscaPackageImpl.java   View source code 5 votes vote down vote up
/**
 * 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;
}
 
Example 18
Project: ttc2017smartGrids   File: InfMeteringFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 19
Project: rgse.ttc17.emoflon.tgg   File: InfAssetsFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 20
Project: ttc2017smartGrids   File: DataclassesFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 21
Project: ttc2017smartGrids   File: InfTypeAssetFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 22
Project: ttc2017smartGrids   File: StateVariablesFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 23
Project: rgse.ttc17.emoflon.tgg   File: InfCoreFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 24
Project: Tarski   File: EcoreUtilities.java   View source code 5 votes vote down vote up
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);
    }
  }
}
 
Example 25
Project: ttc2017smartGrids   File: LNGroupTFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 26
Project: ttc2017smartGrids   File: LNGroupMFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 27
Project: ttc2017smartGrids   File: DomainLNsFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 28
Project: rgse.ttc17.emoflon.tgg   File: InfPaymentMeteringFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 29
Project: ttc2017smartGrids   File: InfWorkFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 30
Project: neoscada   File: ArduinoPackageImpl.java   View source code 5 votes vote down vote up
/**
 * 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 );
}
 
Example 31
Project: rgse.ttc17.emoflon.tgg   File: ContingencyFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 32
Project: ttc2017smartGrids   File: LNGroupXFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 33
Project: ttc2017smartGrids   File: InfPaymentMeteringFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 34
Project: ttc2017smartGrids   File: DatatypesFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 35
Project: ttc2017smartGrids   File: FinancialFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 36
Project: ttc2017smartGrids   File: InterfaceClassesFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 37
Project: ttc2017smartGrids   File: InfWorkFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 38
Project: ttc2017smartGrids   File: COSEMFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 39
Project: ttc2017smartGrids   File: InfGMLSupportFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}
 
Example 40
Project: ttc2017smartGrids   File: ContingencyFactoryImpl.java   View source code 5 votes vote down vote up
/**
 * 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();
}