Rocs currently supports import and export of the following file formats:
DOT files, also known as Graphviz files
Trivial Graph Format files
The Trivial Graph Format (TGF) is a simple text-based file format for describing graphs. A TGF file consists of a list of node definitions, that map the node IDs to labels, followed by a list of the edges. In this format it is only possible to have one label per node and one value per edge. Rocs interprets imported graphs as undirected graphs. Exported graphs will contain two edges per connection if connections are bidirectional.
The file starts with a list of nodes (one node per line), followed by a line with the only character "#", followed by a list of edges (one edge per line).
A node consists of an integer (identifier), followed by a space, followed by an arbitrary string.
An edge consists of two integers (identifiers) separated by a space, followed by a space, followed by an arbitrary string. It is assumed that the directed edge points from the first identifier to the second identifier.
The DOT language is a plain text graph description language that allows both,a good human readable representation of graphs as well as an efficient processing by graph layout programs. DOT is the default file format for the Graphviz graph visualization suite, but is also widely used by other graph tools. The usual file endings for DOT are .gv and .dot.
Rocs can parse every graph file that contains a graph specified according to the DOT language specification. The support of language features is complete, despite of the following exceptions:
subgraph: Due to the lack of a subgraph concept in Rocs, subgraphs are only imported as a set of date elements and connections. Especially, connections to or from subgraphs are not imported.
HTML and XML attributes: Attributes (like labels) that contain HTML or XML syntax are read unchanged. Especially, not adjustment of fonts and styles are read from those attributes.