public class VtlModelQuery extends java.lang.Object implements IModelQuery<Template,ITemplateLangElement,ILanguageElement>, ModelUtils.IModelFinder<Template,ITemplateLangElement>
| Modifier and Type | Field and Description |
|---|---|
static VtlModelQuery |
INSTANCE |
| Constructor and Description |
|---|
VtlModelQuery() |
| Modifier and Type | Method and Description |
|---|---|
ILanguageElement |
findDeclaration(Template template,
ITemplateLangElement modelElement)
Finds a model element an returns a generic result.
|
ITemplateLangElement |
findElement(Template model,
java.lang.String name)
Tries to find an element declaration for
name. |
ITemplateLangElement |
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<Template> |
getModelManagement()
Returns the model management instance.
|
Template |
getParentProject(ITemplateLangElement modelElement)
Returns the parent model/project the model element is declared in.
|
public static final VtlModelQuery INSTANCE
public ModelManagement<Template> getModelManagement()
IModelQuerygetModelManagement in interface IModelQuery<Template,ITemplateLangElement,ILanguageElement>public ITemplateLangElement getModelElement(java.lang.String selectedElement, java.lang.String selectedElementsProjectName)
IModelQuerygetModelElement in interface IModelQuery<Template,ITemplateLangElement,ILanguageElement>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 modelnull if the element could not be
found.public Template getParentProject(ITemplateLangElement modelElement)
IModelQuerygetParentProject in interface IModelQuery<Template,ITemplateLangElement,ILanguageElement>modelElement - the model element for which the parent
project should be foundnull 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.public ILanguageElement findDeclaration(Template template, ITemplateLangElement modelElement)
IModelQueryfindDeclaration in interface IModelQuery<Template,ITemplateLangElement,ILanguageElement>template - the project to search withinmodelElement - the model elementpublic ITemplateLangElement findElement(Template model, java.lang.String name)
ModelUtils.IModelFindername.findElement in interface ModelUtils.IModelFinder<Template,ITemplateLangElement>model - the modelname - the name to search forCopyright © 2009 - 2018 SSE. All Rights Reserved.