Trouble Creating Links

I am trying to use the Flower Example to create a custom XML format to and from a JGo Document. I noticed that there is an identifiable part interface that seemed to have everything I need ( nodes with unique ids ) so I decided to leverage that instead of the node manual ids assigned in the example. Much to my dismay however my nodes are displaying in the view, but links are not. I also noticed that I can not create a link to a node that is created from the xml document.

The code is very simple, I just iterate over the XML parsing the attributes I need and adding objects as I go:
ie for Nodes ..
parse the xml ... get the attributes set up the node ..
then doc.addObjectAtTail(node);
I do the same with the arcs except I first find the node by doing a fromNode = document.getPart(fromNodeId), toNode = document.getPart(toNodeId) ... and then create the node and add it to the document
I am setting the partId manually during this process based upon the attribute "ID" that I write out when I save it.
I have tried to add the link both by doing a doc.addObjectAtTail( link ) or a doc.getLinksLayer().addObjectAtTail( link ).
Is there a reason why the FlowerExample uses custom NodeIds vs the identifable parts interface? I suspect that by using the Identifiable part interface and setting the part ID manually that this is screwing something up.
Can any one verify that manually setting PartIds vs using a custom model is ok?
There isn't any JGoDocument.getPart method -- perhaps you mean JGoDocument.findPart?
Is that method actually finding the matching node, or any node at all?
JGoDocument.findPart doesn't work unless you call JGoDocument.setMaintainsPartID(true).
It's certainly expected that you can assign your own PartIDs, if you want. But you do need to be consistent about them -- no duplicates, for example. And you need to assign them before adding them to the document.
JGoDocument will automatically assign unique values when you add the JGoIdentifiablePart to the document, if its PartID() == -1 (i.e, if you haven't assigned the PartID value yourself).

Walter thanks for the answer.

Assuming its an identifiable part, and you assign some ID is it smart enough it assign unique IDs.
I also found the root of my problem. I was using a default constructor for a JGoBasicNode which does not call the init method which creates the port.
public JGoBasicNode()
public JGoBasicNode(String s)
Not sure why it does not call init(String s) from the default constructor.

Copying is done by calling the default constructor to create the new object. Then JGoArea.copyChildren copies all of the child objects and adds them to the copied area. If the default constructor created children, the copy would have duplicates – for example of the JGoBasicNode’s port.