Class AtlSourceManager
java.lang.Object
org.eclipse.m2m.atl.engine.parser.AtlSourceManager
ATL source inspector, used to catch main file informations. Also allows to update them.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Library.static final int
Module.static final int
Query.static final int
Undefined.static final String
ATL compiler tag.static final int
0 : input + output metamodels.static final int
1 : input metamodels.static final int
2 : OUTPUT metamodels.static final String
LIB tag value.static final String
PATH tag value.static final String
URI tag value. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the ATL file type.static String
getCompilerName
(List compilers) Returns the compiler name, or the default name if null.getMetamodelPackages
(int filter) Metamodels access method.getMetamodelPackages
(String metamodelId) Access on a specific metamodel.org.eclipse.emf.ecore.EObject
getModel()
static List
getTaggedInformations
(byte[] buffer, String tag) Returns the list of tagged informations (header).static List
getTaggedInformations
(BufferedReader reader, String tag) Returns the list of tagged informations (header).boolean
Status method.boolean
void
updateDataSource
(InputStream inputStream) Update method : parsing and metamodel detection.void
updateDataSource
(String content) Update method : parsing and metamodel detection.
-
Field Details
-
COMPILER_TAG
ATL compiler tag.- See Also:
-
URI_TAG
URI tag value.- See Also:
-
PATH_TAG
PATH tag value.- See Also:
-
LIB_TAG
LIB tag value.- See Also:
-
ATL_FILE_TYPE_UNDEFINED
public static final int ATL_FILE_TYPE_UNDEFINEDUndefined.- See Also:
-
ATL_FILE_TYPE_MODULE
public static final int ATL_FILE_TYPE_MODULEModule.- See Also:
-
ATL_FILE_TYPE_QUERY
public static final int ATL_FILE_TYPE_QUERYQuery.- See Also:
-
ATL_FILE_TYPE_LIBRARY
public static final int ATL_FILE_TYPE_LIBRARYLibrary.- See Also:
-
FILTER_ALL_METAMODELS
public static final int FILTER_ALL_METAMODELS0 : input + output metamodels.- See Also:
-
FILTER_INPUT_METAMODELS
public static final int FILTER_INPUT_METAMODELS1 : input metamodels.- See Also:
-
FILTER_OUTPUT_METAMODELS
public static final int FILTER_OUTPUT_METAMODELS2 : OUTPUT metamodels.- See Also:
-
-
Constructor Details
-
AtlSourceManager
public AtlSourceManager()Creates an atl source manager.
-
-
Method Details
-
getATLFileType
public int getATLFileType()Returns the ATL file type.- Returns:
- the ATL file type
-
getInputModels
-
getOutputModels
-
getLibrariesImports
-
updateDataSource
Update method : parsing and metamodel detection.- Parameters:
content
- the content of the atl file
-
updateDataSource
Update method : parsing and metamodel detection.- Parameters:
inputStream
- the atl file input stream- Throws:
IOException
-
isRefining
public boolean isRefining() -
getModel
public org.eclipse.emf.ecore.EObject getModel() -
getMetamodelPackages
Metamodels access method.- Parameters:
filter
- the metamodel filter- Returns:
- the map of searched metamodels
-
getMetamodelPackages
Access on a specific metamodel.- Parameters:
metamodelId
- the metamodel id- Returns:
- the metamodels list
-
getAtlCompiler
-
getMetamodelLocations
-
getLibraryLocations
-
initialized
public boolean initialized()Status method.- Returns:
True
if the some metamodels have ever been detected ,False
if not.
-
getTaggedInformations
Returns the list of tagged informations (header).- Parameters:
buffer
- the inputtag
- the tag to search- Returns:
- the tagged information
-
getTaggedInformations
Returns the list of tagged informations (header).- Parameters:
reader
- the inputtag
- the tag to search- Returns:
- the tagged information
- Throws:
IOException
-
getCompilerName
Returns the compiler name, or the default name if null.- Parameters:
compilers
- the list of compilers- Returns:
- the compiler name, or the default name if null
-