Class GraphReader

java.lang.Object
edu.fiu.jtlex.algorithms.GraphReader

public class GraphReader extends Object
A Reader Class for initializing Graphs. Takes in either a TimeMLFile, String, or InputStream and creates a corresponding graph.
Since:
jTLEX 1.0
  • Constructor Details

    • GraphReader

      public GraphReader()
  • Method Details

    • createTimeMLGraph

      public static ITimeMLGraph createTimeMLGraph()
      Creates a new empty Graph.
      Returns:
      the created Graph
      Since:
      jTLEX 1.0
    • createTimeMLGraph

      public static ITimeMLGraph createTimeMLGraph(Set<ITimeMLNode> nodes, Set<ITimeMLLink> links)
      Creates a new Graph based on nodes and links.
      Parameters:
      nodes - The set of ITimeMLNode.
      links - The set of ITimeMLLink.
      Returns:
      the created Graph
      Since:
      jTLEX 1.0
    • createTimeMLGraph

      public static ITimeMLGraph createTimeMLGraph(File timeMLFile) throws FileNotFoundException
      Creates a new Graph from a TimeML file.
      Parameters:
      timeMLFile - The TimeML file
      Returns:
      the created Graph
      Throws:
      FileNotFoundException - If the file does not exist.
      NullPointerException - If the file is null.
      Since:
      jTLEX 1.0
    • createTimeMLGraph

      public static ITimeMLGraph createTimeMLGraph(String timeMLString)
      Creates a new Graph from a String. Cannot be empty or whitespace.
      Parameters:
      timeMLString - The string of TimeML data.
      Returns:
      the created Graph
      Throws:
      NullPointerException - If the string is null
      Since:
      jTLEX 1.0
    • createTimeMLGraph

      public static ITimeMLGraph createTimeMLGraph(InputStream timeMLData)
      Creates a new Graph from an input stream. The input stream must be closed by the caller.
      Parameters:
      timeMLData - The InputStream of TimeML data
      Returns:
      the created Graph
      Throws:
      NullPointerException - If the Stream is null
      Since:
      jTLEX 1.0