Module rgg
Package de.grogra.mtg

Class MTGTokenizer

java.lang.Object
de.grogra.mtg.MTGTokenizer

public class MTGTokenizer extends Object
Tokenizer for lines read from MTG file.
Since:
2011-11-24
Author:
Ong Yongzhi
  • Constructor Details

    • MTGTokenizer

      public MTGTokenizer(String lineString)
  • Method Details

    • setLineString

      public void setLineString(String lineString)
    • setCommentCharFound

      public void setCommentCharFound(boolean comment)
    • tokenizeLineString

      public String[] tokenizeLineString()
      Tokenizes member variable lineString. Tab characters are returned individually as tokens. Commented tokens (from a '#' character/token to up to a '\t' (tab) character/token are not returned.
      Returns:
      String[] array of Strings representing tokens.
    • tokenizeTopoRightClasses

      public static String[] tokenizeTopoRightClasses(String rightClasses)
      Tokenizes 'Right' column strings in MTG file header-Description section
      Returns:
      String[] array of Strings representing class symbols. Null if no tokens.
    • tokenizeEntityNames

      public static String[] tokenizeEntityNames(String entityNameString)
      Tokenizes Entity-Name strings in MTG file body
      Returns:
      String[] array of Strings representing nodes,edges,MTG notations. Null if no tokens.