This commit is contained in:
cdtank 2010-07-22 21:05:40 +00:00
parent bcf202e77b
commit 70e58dd4ce
7 changed files with 22 additions and 11 deletions

View file

@ -216,6 +216,7 @@ public class CoAuthorshipGraphMLWriter {
graphMLContent.append("<node id=\"" + node.getNodeID() + "\">\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=\"label\">" + node.getNodeName() + "</data>\n");
if (profileURL != null) {
graphMLContent.append("\t<data key=\"profile_url\">" + profileURL + "</data>\n");

View file

@ -160,6 +160,15 @@ public class VisVOContainer {
schemaAttributes.put("attr.name", "name");
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);
schemaAttributes = new LinkedHashMap<String, String>();

View file

@ -197,12 +197,12 @@ public class VisualizationRequestHandler {
if (authorNodesAndEdges.getNodes() == null || authorNodesAndEdges.getNodes().size() < 1 ) {
outputFileName = "no-coauthors" + ".csv";
outputFileName = "no_coauthors-per-year" + ".csv";
} else {
outputFileName = UtilityFunctions.slugify(authorNodesAndEdges.getEgoNode().getNodeName())
+ "-coauthors" + ".csv";
+ "_coauthors-per-year" + ".csv";
yearToCoauthors = getCoAuthorsStats(authorNodesAndEdges);

View file

@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.visualization.constants;
public class VisConstants {
public static final int MAX_NAME_TEXT_LENGTH = 10;
public static final int MAX_NAME_TEXT_LENGTH = 20;
}

View file

@ -256,12 +256,12 @@ public class VisualizationRequestHandler {
if (coAuthorsipVO.getNodes() == null || coAuthorsipVO.getNodes().size() < 1) {
outputFileName = "no-coauthorship-net" + ".csv";
outputFileName = "no_coauthor-network.graphml" + ".xml";
} else {
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 ) {
outputFileName = "no-coauthors-list" + ".csv";
outputFileName = "no_coauthors" + ".csv";
} else {
outputFileName = UtilityFunctions.slugify(coAuthorsipVO.getEgoNode().getNodeName())
+ "-coauthors-list" + ".csv";
+ "_coauthors" + ".csv";
coAuthorsToCount = getCoAuthorsList(coAuthorsipVO);

View file

@ -235,10 +235,10 @@ public class VisualizationRequestHandler {
* To make sure that null/empty records for author names do not cause any mischief.
* */
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.setHeader("Content-Disposition","attachment;filename=" + outputFileName);