Question

Right now I have a GraphML file that was built by writing out a JUNG DelegateTree graph using JUNG's GraphMLWriter. I'm trying to now read that file back into a new DelegateTree. When using GraphMLReader, you cannot read into a tree type (you get "use addChild() to add vertices" exceptions). So, I read the file into a DirectedGraph.

Now how do I convert that DirectedGraph into my desired DelegateTree type. I need it in this type for various reasons, mainly for display purposes. Thanks.

Was it helpful?

Solution

DelegateTree has a constructor that allows you to specify the DirectedGraph to which it delegates: http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/graph/DelegateTree.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top