Map<String, Map<String, Object>> idMap = mec.getIdMap();
Map<String, ArcModel> arcMap = mec.getArcMap();
Map<String, Vertex> idToVertex = new HashMap<String, Vertex>();
DirectedGraph g = new DirectedGraph();
for(String key:idMap.keySet()){
Vertex s = new Vertex(key);
g.addVertex(s);
idToVertex.put(key, s);
}
for(String key:idMap.keySet()){
for(String subkey:idMap.get(key).keySet()){
ArcModel arc = arcMap.get(subkey);
if(arc == null) continue;
g.addEdge(idToVertex.get(arc.getSourceId()), idToVertex.get(arc.getTargetId()));
}
}
rpst = new RPST<DirectedEdge,Vertex>(g);