1. Made minor changes as to how the csv were rendered.
2. Made change in the dummy vis client to link to a unique coauthors csv file.
This commit is contained in:
parent
6a499d164f
commit
55cb5cf88b
2 changed files with 17 additions and 12 deletions
|
@ -223,23 +223,20 @@ public class VisualizationRequestHandler {
|
||||||
|
|
||||||
private void generateCsvFileBuffer(Map<String, Set<Node>> yearToCoauthors, PrintWriter printWriter) {
|
private void generateCsvFileBuffer(Map<String, Set<Node>> yearToCoauthors, PrintWriter printWriter) {
|
||||||
|
|
||||||
CSVWriter csvWriter = new SimpleWriter(printWriter);
|
// CSVWriter csvWriter = new SimpleWriter(printWriter);
|
||||||
|
|
||||||
try {
|
printWriter.append("\"Year\", \"Number of Co-Authors\", \"Co-Author(s)\"\n");
|
||||||
csvWriter.append(new String[]{"Year", "Number of Authors", "Authors"});
|
|
||||||
|
|
||||||
for (Entry<String, Set<Node>> currentEntry : yearToCoauthors.entrySet()) {
|
for (Entry<String, Set<Node>> currentEntry : yearToCoauthors.entrySet()) {
|
||||||
|
|
||||||
csvWriter.append(new Object[]{currentEntry.getKey(),
|
printWriter.append("\"" + currentEntry.getKey() + "\","
|
||||||
currentEntry.getValue().size(),
|
+ "\"" + currentEntry.getValue().size() + "\","
|
||||||
getCoauthorsString(currentEntry.getValue())});
|
+ "\"" + getCoauthorsString(currentEntry.getValue()) + "\"\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
printWriter.flush();
|
printWriter.flush();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -249,7 +246,7 @@ public class VisualizationRequestHandler {
|
||||||
StringBuilder coAuthorsMerged = new StringBuilder();
|
StringBuilder coAuthorsMerged = new StringBuilder();
|
||||||
|
|
||||||
for (Node currCoAuthor : coAuthors) {
|
for (Node currCoAuthor : coAuthors) {
|
||||||
coAuthorsMerged.append(currCoAuthor.getNodeName() + ", ");
|
coAuthorsMerged.append(currCoAuthor.getNodeName() + " | ");
|
||||||
}
|
}
|
||||||
|
|
||||||
return coAuthorsMerged.toString();
|
return coAuthorsMerged.toString();
|
||||||
|
|
|
@ -211,6 +211,13 @@
|
||||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual12053"/>
|
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual12053"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
|
|
||||||
|
<c:url var="coAuthorshipSparklineData" value="/admin/visQuery">
|
||||||
|
<c:param name="vis" value="coauthorship"/>
|
||||||
|
<c:param name="vis_mode" value="sparkline"/>
|
||||||
|
<c:param name="render_mode" value="data"/>
|
||||||
|
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
|
||||||
|
</c:url>
|
||||||
|
|
||||||
<c:url var="personLevel1" value="/admin/visQuery">
|
<c:url var="personLevel1" value="/admin/visQuery">
|
||||||
<c:param name="vis" value="person_level"/>
|
<c:param name="vis" value="person_level"/>
|
||||||
<c:param name="render_mode" value="standalone"/>
|
<c:param name="render_mode" value="standalone"/>
|
||||||
|
@ -312,6 +319,7 @@ $(document).ready(function() {
|
||||||
<a href='<c:out value="${coAuthorship1}"/>'>vis link for coauthorship -> "Erb, Hollis Nancy"</a>
|
<a href='<c:out value="${coAuthorship1}"/>'>vis link for coauthorship -> "Erb, Hollis Nancy"</a>
|
||||||
<a href='<c:out value="${coAuthorship1Data}"/>'>Data</a>
|
<a href='<c:out value="${coAuthorship1Data}"/>'>Data</a>
|
||||||
<a href='<c:out value="${personLevel1}"/>'>Person Level</a>
|
<a href='<c:out value="${personLevel1}"/>'>Person Level</a>
|
||||||
|
<a href='<c:out value="${coAuthorshipSparklineData}"/>'>Unique Coauthors CSV Data</a>
|
||||||
<br />
|
<br />
|
||||||
<a href='<c:out value="${coAuthorship2}"/>'>vis link for coauthorship -> "Not Working" {"Crane, Brian"}</a>
|
<a href='<c:out value="${coAuthorship2}"/>'>vis link for coauthorship -> "Not Working" {"Crane, Brian"}</a>
|
||||||
<a href='<c:out value="${coAuthorship2Data}"/>'>Data</a><br />
|
<a href='<c:out value="${coAuthorship2Data}"/>'>Data</a><br />
|
||||||
|
|
Loading…
Add table
Reference in a new issue