java.lang.Object
de.grogra.mtg.MTGTranslator
Main Class for parsing and translating the MTG file data into a graph
- Since:
- 2011-11-18
- Author:
- Ong Yongzhi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Allows other classes to obtain the root node of the graph generated from translating MTG data file.int
Translates the MTG file into a graph.int
int
-
Constructor Details
-
MTGTranslator
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
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
-
getRootNode
-
getSphere
-
getLineCounter
public int getLineCounter() -
getErrorMessage
-