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:
cdtank 2010-07-06 23:55:30 +00:00
parent 6a499d164f
commit 55cb5cf88b
2 changed files with 17 additions and 12 deletions

View file

@ -223,21 +223,18 @@ public class VisualizationRequestHandler {
private void generateCsvFileBuffer(Map<String, Set<Node>> yearToCoauthors, PrintWriter printWriter) {
CSVWriter csvWriter = new SimpleWriter(printWriter);
// CSVWriter csvWriter = new SimpleWriter(printWriter);
try {
csvWriter.append(new String[]{"Year", "Number of Authors", "Authors"});
printWriter.append("\"Year\", \"Number of Co-Authors\", \"Co-Author(s)\"\n");
for (Entry<String, Set<Node>> currentEntry : yearToCoauthors.entrySet()) {
csvWriter.append(new Object[]{currentEntry.getKey(),
currentEntry.getValue().size(),
getCoauthorsString(currentEntry.getValue())});
}
printWriter.append("\"" + currentEntry.getKey() + "\","
+ "\"" + currentEntry.getValue().size() + "\","
+ "\"" + getCoauthorsString(currentEntry.getValue()) + "\"\n"
);
} catch (IOException e) {
e.printStackTrace();
}
printWriter.flush();
@ -249,7 +246,7 @@ public class VisualizationRequestHandler {
StringBuilder coAuthorsMerged = new StringBuilder();
for (Node currCoAuthor : coAuthors) {
coAuthorsMerged.append(currCoAuthor.getNodeName() + ", ");
coAuthorsMerged.append(currCoAuthor.getNodeName() + " | ");
}
return coAuthorsMerged.toString();

View file

@ -211,6 +211,13 @@
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual12053"/>
</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:param name="vis" value="person_level"/>
<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>
&nbsp;&nbsp;<a href='<c:out value="${coAuthorship1Data}"/>'>Data</a>
&nbsp;&nbsp;<a href='<c:out value="${personLevel1}"/>'>Person Level</a>
&nbsp;&nbsp;<a href='<c:out value="${coAuthorshipSparklineData}"/>'>Unique Coauthors CSV Data</a>
<br />
<a href='<c:out value="${coAuthorship2}"/>'>vis link for coauthorship -> "Not Working" {"Crane, Brian"}</a>&nbsp;
<a href='<c:out value="${coAuthorship2Data}"/>'>Data</a><br />