Package moss
Class LiNoG
java.lang.Object
moss.Notation
moss.FreeNtn
moss.LiNoG
- All Implemented Interfaces:
Serializable
Class for a simple line notation for (attributed) graphs
- Since:
- 2007.07.02
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a description of a given attributed 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 a 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
-
LiNoG
public LiNoG()Create an attributed graph line notation object.By default this notation uses
FreeTypeMgr
objects for the type managers, which can be extended dynamically.- Since:
- 2007.07.02 (Christian Borgelt)
-
LiNoG
Create an attributed graph line notation object.- Parameters:
nodemgr
- the manager for the node typesedgemgr
- the manager for the edge types- Since:
- 2007.07.02 (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 to read from- Returns:
- the parsed attributed graph
- Throws:
IOException
- if a parse error or an i/o error occurs- Since:
- 2007.07.02 (Christian Borgelt)
-
describe
Create a description of a given attributed graph. -
write
Write a description of a 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.07.05 (Christian Borgelt)
-
main
Main function for testing basic functionality.It is tried to parse the first argument as an LiNoG description of a graph. If this is successful, the parsed graph is printed using the function
describe()
.- Parameters:
args
- the command line arguments- Since:
- 2007.07.02 (Christian Borgelt)
-