public class DotTopologySerializer extends Object implements TopologySerializer
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MARGIN |
static double |
DEFAULT_SCALE |
static String[] |
DOT_FILENAME_EXTENSIONS |
Constructor and Description |
---|
DotTopologySerializer() |
DotTopologySerializer(boolean reorganize) |
DotTopologySerializer(double scale,
int margin) |
DotTopologySerializer(double scale,
int margin,
boolean reorganize) |
Modifier and Type | Method and Description |
---|---|
String |
exportToString(Topology topology)
Returns a string representation of this topology.
|
void |
importFromString(Topology topology,
String data)
Imports nodes and wired links from the specified string representation of a
topology.
|
static void |
organize(Topology tp,
double scale,
int margin) |
public static final double DEFAULT_SCALE
public static final int DEFAULT_MARGIN
public static final String[] DOT_FILENAME_EXTENSIONS
public DotTopologySerializer()
public DotTopologySerializer(boolean reorganize)
public DotTopologySerializer(double scale, int margin, boolean reorganize)
public DotTopologySerializer(double scale, int margin)
public void importFromString(Topology topology, String data)
TopologySerializer
importFromString
in interface TopologySerializer
topology
- The Topology
object which must be populateddata
- The String
representation.public String exportToString(Topology topology)
TopologySerializer
TopologySerializer.importFromString(Topology, String)
method. Only the nodes and wired links are exported
here (not the topology's properties).exportToString
in interface TopologySerializer
topology
- The Topology
object which must be exportedString
representation of the Topology
public static void organize(Topology tp, double scale, int margin)