1. Fixed a bug for an edge case in coauthorsip vis
This commit is contained in:
parent
d3af6d949e
commit
ddae9bb311
1 changed files with 9 additions and 8 deletions
|
@ -193,12 +193,15 @@ public class VisualizationCodeGenerator {
|
||||||
for (int publicationYear = minPubYearConsidered; publicationYear <= currentYear; publicationYear++) {
|
for (int publicationYear = minPubYearConsidered; publicationYear <= currentYear; publicationYear++) {
|
||||||
|
|
||||||
String stringPublishedYear = String.valueOf(publicationYear);
|
String stringPublishedYear = String.valueOf(publicationYear);
|
||||||
Integer currentUniqueCoAuthors = yearToUniqueCoauthors.get(stringPublishedYear).size();
|
Set<Node> currentCoAuthors = yearToUniqueCoauthors.get(stringPublishedYear);
|
||||||
|
|
||||||
if (currentUniqueCoAuthors == null) {
|
Integer currentUniqueCoAuthors = null;
|
||||||
currentUniqueCoAuthors = 0;
|
|
||||||
|
if (currentCoAuthors != null) {
|
||||||
|
currentUniqueCoAuthors = currentCoAuthors.size();
|
||||||
|
allCoAuthorsWithKnownAuthorshipYears.addAll(currentCoAuthors);
|
||||||
} else {
|
} else {
|
||||||
allCoAuthorsWithKnownAuthorshipYears.addAll(yearToUniqueCoauthors.get(stringPublishedYear));
|
currentUniqueCoAuthors = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
visualizationCode.append("data.setValue("
|
visualizationCode.append("data.setValue("
|
||||||
|
@ -212,8 +215,6 @@ public class VisualizationCodeGenerator {
|
||||||
+ ", 1, "
|
+ ", 1, "
|
||||||
+ currentUniqueCoAuthors
|
+ currentUniqueCoAuthors
|
||||||
+ ");\n");
|
+ ");\n");
|
||||||
|
|
||||||
|
|
||||||
uniqueCoAuthorCounter++;
|
uniqueCoAuthorCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue