Class AtlSourceManager

java.lang.Object
org.eclipse.m2m.atl.engine.parser.AtlSourceManager

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

  • 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

      public Map getInputModels()
    • getOutputModels

      public Map getOutputModels()
    • getLibrariesImports

      public List getLibrariesImports()
    • updateDataSource

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

      public void updateDataSource(InputStream inputStream) throws IOException
      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

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

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

      public String getAtlCompiler()
    • getMetamodelLocations

      public Map getMetamodelLocations()
    • getLibraryLocations

      public Map getLibraryLocations()
    • initialized

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

      public static List getTaggedInformations(byte[] buffer, 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 List getTaggedInformations(BufferedReader reader, String tag) throws IOException
      Returns the list of tagged informations (header).
      Parameters:
      reader - the input
      tag - the tag to search
      Returns:
      the tagged information
      Throws:
      IOException
    • getCompilerName

      public static String getCompilerName(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