Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.mtg
Class MTGTranslator

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

    public class MTGTranslator

extends java.lang.Object

Main Class for parsing and translating the MTG file data into a graph

Since:
  2011-11-18
Author:
  Ong Yongzhi

Constructor Summary
`MTGTranslator(java.io.Reader reader, java.lang.String sysId)` MTGTranslator constructor.

Method Summary
`java.lang.String` | `getErrorMessage()`
`MTGNode` | `getFirstNode()`
`int` | `getLineCounter()`
`MTGNode` | `getMTGRootNode()` Allows other classes to obtain the root node of the graph generated from translating MTG data file.
`RGGRoot` | `getRootNode()`
`Sphere` | `getSphere()`
`int` | `translateMTGFile()` Translates the MTG file into a graph.
`int` | `translateMTGFileBody()`
`int` | `translateMTGFileHeader()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MTGTranslator

    public MTGTranslator(java.io.Reader reader,
                         java.lang.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 Detail

### getErrorMessage

    public java.lang.String getErrorMessage()

### getFirstNode

    public MTGNode getFirstNode()

### getLineCounter

    public int getLineCounter()

### 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.

### getRootNode

    public RGGRoot getRootNode()

### getSphere

    public Sphere getSphere()

### translateMTGFile

    public int translateMTGFile()

  Translates the MTG file into a graph.

  Returns:
    Code specifying success or error in translation
  Throws:
    `MTGError.MTGPlantFrameException`

### translateMTGFileBody

    public int translateMTGFileBody()

### translateMTGFileHeader

    public int translateMTGFileHeader()

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD