This commit is contained in:
parent
bcf202e77b
commit
70e58dd4ce
7 changed files with 22 additions and 11 deletions
|
@ -350,10 +350,11 @@ function renderCoAuthorshipVisualization() {
|
||||||
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
||||||
);
|
);
|
||||||
} else { // flash is too old or we can't detect the plugin
|
} else { // flash is too old or we can't detect the plugin
|
||||||
var alternateContent = 'Alternate HTML content should be placed here. '
|
var alternateContent = '<br /><h3 style="color: red;">'
|
||||||
+ 'This content requires the Adobe Flash Player. '
|
+ 'This content requires the Adobe Flash Player. '
|
||||||
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
|
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a></h3>';
|
||||||
document.write(alternateContent); // insert non-flash content
|
document.write(alternateContent); // insert non-flash content
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -216,6 +216,7 @@ public class CoAuthorshipGraphMLWriter {
|
||||||
graphMLContent.append("<node id=\"" + node.getNodeID() + "\">\n");
|
graphMLContent.append("<node id=\"" + node.getNodeID() + "\">\n");
|
||||||
graphMLContent.append("\t<data key=\"url\">" + node.getNodeURL() + "</data>\n");
|
graphMLContent.append("\t<data key=\"url\">" + node.getNodeURL() + "</data>\n");
|
||||||
graphMLContent.append("\t<data key=\"name\">" + node.getNodeName() + "</data>\n");
|
graphMLContent.append("\t<data key=\"name\">" + node.getNodeName() + "</data>\n");
|
||||||
|
graphMLContent.append("\t<data key=\"label\">" + node.getNodeName() + "</data>\n");
|
||||||
|
|
||||||
if (profileURL != null) {
|
if (profileURL != null) {
|
||||||
graphMLContent.append("\t<data key=\"profile_url\">" + profileURL + "</data>\n");
|
graphMLContent.append("\t<data key=\"profile_url\">" + profileURL + "</data>\n");
|
||||||
|
|
|
@ -160,6 +160,15 @@ public class VisVOContainer {
|
||||||
schemaAttributes.put("attr.name", "name");
|
schemaAttributes.put("attr.name", "name");
|
||||||
schemaAttributes.put("attr.type", "string");
|
schemaAttributes.put("attr.type", "string");
|
||||||
|
|
||||||
|
nodeSchema.add(schemaAttributes);
|
||||||
|
|
||||||
|
schemaAttributes = new LinkedHashMap<String, String>();
|
||||||
|
|
||||||
|
schemaAttributes.put("id", "label");
|
||||||
|
schemaAttributes.put("for", "node");
|
||||||
|
schemaAttributes.put("attr.name", "label");
|
||||||
|
schemaAttributes.put("attr.type", "string");
|
||||||
|
|
||||||
nodeSchema.add(schemaAttributes);
|
nodeSchema.add(schemaAttributes);
|
||||||
|
|
||||||
schemaAttributes = new LinkedHashMap<String, String>();
|
schemaAttributes = new LinkedHashMap<String, String>();
|
||||||
|
|
|
@ -197,12 +197,12 @@ public class VisualizationRequestHandler {
|
||||||
|
|
||||||
if (authorNodesAndEdges.getNodes() == null || authorNodesAndEdges.getNodes().size() < 1 ) {
|
if (authorNodesAndEdges.getNodes() == null || authorNodesAndEdges.getNodes().size() < 1 ) {
|
||||||
|
|
||||||
outputFileName = "no-coauthors" + ".csv";
|
outputFileName = "no_coauthors-per-year" + ".csv";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
outputFileName = UtilityFunctions.slugify(authorNodesAndEdges.getEgoNode().getNodeName())
|
outputFileName = UtilityFunctions.slugify(authorNodesAndEdges.getEgoNode().getNodeName())
|
||||||
+ "-coauthors" + ".csv";
|
+ "_coauthors-per-year" + ".csv";
|
||||||
|
|
||||||
yearToCoauthors = getCoAuthorsStats(authorNodesAndEdges);
|
yearToCoauthors = getCoAuthorsStats(authorNodesAndEdges);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.visualization.constants;
|
||||||
|
|
||||||
public class VisConstants {
|
public class VisConstants {
|
||||||
|
|
||||||
public static final int MAX_NAME_TEXT_LENGTH = 10;
|
public static final int MAX_NAME_TEXT_LENGTH = 20;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,12 +256,12 @@ public class VisualizationRequestHandler {
|
||||||
|
|
||||||
if (coAuthorsipVO.getNodes() == null || coAuthorsipVO.getNodes().size() < 1) {
|
if (coAuthorsipVO.getNodes() == null || coAuthorsipVO.getNodes().size() < 1) {
|
||||||
|
|
||||||
outputFileName = "no-coauthorship-net" + ".csv";
|
outputFileName = "no_coauthor-network.graphml" + ".xml";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
outputFileName = UtilityFunctions.slugify(coAuthorsipVO.getEgoNode().getNodeName())
|
outputFileName = UtilityFunctions.slugify(coAuthorsipVO.getEgoNode().getNodeName())
|
||||||
+ "-coauthor-net" + ".xml";
|
+ "_coauthor-network.graphml" + ".xml";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,12 +296,12 @@ public class VisualizationRequestHandler {
|
||||||
|
|
||||||
if (coAuthorsipVO.getNodes() == null || coAuthorsipVO.getNodes().size() < 1 ) {
|
if (coAuthorsipVO.getNodes() == null || coAuthorsipVO.getNodes().size() < 1 ) {
|
||||||
|
|
||||||
outputFileName = "no-coauthors-list" + ".csv";
|
outputFileName = "no_coauthors" + ".csv";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
outputFileName = UtilityFunctions.slugify(coAuthorsipVO.getEgoNode().getNodeName())
|
outputFileName = UtilityFunctions.slugify(coAuthorsipVO.getEgoNode().getNodeName())
|
||||||
+ "-coauthors-list" + ".csv";
|
+ "_coauthors" + ".csv";
|
||||||
|
|
||||||
coAuthorsToCount = getCoAuthorsList(coAuthorsipVO);
|
coAuthorsToCount = getCoAuthorsList(coAuthorsipVO);
|
||||||
|
|
||||||
|
|
|
@ -235,10 +235,10 @@ public class VisualizationRequestHandler {
|
||||||
* To make sure that null/empty records for author names do not cause any mischief.
|
* To make sure that null/empty records for author names do not cause any mischief.
|
||||||
* */
|
* */
|
||||||
if (authorName == null) {
|
if (authorName == null) {
|
||||||
authorName = "";
|
authorName = "author";
|
||||||
}
|
}
|
||||||
|
|
||||||
String outputFileName = UtilityFunctions.slugify(authorName) + "pub-count-sparkline" + ".csv";
|
String outputFileName = UtilityFunctions.slugify(authorName) + "_publications-per-year" + ".csv";
|
||||||
|
|
||||||
response.setContentType("application/octet-stream");
|
response.setContentType("application/octet-stream");
|
||||||
response.setHeader("Content-Disposition","attachment;filename=" + outputFileName);
|
response.setHeader("Content-Disposition","attachment;filename=" + outputFileName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue