Class AtlParser
java.lang.Object
org.eclipse.m2m.atl.engine.parser.AtlParser
- All Implemented Interfaces:
IExtractor
,IInjector
TCS utilities Wrapper.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
extract
(IModel sourceModel, OutputStream target, Map options) Extracts an IModel using the given options.void
Extracts an IModel using default options.void
Extracts an IModel using the given options.static AtlParser
Returns the default ATL parser.IModel[]
inject
(InputStream source, Map options) Create a new Model then injects data using the given options.IModel[]
Create a new Model then injects data using the given options.void
inject
(IModel targetModel, InputStream source, Map options) Injects data into an IModel using the given options.void
Injects data into an IModel using the given options.void
Injects data into an IModel using default options.void
Injects data into an IModel using the given options.org.eclipse.emf.ecore.EObject
parse
(InputStream in) Parses the given input stream.org.eclipse.emf.ecore.EObject[]
parseExpression
(String expression, String expressionType) ATL injector launcher.Parses the given input stream.IModel[]
parseToModelWithProblems
(InputStream in, boolean hideErrors) Parses the given input stream.org.eclipse.emf.ecore.EObject[]
Returns An array of EObject, the first one being an ATL!Unit and the following ones Problem!Problem.
-
Constructor Details
-
AtlParser
public AtlParser()
-
-
Method Details
-
getDefault
Returns the default ATL parser.- Returns:
- the default ATL parser
-
getModelFactory
-
getAtlTcsModel
-
getProblemMetamodel
-
getAtlMetamodel
-
inject
Create a new Model then injects data using the given options.- Parameters:
source
- theInputStream
containing the modeloptions
- the injection parameters- Returns:
- the new ATL Model
- Throws:
ATLCoreException
-
inject
Create a new Model then injects data using the given options.- Parameters:
source
- theReader
containing the modeloptions
- the injection parameters- Returns:
- the new ATL Model
- Throws:
ATLCoreException
-
inject
Injects data into an IModel using the given options.- Specified by:
inject
in interfaceIInjector
- Parameters:
targetModel
- the IModel where to injectsource
- theInputStream
containing the modeloptions
- the injection parameters- Throws:
ATLCoreException
- See Also:
-
inject
Injects data into an IModel using the given options.- Specified by:
inject
in interfaceIInjector
- Parameters:
targetModel
- the IModel where to injectsource
- theReader
containing the modeloptions
- the injection parameters- Throws:
ATLCoreException
- See Also:
-
inject
Injects data into an IModel using the given options.- Specified by:
inject
in interfaceIInjector
- Parameters:
targetModel
- the IModel where to injectsource
- the source indication to load the sourceModel: an URL, or a specific thingoptions
- the injection parameters- Throws:
ATLCoreException
- See Also:
-
inject
Injects data into an IModel using default options.- Specified by:
inject
in interfaceIInjector
- Parameters:
targetModel
- the IModel where to injectsource
- the source indication to load the sourceModel- Throws:
ATLCoreException
- See Also:
-
extract
Extracts an IModel using the given options.- Specified by:
extract
in interfaceIExtractor
- Parameters:
sourceModel
- the IModel to extracttarget
- theOutputStream
where to extract the targetModeloptions
- the extraction parameters- Throws:
ATLCoreException
- See Also:
-
extract
Extracts an IModel using the given options.- Specified by:
extract
in interfaceIExtractor
- Parameters:
sourceModel
- the IModel to extracttarget
- the target indication to extract the targetModeloptions
- the extraction parameters- Throws:
ATLCoreException
- See Also:
-
extract
Extracts an IModel using default options.- Specified by:
extract
in interfaceIExtractor
- Parameters:
sourceModel
- the IModel to extracttarget
- the target indication to extract the targetModel- Throws:
ATLCoreException
- See Also:
-
parse
Parses the given input stream.- Parameters:
in
- an input stream- Returns:
- the resulting EObject
- Throws:
ATLCoreException
-
parseWithProblems
Returns An array of EObject, the first one being an ATL!Unit and the following ones Problem!Problem.- Parameters:
in
- InputStream to parse ATL code from.- Returns:
- An array of EObject, the first one being an ATL!Unit and the following ones Problem!Problem.
- Throws:
ATLCoreException
-
parseToModel
Parses the given input stream.- Parameters:
in
- an input stream- Returns:
- the resulting IModel
- Throws:
ATLCoreException
-
parseToModelWithProblems
public IModel[] parseToModelWithProblems(InputStream in, boolean hideErrors) throws ATLCoreException Parses the given input stream.- Parameters:
in
- an input streamhideErrors
- disable standard output in order to hide errors- Returns:
- the parser resulting IModel[model,problemModel]
- Throws:
ATLCoreException
-
parseExpression
ATL injector launcher.- Parameters:
expression
- an ATL expressionexpressionType
- the ATL expression type the Syntax Element parsed- Returns:
- outputs models
-