Module rgg
Package de.grogra.mtg

Class MTGTranslator

java.lang.Object
de.grogra.mtg.MTGTranslator

public class MTGTranslator extends Object
Main Class for parsing and translating the MTG file data into a graph
Since:
2011-11-18
Author:
Ong Yongzhi
  • Constructor Details

    • MTGTranslator

      public MTGTranslator(Reader reader, String sysId)
      MTGTranslator constructor.
      Parameters:
      reader - Reader instance from the MTGFilter. File resources are loaded into FilterSource objects in GroIMP. The MTGFilter is constructed with a member FilterSource variable.
  • Method Details

    • translateMTGFileHeader

      public int translateMTGFileHeader()
    • translateMTGFileBody

      public int translateMTGFileBody()
    • translateMTGFile

      public int translateMTGFile()
      Translates the MTG file into a graph.
      Returns:
      Code specifying success or error in translation
      Throws:
      MTGError.MTGPlantFrameException
    • getMTGRootNode

      public MTGNode getMTGRootNode()
      Allows other classes to obtain the root node of the graph generated from translating MTG data file.
      Returns:
      MTGNode The root node of the graph generated from MTG data file.
    • getFirstNode

      public MTGNode getFirstNode()
    • getRootNode

      public RGGRoot getRootNode()
    • getSphere

      public Sphere getSphere()
    • getLineCounter

      public int getLineCounter()
    • getErrorMessage

      public String getErrorMessage()