Package org.eclipse.viatra.query.patternlanguage.emf.scoping

## Class BaseMetamodelProviderService

- java.lang.Object
- - org.eclipse.viatra.query.patternlanguage.emf.scoping.BaseMetamodelProviderService

- All Implemented Interfaces:
    `IMetamodelProvider`
  Direct Known Subclasses:
    `MetamodelProviderService`, `ResourceSetMetamodelProviderService`

      public abstract class BaseMetamodelProviderService
      extends java.lang.Object
      implements IMetamodelProvider

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected org.apache.log4j.Logger` | `logger` |
    `protected org.eclipse.xtext.naming.IQualifiedNameConverter` | `qualifiedNameConverter` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BaseMetamodelProviderService()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract java.lang.String` | `doGetQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EObject context)` |
    `org.eclipse.xtext.scoping.IScope` | `getAllMetamodelObjects​(org.eclipse.xtext.scoping.IScope delegateScope, org.eclipse.emf.ecore.EObject context)` | Returns a set of all available EPackages wrapped into `IEObjectDescription` for the use of scoping.
    `protected EcoreGenmodelRegistry` | `getGenmodelRegistry()` |
    `protected java.lang.String` | `getModelPluginId​(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)` |
    `java.lang.String` | `getModelPluginId​(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.resource.ResourceSet set)` | Returns the identifier of the plugin that contains the generated model code.
    `protected abstract java.util.Collection<java.lang.String>` | `getProvidedMetamodels()` |
    `java.lang.String` | `getQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EObject context)` |
    `boolean` | `isGeneratedCodeAvailable​(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.resource.ResourceSet set)` | Returns true if the generated code is available for the given EPackage, the code uses the given resource set as context.

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

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

    - ### Methods inherited from interface org.eclipse.viatra.query.patternlanguage.emf.scoping.IMetamodelProvider

      `loadEPackage`

- - ### Field Detail

    - #### logger

          @Inject
          protected org.apache.log4j.Logger logger

    - #### qualifiedNameConverter

          @Inject
          protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter

  - ### Constructor Detail

    - #### BaseMetamodelProviderService

          public BaseMetamodelProviderService()

  - ### Method Detail

    - #### getGenmodelRegistry

          protected EcoreGenmodelRegistry getGenmodelRegistry()

    - #### getAllMetamodelObjects

          public org.eclipse.xtext.scoping.IScope getAllMetamodelObjects​(org.eclipse.xtext.scoping.IScope delegateScope,
                                                                         org.eclipse.emf.ecore.EObject context)

      Description copied from interface: `IMetamodelProvider`
      Returns a set of all available EPackages wrapped into `IEObjectDescription` for the use of scoping. It uses the `IEObjectDescription`s from the delegate scope provider too, this way the `EPackage`s from the XText index will be available too.
      Specified by:
        `getAllMetamodelObjects` in interface `IMetamodelProvider`
      Parameters:
        `delegateScope` - the delegate scope
        `context` - the context object for the scoping

    - #### getProvidedMetamodels

          protected abstract java.util.Collection<java.lang.String> getProvidedMetamodels()

    - #### doGetQualifiedClassName

          protected abstract java.lang.String doGetQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier,
                                                                      org.eclipse.emf.ecore.EObject context)

    - #### isGeneratedCodeAvailable

          public boolean isGeneratedCodeAvailable​(org.eclipse.emf.ecore.EPackage ePackage,
                                                  org.eclipse.emf.ecore.resource.ResourceSet set)

      Description copied from interface: `IMetamodelProvider`
      Returns true if the generated code is available for the given EPackage, the code uses the given resource set as context.
      Specified by:
        `isGeneratedCodeAvailable` in interface `IMetamodelProvider`
      Parameters:
        `ePackage` - for which the availability of generated code is checked
        `set` - used for context in the checking
      Returns:
        true, if the generated code for the EPackage is available

    - #### getModelPluginId

          public java.lang.String getModelPluginId​(org.eclipse.emf.ecore.EPackage ePackage,
                                                   org.eclipse.emf.ecore.resource.ResourceSet set)

      Description copied from interface: `IMetamodelProvider`
      Returns the identifier of the plugin that contains the generated model code.
      Specified by:
        `getModelPluginId` in interface `IMetamodelProvider`
      Parameters:
        `ePackage` - for which the model plugin ID is requested
        `set` - used for context in the searching
      Returns:
        the model plugin ID or null if it cannot be found
      Since:
        1.5

    - #### getModelPluginId

          protected java.lang.String getModelPluginId​(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)

      Since:
        1.5

    - #### getQualifiedClassName

          public java.lang.String getQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier,
                                                        org.eclipse.emf.ecore.EObject context)

      Specified by:
        `getQualifiedClassName` in interface `IMetamodelProvider`