Package de.swa.gc

Class GraphCodeIO

java.lang.Object
de.swa.gc.GraphCodeIO
All Implemented Interfaces:
Flattener

public class GraphCodeIO
extends java.lang.Object
implements Flattener
Utility Class for Graph Code Import and Export, implements the MMFG-Flattener-Interface
Author:
stefan_wagenpfeil
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphCodeIO()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String asJson​(GraphCode gc)
    returns a Graph Code as JSon
    java.lang.String endFile()
    for Graph Codes, no header is required
    java.lang.String flatten​(MMFG fv)
    exports a Graph Code based on a MMFG to Json
    java.lang.String getFileExtension()
    returns "json"
    static GraphCode read​(java.io.File f)
    reads a Graph Code from a Json-File
    java.lang.String startFile()
    for Graph Codes, no footer is required
    static void write​(GraphCode gc, java.io.File f)
    writes a Graph Code as Json into File f

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • flatten

      public java.lang.String flatten​(MMFG fv)
      exports a Graph Code based on a MMFG to Json
      Specified by:
      flatten in interface Flattener
    • getFileExtension

      public java.lang.String getFileExtension()
      returns "json"
      Specified by:
      getFileExtension in interface Flattener
    • read

      public static GraphCode read​(java.io.File f)
      reads a Graph Code from a Json-File
    • write

      public static void write​(GraphCode gc, java.io.File f)
      writes a Graph Code as Json into File f
    • asJson

      public static java.lang.String asJson​(GraphCode gc)
      returns a Graph Code as JSon
    • endFile

      public java.lang.String endFile()
      for Graph Codes, no header is required
      Specified by:
      endFile in interface Flattener
    • startFile

      public java.lang.String startFile()
      for Graph Codes, no footer is required
      Specified by:
      startFile in interface Flattener