From aff8500f20359209131eef822a29304b0990ef7b Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Thu, 1 Dec 2011 19:42:17 +0000 Subject: [PATCH] updates to include additional information for vocabulary services --- .../edit/forms/addAssociatedConcept.ftl | 3 ++- .../ConceptSearchServiceUtils.java | 17 ++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl index 4b4e1ea4..c0ba0b68 100644 --- a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl +++ b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl @@ -80,8 +80,9 @@ <#assign checkedSource = false />
External Vocabulary Services
<#list sources?keys as sourceUri> + <#assign thisSource = sources[sourceUri]/> <#assign checkedSource = true/>checked="checked"> - +
diff --git a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java index c589626d..899c6b2a 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java +++ b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java @@ -35,15 +35,15 @@ public class ConceptSearchServiceUtils { //Get the URLS for the different services //URL to label - public static HashMap getVocabSources() { - HashMap map = new HashMap(); - map.put(UMLSVocabSource, "UMLS"); - map.put(AgrovocVocabSource, "AGROVOC"); - map.put(GemetVocabSource, "GEMET"); - + public static HashMap getVocabSources() { + HashMap map = new HashMap(); + map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System")); + map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "www.fao.org/agrovoc/", "Agricultural Vocabulary")); + map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus")); return map; } + //Get additional vocab source info //Get the hashmap mapping service name to Service class @@ -93,4 +93,7 @@ public class ConceptSearchServiceUtils { private static String getSearchTerm(VitroRequest vreq) { return vreq.getParameter("searchTerm"); } -} \ No newline at end of file + + +} +