Package org.graphstream.stream.file
Class FileSourceTLP
java.lang.Object
org.graphstream.stream.SourceBase
org.graphstream.stream.file.FileSourceParser
org.graphstream.stream.file.FileSourceTLP
- All Implemented Interfaces:
FileSource
,Source
public class FileSourceTLP extends FileSourceParser
Source for the Tulip file format (TLP).
TLP files begins with :
(tlp "2.0" ; file content )Some meta informations can be done :
(tlp "2.0" (author "author name") (date "...") (comments "...") ... )Node indexes are integer. They can be declared in a "nodes" tag :
(tlp "2.0" (nodes 1 2 3) (edge 1 1 2) (edge 2 1 3) (edge 3 2 3) )Then edge can be defined with an int index followed by the index of the source node and the target nodes. Clusters can be created with an index and a name:
(tlp "2.0" (nodes 1 2 3) (edge 1 1 2) (edge 2 1 3) (edge 3 2 3) (cluster 1 "cluster name" (nodes 1 3) (edges 2) ) )Cluster 0 is the root graph. Properties can be applied to cluster:
(tlp "2.0" (nodes 1 2 3) (edge 1 1 2) (edge 2 1 3) (edge 3 2 3) (property cluster_id type "name" (default "node_default" "edge_default") (node node_id "value") (edge edge_id "value") ) )Type of properties can be one of :
- bool
- double
- int
- string
- color
- layout
- size
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
SourceBase.ElementType
-
Constructor Summary
Constructors Constructor Description FileSourceTLP()
-
Method Summary
Modifier and Type Method Description ParserFactory
getNewParserFactory()
Get a new parser factory.Methods inherited from class org.graphstream.stream.file.FileSourceParser
begin, begin, begin, begin, end, nextEvents, nextStep, readAll, readAll, readAll, readAll
Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
-
Constructor Details
-
FileSourceTLP
public FileSourceTLP()
-
-
Method Details
-
getNewParserFactory
Description copied from class:FileSourceParser
Get a new parser factory.- Specified by:
getNewParserFactory
in classFileSourceParser
- Returns:
- a parser factory
-