Class AtlParser
java.lang.Object
org.eclipse.m2m.atl.engine.parser.AtlParser
- All Implemented Interfaces:
IExtractor,IInjector
TCS utilities Wrapper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidextract(IModel sourceModel, OutputStream target, Map options) Extracts an IModel using the given options.voidExtracts an IModel using default options.voidExtracts an IModel using the given options.static AtlParserReturns 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.voidinject(IModel targetModel, InputStream source, Map options) Injects data into an IModel using the given options.voidInjects data into an IModel using the given options.voidInjects data into an IModel using default options.voidInjects data into an IModel using the given options.org.eclipse.emf.ecore.EObjectparse(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- theInputStreamcontaining 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- theReadercontaining the modeloptions- the injection parameters- Returns:
- the new ATL Model
- Throws:
ATLCoreException
-
inject
Injects data into an IModel using the given options.- Specified by:
injectin interfaceIInjector- Parameters:
targetModel- the IModel where to injectsource- theInputStreamcontaining the modeloptions- the injection parameters- Throws:
ATLCoreException- See Also:
-
inject
Injects data into an IModel using the given options.- Specified by:
injectin interfaceIInjector- Parameters:
targetModel- the IModel where to injectsource- theReadercontaining the modeloptions- the injection parameters- Throws:
ATLCoreException- See Also:
-
inject
Injects data into an IModel using the given options.- Specified by:
injectin 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:
injectin 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:
extractin interfaceIExtractor- Parameters:
sourceModel- the IModel to extracttarget- theOutputStreamwhere to extract the targetModeloptions- the extraction parameters- Throws:
ATLCoreException- See Also:
-
extract
Extracts an IModel using the given options.- Specified by:
extractin 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:
extractin 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
-