Interface IModelQuery<M extends IModel,E,R>
-
- Type Parameters:
M- the model typeE- the model element typeR- the result type when querying for model elements (must fit toIEcoreModelQuery)
- 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 RfindDeclaration(M project, E modelElement)Finds a model element an returns a generic result.EgetModelElement(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.MgetParentProject(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 aStringfor which the element in the model should be found.selectedElementsProjectName- the name of the project of the selected element as aStringwhich 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
nullif 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
nullif the given model element isnull, 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.
-
-