Class TextListReader
java.lang.Object
org.graffiti.plugin.io.AbstractInputSerializer
de.ipk_gatersleben.ag_nw.graffiti.plugins.ios.importers.text_list.TextListReader
- All Implemented Interfaces:
InputSerializer
,Serializer
public class TextListReader extends AbstractInputSerializer
edges in list form S T W (header) a b 0.3 c b 0.7 % comment a c 1.0 or simple
text format (see
http://www.graphdrawing.de/contest2009/gdcategories2009.html): # Nodes
Id1,40,40,20,20 Id2,40,40,100,100 Id3,40,40 # Edges
Id1,Id2,40,20,100,20,100,80 Id3,Id2
- Author:
- Christian Klukas
-
Constructor Summary
Constructors Constructor Description TextListReader()
-
Method Summary
Modifier and Type Method Description String[]
getExtensions()
The file extensions the serializer can read or write.String[]
getFileTypeDescriptions()
The file type descriptions of the files the serializer can read or write.void
read(InputStream in, Graph g)
Reads in a graph from the given input stream.void
read(Reader reader, Graph g)
void
read(String filename, Graph g)
Reads in a graph from the given filename.Methods inherited from class org.graffiti.plugin.io.AbstractInputSerializer
read, read, validFor
-
Constructor Details
-
TextListReader
public TextListReader()
-
-
Method Details
-
read
Description copied from class:AbstractInputSerializer
Reads in a graph from the given filename.- Specified by:
read
in interfaceInputSerializer
- Overrides:
read
in classAbstractInputSerializer
- Parameters:
filename
- The name of the file to read the graph from.g
- The graph to add the newly read graph to.- Throws:
IOException
- If an IO error occurs.
-
read
Description copied from class:AbstractInputSerializer
Reads in a graph from the given input stream.- Specified by:
read
in interfaceInputSerializer
- Specified by:
read
in classAbstractInputSerializer
- Parameters:
in
- The input stream to read the graph from.g
- The graph to add the newly read graph to.- Throws:
IOException
- If an IO error occurs.
-
getExtensions
Description copied from interface:Serializer
The file extensions the serializer can read or write.- Returns:
- DOCUMENT ME!
-
getFileTypeDescriptions
Description copied from interface:Serializer
The file type descriptions of the files the serializer can read or write.- Returns:
- DOCUMENT ME!
-
read
- Throws:
Exception
-