Package edu.fiu.jtlex.algorithms
Class GraphReader
java.lang.Object
edu.fiu.jtlex.algorithms.GraphReader
A Reader Class for initializing Graphs.
Takes in either a TimeMLFile, String, or InputStream and creates a corresponding graph.
- Since:
- jTLEX 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ITimeMLGraph
Creates a new empty Graph.static ITimeMLGraph
createTimeMLGraph
(File timeMLFile) Creates a new Graph from a TimeML file.static ITimeMLGraph
createTimeMLGraph
(InputStream timeMLData) Creates a new Graph from an input stream.static ITimeMLGraph
createTimeMLGraph
(String timeMLString) Creates a new Graph from a String.static ITimeMLGraph
createTimeMLGraph
(Set<ITimeMLNode> nodes, Set<ITimeMLLink> links) Creates a new Graph based on nodes and links.
-
Constructor Details
-
GraphReader
public GraphReader()
-
-
Method Details
-
createTimeMLGraph
Creates a new empty Graph.- Returns:
- the created Graph
- Since:
- jTLEX 1.0
-
createTimeMLGraph
Creates a new Graph based on nodes and links.- Parameters:
nodes
- The set ofITimeMLNode
.links
- The set ofITimeMLLink
.- Returns:
- the created Graph
- Since:
- jTLEX 1.0
-
createTimeMLGraph
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
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
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
-