Interface IModelQuery<M extends IModel,​E,​R>

  • Type Parameters:
    M - the model type
    E - the model element type
    R - the result type when querying for model elements (must fit to IEcoreModelQuery)
    All Known Implementing Classes:
    IvmlModelQuery, VilModelQuery, VtlModelQuery

    public interface IModelQuery<M extends IModel,​E,​R>
    Performs queries on the respective semantic model.
    Author:
    Holger Eichelberger
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      R findDeclaration​(M project, E modelElement)
      Finds a model element an returns a generic result.
      E getModelElement​(java.lang.String selectedElement, java.lang.String selectedElementsProjectName)
      Returns the element of the model identified by the selected element (the name) and the scope which is the name of the project the selected element is located in.
      ModelManagement<M> getModelManagement()
      Returns the model management instance.
      M getParentProject​(E modelElement)
      Returns the parent model/project the model element is declared in.
    • Method Detail

      • getModelManagement

        ModelManagement<M> getModelManagement()
        Returns the model management instance.
        Returns:
        the model management instance
      • getModelElement

        E getModelElement​(java.lang.String selectedElement,
                          java.lang.String selectedElementsProjectName)
        Returns the element of the model identified by the selected element (the name) and the scope which is the name of the project the selected element is located in.
        Parameters:
        selectedElement - the name of the selected element as a String for which the element in the model should be found.
        selectedElementsProjectName - the name of the project of the selected element as a String which is used as the starting point for finding the corresponding element in the model
        Returns:
        the element in the model identified by the given name of the selected element. May return null if the element could not be found.
      • getParentProject

        M getParentProject​(E modelElement)
        Returns the parent model/project the model element is declared in.
        Parameters:
        modelElement - the model element for which the parent project should be found
        Returns:
        the parent project the given model element is declared in. May return null if the given model element is null, if the model element has no top-level parent (which typically is the project, or the top-level parent is not an instance of project.
      • findDeclaration

        R findDeclaration​(M project,
                          E modelElement)
        Finds a model element an returns a generic result.
        Parameters:
        project - the project to search within
        modelElement - the model element
        Returns:
        the result, null if not found