nodes.add(superClassRoot);
nodes.add(subClassRoot);
nodes.add(relationsRoot);
nodes.add(instancesRoot);
nodes.add(instancesOfRoot);
edges.add(new LineEdge(conceptNode,superClassRoot));
edges.add(new LineEdge(conceptNode,subClassRoot));
edges.add(new LineEdge(conceptNode,instancesRoot));
edges.add(new LineEdge(conceptNode,relationsRoot));
edges.add(new LineEdge(conceptNode,instancesRoot));
edges.add(new LineEdge(conceptNode,instancesOfRoot));
Node relatedNode = null;
for (Relation r : concept.getRelations().getRelations()) {
//For each conceptDescription in relation
for (ConceptDescription conceptDescription : r.getConceptDescriptions()) {
final String objectConceptUri = conceptDescription.getUri();
if(objectConceptUri!=null ){
if (r.getOnproperty() != null) {
relatedNode = new RelationNode(conceptDescription.getName());
edges.add(new TextEdge(relationsRoot,relatedNode,formatRelation(r.getOnproperty())));
} else if (isSuperclassOfRelation(r)) {
relatedNode = new SuperClassNode(conceptDescription.getName());
edges.add(new LineEdge(superClassRoot, relatedNode));
} else {
// otherwise, the object _is superclass of_ this, so...
relatedNode = new SubClassNode(conceptDescription.getName());
edges.add(new LineEdge(subClassRoot, relatedNode));
}
nodes.add(relatedNode);
}
}//End for each concept description in relation