Class 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