Class IvmlModelQuery
- java.lang.Object
-
- de.uni_hildesheim.sse.ui.hyperlinking.IvmlModelQuery
-
- All Implemented Interfaces:
IModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>
public class IvmlModelQuery extends java.lang.Object implements IModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>
-
-
Field Summary
Fields Modifier and Type Field Description static IvmlModelQueryINSTANCE
-
Constructor Summary
Constructors Constructor Description IvmlModelQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelElementTypeFinder.ModelElementDescriptionfindDeclaration(Project project, ContainableModelElement modelElement)Finds a model element an returns a generic result.private EASyLoggerFactory.EASyLoggergetLogger()Returns the logger.ContainableModelElementgetModelElement(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<Project>getModelManagement()Returns the model management instance.ProjectgetParentProject(ContainableModelElement modelElement)Returns the parentProjectthe givenContainableModelElementis declared in.
-
-
-
Field Detail
-
INSTANCE
public static final IvmlModelQuery INSTANCE
-
-
Method Detail
-
getModelManagement
public ModelManagement<Project> getModelManagement()
Description copied from interface:IModelQueryReturns the model management instance.- Specified by:
getModelManagementin interfaceIModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>- Returns:
- the model management instance
-
getModelElement
public ContainableModelElement getModelElement(java.lang.String selectedElement, java.lang.String selectedElementsProjectName)
Description copied from interface:IModelQueryReturns 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.- Specified by:
getModelElementin interfaceIModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>- 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
public Project getParentProject(ContainableModelElement modelElement)
Returns the parentProjectthe givenContainableModelElementis declared in.- Specified by:
getParentProjectin interfaceIModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>- Parameters:
modelElement- theContainableModelElementfor which the parent project should be found- Returns:
- the parent
Projectthe givenContainableModelElementis declared in. May returnnullif the given model element isnull, if the model element has no top-level parent (which typically is theProject), or the top-level parent is not an instance ofProject.
-
getLogger
private EASyLoggerFactory.EASyLogger getLogger()
Returns the logger.- Returns:
- the logger
-
findDeclaration
public ModelElementTypeFinder.ModelElementDescription findDeclaration(Project project, ContainableModelElement modelElement)
Description copied from interface:IModelQueryFinds a model element an returns a generic result.- Specified by:
findDeclarationin interfaceIModelQuery<Project,ContainableModelElement,ModelElementTypeFinder.ModelElementDescription>- Parameters:
project- the project to search withinmodelElement- the model element- Returns:
- the result, null if not found
-
-