public DirectedWeightedMultigraph<Node, LabeledLink> getLabeledSteinerTree(ResultGraph initialTree) {
WeightedMultigraph<Node, DefaultLink> tree =
new WeightedMultigraph<Node, DefaultLink>(DefaultLink.class);
HashSet<Node> visitedNodes = new HashSet<Node>();
Node source, target;
DefaultLink l;
double weight;
for (Fact f : initialTree.getFacts()) {
source = this.getIdToNodeMap().get(f.source().name());
target = this.getIdToNodeMap().get(f.destination().name());
if (LinkIdFactory.getLinkUri(f.label().name).equals(Uris.DEFAULT_LINK_URI)) {
String id = LinkIdFactory.getLinkId(Uris.DEFAULT_LINK_URI, source.getId(), target.getId());
l = new CompactObjectPropertyLink(id, ObjectPropertyType.None);
}
else l = this.getIdToLinkMap().get(f.label().name);
weight = f.weight();
if (!visitedNodes.contains(source)) {