Module rgg
Package de.grogra.mtg

Class MTGGraphBuilder

java.lang.Object
de.grogra.mtg.MTGGraphBuilder

public class MTGGraphBuilder extends Object
Maintains state of the MTG data loading. Also maintains the generated graph structure.
Since:
2011-11-24
Author:
Ong Yongzhi
  • Field Details

  • Constructor Details

    • MTGGraphBuilder

      public MTGGraphBuilder(String sysId)
  • Method Details

    • getMTGRootNode

      protected MTGNode getMTGRootNode()
      Allows MTGTranslator 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. Null if no graph generated.
    • getFirstNode

      public MTGNode getFirstNode()
    • getMTGNodeCount

      public long getMTGNodeCount()
      Number of nodes generated.
      Returns:
      long Number of nodes generated.
    • getStage

      public long getStage()
      Current stage being processed by the graph builder.
      Returns:
      int Current stage being processed by the graph builder.
    • storeNodeListInRoot

      public void storeNodeListInRoot()
      Put node list into root node after building graph.
    • removeInterScaleTopoRelations

      public void removeInterScaleTopoRelations() throws MTGError.MTGPlantFrameException
      Removes inter-scale topological relations (i.e. successor and branching edges).
      Throws:
      MTGError.MTGPlantFrameException
    • processTokens

      public boolean processTokens(String[] tokens) throws MTGError.MTGGraphBuildException
      Processes tokens and generates nodes and edges as necessary to the current graph.
      Parameters:
      tokens - Array of strings representing tokens.
      Throws:
      MTGError.MTGGraphBuildException
    • removeTypes

      public void removeTypes()
      Creates Node classes or Modules Types and stores them in the root node.