Class VtlExpressionParser
- java.lang.Object
-
- net.ssehub.easy.basics.modelManagement.AbstractModelInitializer<Template>
-
- de.uni_hildesheim.sse.vil.templatelang.VtlExpressionParser
-
- All Implemented Interfaces:
ModelInitializer.IModelInitializer,IExpressionParser<Resolver>
public class VtlExpressionParser extends AbstractModelInitializer<Template> implements IExpressionParser<Resolver>
Provides an expression parser for VTL.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description VtlExpressionParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.service.component.ComponentContext context)Private method to activate plugin.protected voiddeactivate(org.osgi.service.component.ComponentContext context)Private method to to de-activate plugin.protected IModelLoader<Template>getModelLoader()Returns the actual model loader.protected ModelManagement<Template>getModelManagement()Returns the actual model management instance.Expressionparse(java.lang.String text, IRuntimeEnvironment environment)Parses the given text into an expression.Expressionparse(java.lang.String text, Resolver resolver)Parses the given text into an expression.static VtlExpressionParserregister()Registers the expression parser in case that VTL shall be used without Eclipse-DS initialization.static voidunregister(VtlExpressionParser parser)Unregisters the parser obtained fromregister().-
Methods inherited from class net.ssehub.easy.basics.modelManagement.AbstractModelInitializer
addLocation, addLocationToFront, registerLoader, removeLocation, stripFile, unregisterLoader
-
-
-
-
Method Detail
-
register
public static VtlExpressionParser register()
Registers the expression parser in case that VTL shall be used without Eclipse-DS initialization. Do not call this method within Eclipse.- Returns:
- the registered instance (for
unregister(VtlExpressionParser))
-
unregister
public static void unregister(VtlExpressionParser parser)
Unregisters the parser obtained fromregister().- Parameters:
parser- the parser to unregister
-
activate
protected void activate(org.osgi.service.component.ComponentContext context)
Private method to activate plugin.- Parameters:
context- Context.
-
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext context)
Private method to to de-activate plugin.- Parameters:
context- Context.
-
parse
public Expression parse(java.lang.String text, IRuntimeEnvironment environment) throws VilException
Description copied from interface:IExpressionParserParses the given text into an expression. Resolution will happen in a separate resolver instance.- Specified by:
parsein interfaceIExpressionParser<Resolver>- Parameters:
text- the text to be parsedenvironment- the runtime environment used to resolve variables- Returns:
- the parsed expression
- Throws:
VilException- in case of parse problems
-
parse
public Expression parse(java.lang.String text, Resolver resolver) throws VilException
Description copied from interface:IExpressionParserParses the given text into an expression. Resolution will happen in the given resolver instance.- Specified by:
parsein interfaceIExpressionParser<Resolver>- Parameters:
text- the text to be parsedresolver- a resolver instance providing a parse environment consisting of variables- Returns:
- the parsed expression
- Throws:
VilException- in case of parse problems
-
getModelManagement
protected ModelManagement<Template> getModelManagement()
Description copied from class:AbstractModelInitializerReturns the actual model management instance.- Specified by:
getModelManagementin classAbstractModelInitializer<Template>- Returns:
- the model management instance
-
getModelLoader
protected IModelLoader<Template> getModelLoader()
Description copied from class:AbstractModelInitializerReturns the actual model loader.- Specified by:
getModelLoaderin classAbstractModelInitializer<Template>- Returns:
- the model loader (may be null if registration of the loader is done differently)
-
-