de.agentlab.ds.graph.GraphmlUtils Maven / Gradle / Ivy
package de.agentlab.ds.graph;
public class GraphmlUtils {
public static String createNode(String name, String nodeStyle, String color, Shape shape,
Geometry geometry, String[] labelAttributes) {
String result = "";
result += "\n";
result += "\n";
if (color != null) {
result += "\n";
}
result += "";
result += name;
result += " \n";
if (shape != null) {
result += shape.toGraphML();
}
if (geometry != null) {
result += geometry.toGraphML();
}
result += " \n";
result += "\n";
return result;
}
public static String createNode(String label, String type, String color, Shape shape, Geometry geometry) {
return createNode(label, type, color, shape, geometry, null);
}
public static String createArrowStyle(String color, boolean directed) {
String result = "";
result += "\n";
result += "\n";
result += "";
if (directed) {
result += "";
} else {
result += "";
}
result += " \n";
result += "\n";
return result;
}
}