public class GraphmlHelper extends Object
| Constructor and Description |
|---|
GraphmlHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
findNodeIds(org.graphdrawing.graphml.xmlns.NodeType node,
HashMap<String,String> translationTable,
int nextGraphIndex)
Insert nodeId and associated attributes into the translationTable.
|
static org.graphdrawing.graphml.xmlns.GraphType |
getToplevelGraph(org.graphdrawing.graphml.xmlns.GraphmlType graphml)
Return the first element of type Graph found at the top level of the
graphml object
|
static void |
printEdge(org.graphdrawing.graphml.xmlns.EdgeType edge,
String indent)
Print an
Edge to standard out using an indentation string |
static void |
printGraph(org.graphdrawing.graphml.xmlns.GraphType graph,
String indent)
Print a
graph to standard out using an indentation string |
static void |
printGraphml(org.graphdrawing.graphml.xmlns.GraphmlType graphml)
Print a
graphml element to standard out |
static void |
printNode(org.graphdrawing.graphml.xmlns.NodeType node,
String indent)
Print a
Node to standard out using an indentation string |
static int |
renameGraphIds(org.graphdrawing.graphml.xmlns.GraphType graph,
int nextGraphIndex)
Rename all GraphIds of nodes, edges, data, etc with a new graphID.
|
static void |
renameNodeIds(org.graphdrawing.graphml.xmlns.NodeType node,
HashMap<String,String> translationTable)
Traverse the graph, find all graphIDs and actually rename.
|
public static void printGraphml(org.graphdrawing.graphml.xmlns.GraphmlType graphml)
graphml element to standard outgraphml - graphml object to be printpublic static void printGraph(org.graphdrawing.graphml.xmlns.GraphType graph,
String indent)
graph to standard out using an indentation stringgraph - graph to be printindent - indentation stringpublic static void printNode(org.graphdrawing.graphml.xmlns.NodeType node,
String indent)
Node to standard out using an indentation stringnode - node to be printindent - indentation stringpublic static void printEdge(org.graphdrawing.graphml.xmlns.EdgeType edge,
String indent)
Edge to standard out using an indentation stringedge - edge to be printindent - indentation stringpublic static int renameGraphIds(org.graphdrawing.graphml.xmlns.GraphType graph,
int nextGraphIndex)
graph - graph to renamenextGraphIndex - index to usepublic static void findNodeIds(org.graphdrawing.graphml.xmlns.NodeType node,
HashMap<String,String> translationTable,
int nextGraphIndex)
public static void renameNodeIds(org.graphdrawing.graphml.xmlns.NodeType node,
HashMap<String,String> translationTable)
public static org.graphdrawing.graphml.xmlns.GraphType getToplevelGraph(org.graphdrawing.graphml.xmlns.GraphmlType graphml)
graphml - complete graphml objectCopyright © 2010–2015 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.