1. Changed the order of nodes & edges.
2. Checked for exisitng of nodes/edges & also size before getting any relevant further properties..
This commit is contained in:
parent
25352b8a41
commit
233f101685
3 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ public class EdgeComparator implements Comparator<Edge> {
|
|||
|
||||
@Override
|
||||
public int compare(Edge arg0, Edge arg1) {
|
||||
return arg1.getEdgeID() - arg0.getEdgeID();
|
||||
return arg0.getEdgeID() - arg1.getEdgeID();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public class NodeComparator implements Comparator<Node> {
|
|||
|
||||
@Override
|
||||
public int compare(Node arg0, Node arg1) {
|
||||
return arg1.getNodeID() - arg0.getNodeID();
|
||||
return arg0.getNodeID() - arg1.getNodeID();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -381,12 +381,12 @@ public class VisualizationRequestHandler {
|
|||
request.setAttribute("egoURIParam", egoURIParam);
|
||||
|
||||
String title = "";
|
||||
if (coAuthorshipVO.getNodes() != null) {
|
||||
if (coAuthorshipVO.getNodes() != null && coAuthorshipVO.getNodes().size() > 0) {
|
||||
request.setAttribute("numOfAuthors", coAuthorshipVO.getNodes().size());
|
||||
title = "for " + coAuthorshipVO.getEgoNode().getNodeName();
|
||||
}
|
||||
|
||||
if (coAuthorshipVO.getEdges() != null) {
|
||||
if (coAuthorshipVO.getEdges() != null && coAuthorshipVO.getEdges().size() > 0) {
|
||||
request.setAttribute("numOfCoAuthorShips", coAuthorshipVO.getEdges().size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue