linkFrequency = t.getLinkFrequency();
nodes = this.graphBuilder.getUriToNodesMap().get(subjectUri);
if (nodes == null || nodes.isEmpty()) {
id = this.nodeIdFactory.getNodeId(subjectUri);
node = new InternalNode(id, new Label(subjectUri));
if (this.graphBuilder.addNode(node)) {
addedNodes.add((InternalNode)node);
n1 = node;
} else {
continue;
}
} else {
n1 = nodes.iterator().next();
}
nodes = this.graphBuilder.getUriToNodesMap().get(objectUri);
if (nodes == null || nodes.isEmpty()) {
id = this.nodeIdFactory.getNodeId(objectUri);
node = new InternalNode(id, new Label(objectUri));
if (this.graphBuilder.addNode(node)) {
addedNodes.add((InternalNode)node);
n2 = node;
} else {
continue;
}
} else {
n2 = nodes.iterator().next();
}
id = LinkIdFactory.getLinkId(predicateUri, n1.getId(), n2.getId());
link = new ObjectPropertyLink(id, new Label(predicateUri), ObjectPropertyType.None);
if (this.graphBuilder.addLink(n1, n2, link)) {
this.graphBuilder.changeLinkWeight(link, 1 - ((double)linkFrequency / (double)countOfObjectProperties));
// this.graphBuilder.changeLinkWeight(link, countOfObjectProperties - linkFrequency);
// this.graphBuilder.changeLinkWeight(link, linkFrequency);
}