Package moss
Class NEListReader
java.lang.Object
java.io.Reader
java.io.FilterReader
java.io.PushbackReader
moss.TableReader
moss.GraphReader
moss.NEListReader
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,Readable
Class for readers for a simple node/edge list format.
- Since:
- 2007.06.22
- See Also:
-
Field Summary
Fields inherited from class moss.GraphReader
cabs, crel, desc, DIRECTED, edges, FMTMASK, graph, GRAPHS, mode, name, nodes, ntn, sabs, srel, SUBS, value
Fields inherited from class moss.TableReader
BLANK, cflags, COMMENT, delim, field, FLDSEP, recno, RECSEP
Fields inherited from class java.io.FilterReader
in
-
Constructor Summary
ConstructorsConstructorDescriptionNEListReader
(Reader reader, int mode) Create a reader for a simple node/edge list format.NEListReader
(Reader reader, int mode, NEList ntn) Create a reader for a simple node/edge list format. -
Method Summary
Modifier and TypeMethodDescriptiongetDesc()
Get a (line) description of the current graph.static void
Main function for testing basic functionality.boolean
Read a graph.boolean
Read an (optional) header.Read a field.Methods inherited from class moss.GraphReader
createReader, createReader, getAbsCompl, getAbsSupp, getEdgeCount, getGraph, getMode, getName, getNodeCount, getNotation, getRelCompl, getRelSupp, getValue
Methods inherited from class moss.TableReader
eof, getTypes, isType, readField, rno, rno, setChars, setChars
Methods inherited from class java.io.PushbackReader
close, mark, markSupported, read, read, ready, reset, skip, unread, unread, unread
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
NEListReader
Create a reader for a simple node/edge list format.- Parameters:
reader
- the reader to read frommode
- the read modentn
- the notation to use- Since:
- 2021.10.17 (Christian Borgelt)
-
NEListReader
Create a reader for a simple node/edge list format.- Parameters:
reader
- the reader to read frommode
- the read mode- Since:
- 2007.06.22 (Christian Borgelt)
-
-
Method Details
-
readHeader
Read an (optional) header.- Specified by:
readHeader
in classGraphReader
- Returns:
false
, because headers are not supported- Throws:
IOException
- if an i/o error occurs- Since:
- 2007.06.22 (Christian Borgelt)
-
readNextField
Read a field.- Returns:
- the field read
- Throws:
IOException
- if no field could be read- Since:
- 2007.06.29 (Christian Borgelt)
-
readGraph
Read a graph.The next graph description is read and split into the graph name, the associated value, the actual graph description, and (only in mode
These properties may then be retrieved with the functionsSUBS
) the support information.getName()
,getValue()
,getGraph()
etc.- Specified by:
readGraph
in classGraphReader
- Returns:
- whether a graph description could be read (otherwise the end of the input has been reached)
- Throws:
IOException
- if an i/o error or a parse error occurs- Since:
- 2007.02.24 (Christian Borgelt)
-
getDesc
Get a (line) description of the current graph.Since a connection table is not a line description, it is reformatted into the LiNoG format.
- Overrides:
getDesc
in classGraphReader
- Returns:
- a line description (LiNoG) of the current graph
- Since:
- 2007.07.06 (Christian Borgelt)
-
main
Main function for testing basic functionality.- Parameters:
args
- the command line arguments- Since:
- 2007.06.29 (Christian Borgelt)
-