Package moss
Class NEList
java.lang.Object
moss.Notation
moss.FreeNtn
moss.NEList
- All Implemented Interfaces:
Serializable
Class for a simple node/edge list notation.
- Since:
- 2006.08.12
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a string description of a graph.boolean
isLine()
Whether this is a line notation (single line description).static void
Main function for testing basic functionality.Parse a description of an attributed graph.void
Write a description of an attributed graph.Methods inherited from class moss.FreeNtn
getEdgeMgr, getNodeMgr, hasFixedTypes, setEdgeMgr, setNodeMgr
Methods inherited from class moss.Notation
createNotation, getDelim, mark, read, setReader, setTypeMgrs, unmark, unread
-
Constructor Details
-
NEList
public NEList()Create a list notation with empty type managers.By default this notation uses
FreeTypeMgr
objects for the type managers, which can be extended dynamically.- Since:
- 2007.06.22 (Christian Borgelt)
-
NEList
Create a list notation with given type managers.- Parameters:
nodemgr
- the manager for the node typesedgemgr
- the manager for the edge types- Since:
- 2007.06.22 (Christian Borgelt)
-
-
Method Details
-
isLine
public boolean isLine()Whether this is a line notation (single line description). -
parse
Parse a description of an attributed graph.- Specified by:
parse
in classNotation
- Parameters:
reader
- the reader from which to read the description- Returns:
- the parsed graph
- Throws:
IOException
- if a parse error or an i/o error occurs- Since:
- 2007.06.22 (Christian Borgelt)
-
describe
Create a string description of a graph. -
write
Write a description of an attributed graph.- Specified by:
write
in classNotation
- Parameters:
graph
- the graph to writewriter
- the writer to write to- Throws:
IOException
- if a read error occurred- Since:
- 2007.06.22 (Christian Borgelt)
-
main
Main function for testing basic functionality.It is tried to parse the first argument as a list description of a graph. If this is successful, the parsed graph is printed using the function
write()
.- Parameters:
args
- the command line arguments- Since:
- 2007.06.22 (Christian Borgelt)
-