}
Resource target = currentRelations.getProperty(KNOBOT.target)
.getResource();
Vertex targetVertex = (Vertex) vertexTopic.get(target);
if (targetVertex != null) {
DirectedEdge e = (DirectedEdge) g
.addEdge(new DirectedSparseEdge(
(Vertex) vertexTopic.get(currentSource),
targetVertex));
} else {
//is an item
Vertex vertex;
vertex = (Vertex) allTopicsAndItems.get(target);
if (vertex == null) {
vertex = (Vertex) g
.addVertex(new DirectedSparseVertex());
vertex.addUserDatum("label", target.getURI(),
UserData.SHARED);
allTopicsAndItems.put(target, vertex);
}
DirectedEdge e = (DirectedEdge) g
.addEdge(new DirectedSparseEdge(
(Vertex) vertexTopic.get(currentSource),
vertex));
}
}