I have been reading quite a bit graph data structures lately, as I have intentions of writing my own UML tool. As far as I can see, what I want can be modeled as a simple graph
Check out this powerpoint presentation, especially the last slide: http://digital.cs.usu.edu/~cyan/CS5050/Graph.ppt