diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/visualization/TestJava.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/visualization/TestJava.java deleted file mode 100644 index 021bfc1b9..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/visualization/TestJava.java +++ /dev/null @@ -1,194 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.visualization; - -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; -import java.util.Map.Entry; - -import org.apache.commons.collections.BidiMap; -import org.apache.commons.collections.MapIterator; -import org.apache.commons.collections.bidimap.TreeBidiMap; - -import com.google.gson.Gson; -import com.hp.hpl.jena.iri.IRIFactory; - -import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.GenericQueryMap; -import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Node; - -public class TestJava { - - /** - * @param args - */ - public static void main(String[] args) { - String uriStr = "http%3A%2F%2Fvivo.library.cornell.edu%2Fns%2F0.1%23individual8588"; - IRIFactory factory = IRIFactory.jenaImplementation(); - - String[] sampleBlurns = {"Gold, J R [Reprint Author, Author]; Perkins, G A; Erb, H N; Ainsworth, D M | Journal of Veterinary Internal Medicine, 2006; 20(3): 720", - "Goldstein, Richard E; Lin, Rebecca C; Langston, Catherine E; Scrivani, Peter V; Erb, Hollis N; Barr, Stephen C | Journal of Veterinary Internal Medicine, 2006; 20(3): 489-494", - "McClellan, Jennifer M; Goldstein, Richard E; Erb, Hollis N; Dykes, Ned L; Cowgill, Larry D | American Journal of Veterinary Research, 2006; 67(4): 715-722", - "Cook, Christopher P; Scott, Danny W; Erb, Hollis N; Miller, William H | Vet Dermatol. 2005; 16(1): 47-51", - "Estrada, Amara; Moise, N Sydney; Erb, Hollis N; McDonough, Sean P; Renaud, Farrell, Shari | Journal of Veterinary Internal Medicine, 2006; 20(4): 862-872", - "Aguirre, A L [Reprint Author, Author]; Center, S A; Yeager, A E; Randolph, J F; Erb, H N | Journal of Veterinary Internal Medicine, 2006; 20(3): 787-788", - "MacLeod, K D; Scott, D W; Erb, H N | Journal of Veterinary Medicine Series A, 2004; 51(9-10): 400-404", - "Bailey, Dennis B; Rassnick, Kenneth M; Erb, Hollis N; Dykes, Nathan L; Hoopes, P Jack; Page, Rodney L | American Journal of Veterinary Research, 2004; 65(11): 1502-1507", - "Ainsworth, Dorothy M; Wagner, Bettina; Franchini, Marco; Grunig, Gabriele; Erb, Hollis N; Tan, Jean Yin | American Journal of Veterinary Research, 2006; 67(4): 669-677", - "Page, Richard B; Scrivani, Peter V; Dykes, Nathan L; Erb, Hollis N; Hobbs, Jeff M | Veterinary Radiology and Ultrasound, 2006; 47(2): 206-211", - "Scrivani, Peter V; Dykes, Nathan L; Erb, Hollis N | Veterinary Radiology and Ultrasound, 2004; 45(5): 419-423", - "Sepesy, Lisa M; Center, Sharon A; Randolph, John F; Warner, Karen L; Erb, Hollis N | Journal of the American Veterinary Medical Association, 2006; 229(2): 246-252", - "Dereszynski, D [Reprint Author, Author]; Center, S; Hadden, A; Randolph, J; Brooks, M; Palyada, K; McDonough, S; Messick, J; Bischoff, K; Erb, H; Gluckman, S; Sanders, S | Journal of Veterinary Internal Medicine, 2006; 20(3): 751-752", - "Kroll, Tracy L; Houpt, Katherine A; Erb, Hollis N | Journal of the American Animal Hospital Association, 2004; 40(1): 13-19", - "Fortier, Lisa A; Gregg, Abigail J; Erb, Hollis N; Fubini, Susan L | Vet Surg. 33(6): 661-7", - "Wagner, Bettina; Flaminio, Julia B F; Hillegas, Julie; Leibold, Wolfgang; Erb, Hollis N; Antczak, Douglas F | Veterinary Immunology and Immunopathology, 2006; 110(3-4): 269-278", - "Chalmers, H J; Scrivani, Peter V; Dykes, Nathan L; Erb, Hollis N; Hobbs, J M; Hubble, Lorna J | Veterinary Radiology and Ultrasound, 2006; 47(5): 507-509", - "Center, Sharon A; Warner, Karen L; McCabe, Jennifer; Foureman, Polly; Hoffmann, Walter E; Erb, Hollis N | Am J Vet Res. 2005; 66(2): 330-41"}; - - System.out.println(sampleBlurns); - for (String blurb : sampleBlurns) { - - System.out.println(blurb.contains("author")); - } - Map yearToPublicationCount = new TreeMap(); - - yearToPublicationCount.put("2003", 5); - yearToPublicationCount.put("2005", 3); - yearToPublicationCount.put("2002", 1); - yearToPublicationCount.put("2090", 5); - yearToPublicationCount.put("Unknown", 6); - - BidiMap map1 = new TreeBidiMap(yearToPublicationCount); - - - System.out.println(map1 + " --- " + map1.inverseBidiMap()); - - Node egoNode; - - - MapIterator mapIterator = map1.inverseBidiMap().mapIterator(); - - - while(mapIterator.hasNext()) { - - Object next = mapIterator.next(); - - System.out.println(next + " %%% " + next); - - - } - - - - - System.out.println(); - - Map> biboDocumentURLToCoAuthors = new HashMap>(); - - Set coAuthorsForCurrentBiboDocument; - - if (biboDocumentURLToCoAuthors.containsKey("a")) { - coAuthorsForCurrentBiboDocument = biboDocumentURLToCoAuthors.get("a"); - } else { - coAuthorsForCurrentBiboDocument = new HashSet(); - biboDocumentURLToCoAuthors.put("a", coAuthorsForCurrentBiboDocument); - } - - coAuthorsForCurrentBiboDocument.add(1); - - int actual_size = 4; -// int n = actual_size - 1; - - for (int ii = 0; ii < actual_size - 1; ii++) { - for (int jj = ii + 1; jj < actual_size; jj++) { - System.out.println(ii + " - " + jj ); - } - } - - System.out.println(yearToPublicationCount); - - - Map saHashMap = new HashMap(){{ - put("sdsd", 4); - - }}; - System.out.println(saHashMap.keySet()); - - - Set keySet = new HashSet(yearToPublicationCount.keySet()); - keySet.remove("Unknown"); - - try { - System.out.println(Collections.min(keySet)); - } catch (Exception e) { - } - - - GenericQueryMap stringToSetOfStrings = new GenericQueryMap(); - - stringToSetOfStrings.put("A", yearToPublicationCount.keySet()); - stringToSetOfStrings.put("B", yearToPublicationCount.keySet()); - stringToSetOfStrings.put("C", yearToPublicationCount.keySet()); - stringToSetOfStrings.put("imageOffset", keySet); - - Set what = new HashSet(); - - what.add("sup"); - - stringToSetOfStrings.put("imageOffset2", what); - - - String emptyString = ""; - System.out.println(emptyString.isEmpty()); - - System.out.println(stringToSetOfStrings); - - Gson gson = new Gson(); - String json = gson.toJson(stringToSetOfStrings); - - - System.out.println(json); - - - -// System.out.println(Collections.max(yearToPublicationCount.keySet())); -// System.out.println(Collections.min(yearToPublicationCount.keySet())); - -// yearToPublicationCount.put("2087", testIt(5, yearToPublicationCount.get("2087"))); - -// try { -// factory.setEncoding("HEX"); -// } catch (UnsupportedEncodingException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } - - - /* - IRI iri = factory.create(uriStr); - - - - if (iri.hasViolation(false) ) { - boolean validURI = false; - String errorMsg = ((Violation)iri.violations(false).next()).getShortMessage()+" "; - System.out.println("MURDER!!!!!" + errorMsg); - - } else { - System.out.println(iri.hasViolation(true)); - - }*/ - - - } - - private static Integer testIt(int i, Integer integer) { -// System.out.println("testit - " + i + " --- " + integer); - - return 10; - } - -} diff --git a/webapp/web/js/visualization/personlevel/person_level.js b/webapp/web/js/visualization/personlevel/person_level.js index e0dfc3378..3a9920d96 100644 --- a/webapp/web/js/visualization/personlevel/person_level.js +++ b/webapp/web/js/visualization/personlevel/person_level.js @@ -19,7 +19,6 @@ function getWellFormedURLs(given_uri, type) { dataType: "text", async: false, success:function(data){ - // console.log("COA - " + data); } }).responseText; @@ -73,18 +72,15 @@ function getWellFormedURLs(given_uri, type) { $.fn.image = function(src, successFunc, failureFunc){ return this.each(function(){ var profileImage = new Image(); - profileImage.src = src; - profileImage.width = 90; profileImage.onerror = failureFunc; profileImage.onload = successFunc; - + profileImage.src = src; return profileImage; }); }; function setProfileImage(imageContainerID, rawPath, contextPath) { - if (imageContainerID == "") { return; @@ -103,7 +99,7 @@ function setProfileImage(imageContainerID, rawPath, contextPath) { imageContainer.empty(); } ); - + } function setProfileMoniker(monikerContainerID, moniker, doEllipsis) { @@ -317,4 +313,4 @@ function renderCoAuthorshipVisualization() { document.write(alternateContent); // insert non-flash content } -} +} \ No newline at end of file diff --git a/webapp/web/templates/visualization/person_level.jsp b/webapp/web/templates/visualization/person_level.jsp index 3d194bc65..0ccde7b76 100644 --- a/webapp/web/templates/visualization/person_level.jsp +++ b/webapp/web/templates/visualization/person_level.jsp @@ -1,5 +1,4 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - <%@ page import="edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineVOContainer"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> @@ -36,6 +35,11 @@