target = link.getTarget(); DefaultLink l = link.getCopy(link.getId()); if (useOriginalWeights) this.addLink(source, target, l, link.getWeight());
target = newNode; newId = LinkIdFactory.getLinkId(l.getUri(), source.getId(), target.getId()); DefaultLink copyLink = l.getCopy(newId); this.addLink(source, target, copyLink, l.getWeight()); if (!copyLinksToColumnNodes && target instanceof ColumnNode) continue; // skip links to column nodes newId = LinkIdFactory.getLinkId(l.getUri(), source.getId(), target.getId()); DefaultLink copyLink = l.getCopy(newId); this.addLink(source, target, copyLink, l.getWeight());