org.eclipse.viatra.query.tooling.core.targetplatform

## Class TargetPlatformMetamodelsIndex

- java.lang.Object
- - org.eclipse.viatra.query.tooling.core.targetplatform.TargetPlatformMetamodelsIndex

- All Implemented Interfaces:
    ITargetPlatformMetamodelLoader

      public final class TargetPlatformMetamodelsIndex
      extends java.lang.Object
      implements ITargetPlatformMetamodelLoader

  This class is responsible for querying the active target platform data for registered GenModels and EPackages.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `TargetPlatformMetamodelsIndex.TargetPlatformMetamodel`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TargetPlatformMetamodelsIndex()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `listEPackages()` List the URIs of the available EPackages
    `org.eclipse.emf.codegen.ecore.genmodel.GenPackage` | `loadGenPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String nsURI)` Load the GenPackage of the EPackage with the given ns URI
    `org.eclipse.emf.ecore.EPackage` | `loadPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String nsURI)` Load the EPackage with the given ns URI

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TargetPlatformMetamodelsIndex

          public TargetPlatformMetamodelsIndex()

      Since:
        1.6

  - ### Method Detail

    - #### listEPackages

          public java.util.List<java.lang.String> listEPackages()

      Description copied from interface: `ITargetPlatformMetamodelLoader`
      List the URIs of the available EPackages
      Specified by:
        `listEPackages` in interface `ITargetPlatformMetamodelLoader`
      Returns:
        a list containing the ns URIs of the registered EPackages

    - #### loadPackage

          public org.eclipse.emf.ecore.EPackage loadPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                                                            java.lang.String nsURI)

      Description copied from interface: `ITargetPlatformMetamodelLoader`
      Load the EPackage with the given ns URI
      Specified by:
        `loadPackage` in interface `ITargetPlatformMetamodelLoader`
      Returns:
        The EPackage instance, or null if it could not be loaded

    - #### loadGenPackage

          public org.eclipse.emf.codegen.ecore.genmodel.GenPackage loadGenPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                                                                                  java.lang.String nsURI)

      Description copied from interface: `ITargetPlatformMetamodelLoader`
      Load the GenPackage of the EPackage with the given ns URI
      Specified by:
        `loadGenPackage` in interface `ITargetPlatformMetamodelLoader`
      Returns:
        the registered GenPackage of the generated package