Class AtlSourceManager


  • public final class AtlSourceManager
    extends java.lang.Object
    ATL source inspector, used to catch main file informations. Also allows to update them.
    • Field Detail

      • COMPILER_TAG

        public static final java.lang.String COMPILER_TAG
        ATL compiler tag.
        See Also:
        Constant Field Values
      • PATH_TAG

        public static final java.lang.String PATH_TAG
        PATH tag value.
        See Also:
        Constant Field Values
      • ATL_FILE_TYPE_UNDEFINED

        public static final int ATL_FILE_TYPE_UNDEFINED
        Undefined.
        See Also:
        Constant Field Values
      • ATL_FILE_TYPE_MODULE

        public static final int ATL_FILE_TYPE_MODULE
        Module.
        See Also:
        Constant Field Values
      • ATL_FILE_TYPE_QUERY

        public static final int ATL_FILE_TYPE_QUERY
        Query.
        See Also:
        Constant Field Values
      • ATL_FILE_TYPE_LIBRARY

        public static final int ATL_FILE_TYPE_LIBRARY
        Library.
        See Also:
        Constant Field Values
      • FILTER_ALL_METAMODELS

        public static final int FILTER_ALL_METAMODELS
        0 : input + output metamodels.
        See Also:
        Constant Field Values
      • FILTER_INPUT_METAMODELS

        public static final int FILTER_INPUT_METAMODELS
        1 : input metamodels.
        See Also:
        Constant Field Values
      • FILTER_OUTPUT_METAMODELS

        public static final int FILTER_OUTPUT_METAMODELS
        2 : OUTPUT metamodels.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AtlSourceManager

        public AtlSourceManager()
        Creates an atl source manager.
    • Method Detail

      • getATLFileType

        public int getATLFileType()
        Returns the ATL file type.
        Returns:
        the ATL file type
      • getInputModels

        public java.util.Map getInputModels()
      • getOutputModels

        public java.util.Map getOutputModels()
      • getLibrariesImports

        public java.util.List getLibrariesImports()
      • updateDataSource

        public void updateDataSource​(java.lang.String content)
        Update method : parsing and metamodel detection.
        Parameters:
        content - the content of the atl file
      • updateDataSource

        public void updateDataSource​(java.io.InputStream inputStream)
                              throws java.io.IOException
        Update method : parsing and metamodel detection.
        Parameters:
        inputStream - the atl file input stream
        Throws:
        java.io.IOException
      • isRefining

        public boolean isRefining()
      • getModel

        public org.eclipse.emf.ecore.EObject getModel()
      • getMetamodelPackages

        public java.util.Map getMetamodelPackages​(int filter)
        Metamodels access method.
        Parameters:
        filter - the metamodel filter
        Returns:
        the map of searched metamodels
      • getMetamodelPackages

        public java.util.List getMetamodelPackages​(java.lang.String metamodelId)
        Access on a specific metamodel.
        Parameters:
        metamodelId - the metamodel id
        Returns:
        the metamodels list
      • getAtlCompiler

        public java.lang.String getAtlCompiler()
      • getMetamodelLocations

        public java.util.Map getMetamodelLocations()
      • getLibraryLocations

        public java.util.Map getLibraryLocations()
      • initialized

        public boolean initialized()
        Status method.
        Returns:
        True if the some metamodels have ever been detected , False if not.
      • getTaggedInformations

        public static java.util.List getTaggedInformations​(byte[] buffer,
                                                           java.lang.String tag)
        Returns the list of tagged informations (header).
        Parameters:
        buffer - the input
        tag - the tag to search
        Returns:
        the tagged information
      • getTaggedInformations

        public static java.util.List getTaggedInformations​(java.io.BufferedReader reader,
                                                           java.lang.String tag)
                                                    throws java.io.IOException
        Returns the list of tagged informations (header).
        Parameters:
        reader - the input
        tag - the tag to search
        Returns:
        the tagged information
        Throws:
        java.io.IOException
      • getCompilerName

        public static java.lang.String getCompilerName​(java.util.List compilers)
        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