Sprint i18n with main (#215)

* Layer uqam updates onto master (minus trailing whitespace)

* Update AddOrganizerRoleToPersonGenerator.java

Removed extraneous whitespace

* My whitespace (#153)

* Update AddPublicationToPersonGenerator.java

* Removed extraneous whitespace AND move RootUserPolicy.java from VIVO to Vitro

* Fixed whitespace in: AddAttendeeRoleToPersonGenerator.java

* Fixed indentations for AddOutreachProviderRoleToPersonGenerator.java

* Fixed indentations

* Removed extraneous whitespace (#158)

* Removed extraneous whitespace

* Fix bug introduced in cleaning up whitespace

* Tagging UQAM comments with the following tags

-Add-Feature
-Optimization
-Linguistic-Management
-Bug-Correction

* Update AddReviewerRoleToPersonGenerator.java

* Added an internationalization correction to be considered in the vivo-i18n-core that was forgotten when sprint-i18n was created.

* Fix typo in AddReviewerRoleToPersonGenerator

Resolves: https://jira.lyrasis.org/browse/VIVO-1774

* Fix typo in AddOutreachProviderRoleToPersonGenerator

Resolves: https://jira.lyrasis.org/browse/VIVO-1775

* Include language dependencies in build all of the time (#168)

Move "LocaleSelectionSetup" higher in the startup list so that the Vitro:RDFFilesLoader has the locale info available on its startup

Part of resolution to: https://jira.lyrasis.org/browse/VIVO-1836

Co-authored-by: Andrew Woods <awoods@duraspace.org>

* Made modifications to publicationToPersonUtils.js so that multilangua… (#170)

* Made modifications to publicationToPersonUtils.js so that multilanguage support will not break the javascript functionalty.

Co-authored-by: root <root@vivo-development.hs-mittweida.de>

Resolves: https://jira.lyrasis.org/browse/VIVO-1739

* Feature language en_CA (#169)

* Changing ontology extensions for n3 & assigning a base IRI to each
ontology

Co-authored-by: michelheonuqam <heon.michel@uqam.ca>
Co-authored-by: michelheon <heon@videotorn.ca>

Partial resolution of: https://jira.lyrasis.org/browse/VIVO-1862

* i18n: title tag and headings in capability map are in english in french version (#173)

* added multi-language support for ticket VIVO-1846

* fixed swapped properties, added Capability map title to i18n

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1847

* Added i18n support for Capability Map control buttons, JIRA ticket VIVO-1846

* removed redundat files which are now available via Vitro- and VIVO-languages

* added i18n support for the capability map, ticket vivo-1892

* Revert non-function RDF changes (#180)

Related to: https://jira.lyrasis.org/browse/VIVO-1905

Co-authored-by: Andrew Woods <awoods@duraspace.org>

* Ensure 'other' in Individual->Teaching->advisees->type is translated

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1881

* [VIVO-1842] i18n: Added function js_string at i18n variables to handle quotes properly (#181)

* added js_string at i18n strings to handle quotes properly, ticket vivo-1842

Partial resolution for: https://jira.lyrasis.org/browse/VIVO-1842

* replace static headings with i18n values (#183)

Partial resolution of: https://jira.lyrasis.org/browse/VIVO-1844

* added empty check for getCountry, fixing bug with spanish label (es), ticket vivo-1900 (#182)

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1900

* Issue/vivo 1908 (#185)

* Provide fallback language in language-filtered webpage SPARQL query and use existing RDFService-based filtering for ConstantFieldOptions

Resolves: https://jira.lyrasis.org/browse/VIVO-1906

* Fix bug of missing toString() (#187)

Related to: https://jira.lyrasis.org/browse/VIVO-1906

Co-authored-by: Andrew Woods <awoods@duraspace.org>

* Remove files replicated in i18n (#186)

Related to: https://jira.lyrasis.org/browse/VIVO-1917

* removed redundant vitroAnnotations, now in VIVO-languages, ticket vivo-1821

* Removed key.png from the template and replaced it with css sprite and… (#184)

* Removed key.png from the template and replaced it with css sprite and descriptions in plain text.
* * adding height to background images, hopefully fixing issues

Partial resolution for: https://jira.lyrasis.org/browse/VIVO-1902

* [VIVO-1915] i18n - removing language select for label management for individuals (#190)

* removed the language select for managing multi language labels fpr individuals, ticket vivo-1915

* modified ManageLabelsForPersonGenerator so that you can only add an langauge label if it is not already set, ticket vivo-1915

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1915

* - added i18n() to hardcoded values

* added i18n support to person's domain in capability map, ticket 1867

* [VIVO-1946] - Update ResearcherID description in vivo.owl (#188)

* Update ResearcherID description in vivo.owl

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1946

* [VIVO-1936] i18n: updated the language comment in runtime.properties (#203)

Partial resolution of: https://jira.lyrasis.org/browse/VIVO-1936

Co-authored-by: Kampe <Benjamin.Kampe@tib.eu>

* [VIVO-1924] i18n: @en i18n properties are not loaded during first site startup. (#204)

* rearranged startup-listeners fixing bug with language files, ticket VIVO-1924

* Added a comment to prevent future bugs like this, ticket VIVO-1924

* fixed previous comment, ticket VIVO-1924

* Remove duplicate text from dropdown menus

* Minor checkstyle correction following: VIVO-1936 (#206)

Follow-on to: https://jira.lyrasis.org/browse/VIVO-1936

Co-authored-by: Andrew Woods <awoods@duraspace.org>

* follow-up on vivo-1936 - restore default values in example-settings.xml (#210)

Co-authored-by: gneissone <mbgross@wustl.edu>

* [VIVO-1798] - Internationalize first and last name validation (#207)

* Internationalize first and last name validation

Partial resolution to: https://jira.lyrasis.org/browse/VIVO-1798

* adding collections process terms (#165)

* adding collections process terms

No JIRA :(

* Non-functional change to comment in example.applicationSetup.n3

Related to: https://jira.lyrasis.org/browse/VIVO-1741

* Update orcidConfirm.ftl (#199)

Fix i18n property used on ORCID confirmation step 2 button.
Related to https://jira.lyrasis.org/browse/VIVO-1945

* Fix external AGROVOC service URL

* URL fix for LCSH service

* Remove unnecessary pom.xml 'profile'

- Also, uncomment language overlays
   - Noting that this is not actually necessary, as any 'war' Maven dependencies are automatically overlayed:
   - https://maven.apache.org/plugins/maven-war-plugin/overlays.html

Co-authored-by: Andrew Woods <awoods@duraspace.org>
Co-authored-by: Nicolas D <46490666+nicalico@users.noreply.github.com>
Co-authored-by: UQAM-VIVO <heon.michel@uqam.ca>
Co-authored-by: matthiasluehr <60263380+matthiasluehr@users.noreply.github.com>
Co-authored-by: Michel Heon <heon@videotron.ca>
Co-authored-by: dofeldsc <dofeldsc@uos.de>
Co-authored-by: William Welling <wwelling@library.tamu.edu>
Co-authored-by: Brian Lowe <brianjlowe@gmail.com>
Co-authored-by: Matthias Lühr <luehr@hs-mittweida.de>
Co-authored-by: Ben <mbgross@wustl.edu>
Co-authored-by: Benjamin Kampe <benjamin@fehrmanns.net>
Co-authored-by: Kampe <Benjamin.Kampe@tib.eu>
Co-authored-by: Gross, Benjamin <benjamin.gross@clarivate.com>
Co-authored-by: diatomsRcool <annethessen@gmail.com>
Co-authored-by: L.O <53535673+lb-ov@users.noreply.github.com>
This commit is contained in:
Andrew Woods 2021-02-10 12:02:20 -05:00 committed by GitHub
parent f97972e5aa
commit 268ffa1cd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
102 changed files with 1253 additions and 9703 deletions

View file

@ -58,7 +58,7 @@ public class AgrovocService implements ExternalConceptService {
protected final String dbpedia_endpoint = " http://dbpedia.org/sparql"; protected final String dbpedia_endpoint = " http://dbpedia.org/sparql";
// URL to get all the information for a concept // URL to get all the information for a concept
protected final String conceptSkosMosBase = "http://agrovoc.uniroma2.it/agrovoc/rest/v1/"; protected final String conceptSkosMosBase = "https://agrovoc.uniroma2.it/agrovoc/rest/v1/";
protected final String conceptsSkosMosSearch = conceptSkosMosBase + "search?"; protected final String conceptsSkosMosSearch = conceptSkosMosBase + "search?";
protected final String conceptSkosMosURL = conceptSkosMosBase + "data?"; protected final String conceptSkosMosURL = conceptSkosMosBase + "data?";
@Override @Override

View file

@ -35,7 +35,7 @@ public class LCSHService implements ExternalConceptService {
protected final Log log = LogFactory.getLog(getClass()); protected final Log log = LogFactory.getLog(getClass());
private final String skosSuffix = ".skos.rdf"; private final String skosSuffix = ".skos.rdf";
private final String hostUri = "http://id.loc.gov"; private final String hostUri = "https://id.loc.gov";
private final String schemeUri = hostUri + "/authorities/subjects"; private final String schemeUri = hostUri + "/authorities/subjects";
private final String baseUri = hostUri + "/search/"; private final String baseUri = hostUri + "/search/";
@ -94,7 +94,7 @@ public class LCSHService implements ExternalConceptService {
bestMatch = "false"; bestMatch = "false";
} }
log.debug("-" + uri + "-"); log.debug("-" + uri + "-");
//This is the URL for retrieving the concept - the pattern is http://id.loc.gov/authorities/subjects/sh85014203.skos.rdf //This is the URL for retrieving the concept - the pattern is https://id.loc.gov/authorities/subjects/sh85014203.skos.rdf
//This is not the URI itself which would be http://id.loc.gov/authorities/subjects/sh85014203 //This is not the URI itself which would be http://id.loc.gov/authorities/subjects/sh85014203
String conceptURLString = getSKOSURL(uri); String conceptURLString = getSKOSURL(uri);
String baseConceptURI = uri; String baseConceptURI = uri;
@ -152,7 +152,7 @@ public class LCSHService implements ExternalConceptService {
private String getSKOSURL(String uri) { private String getSKOSURL(String uri) {
String skosURI = uri + skosSuffix; String skosURI = uri.replaceFirst("http://", "https://") + skosSuffix;
return skosURI; return skosURI;
} }

View file

@ -11,15 +11,18 @@ import org.apache.jena.rdf.model.Literal;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.N3ValidatorVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission;
import edu.cornell.mannlib.vitro.webapp.i18n.I18nBundle;
public class FirstAndLastNameValidator implements N3ValidatorVTwo { public class FirstAndLastNameValidator implements N3ValidatorVTwo {
private static String MISSING_FIRST_NAME_ERROR = "You must enter a value in the First Name field."; private static String MISSING_FIRST_NAME_ERROR = "first_name_empty_msg";
private static String MISSING_LAST_NAME_ERROR = "You must enter a value in the Last Name field."; private static String MISSING_LAST_NAME_ERROR = "last_name_empty_msg";
private static String MALFORMED_LAST_NAME_ERROR = "The last name field may not contain a comma. Please enter first name in First Name field."; private static String MALFORMED_LAST_NAME_ERROR = "malformed_last_name_msg";
private I18nBundle i18n;
private String uriReceiver; private String uriReceiver;
public FirstAndLastNameValidator(String uriReceiver) { public FirstAndLastNameValidator(String uriReceiver, I18nBundle i18n) {
this.i18n = i18n;
this.uriReceiver = uriReceiver; this.uriReceiver = uriReceiver;
} }
@ -68,14 +71,14 @@ public class FirstAndLastNameValidator implements N3ValidatorVTwo {
} }
if (lastName == null) { if (lastName == null) {
errors.put("lastName", MISSING_LAST_NAME_ERROR); errors.put("lastName", i18n.text(MISSING_LAST_NAME_ERROR));
// Don't reject space in the last name: de Vries, etc. // Don't reject space in the last name: de Vries, etc.
} else if (lastNameValue.contains(",")) { } else if (lastNameValue.contains(",")) {
errors.put("lastName", MALFORMED_LAST_NAME_ERROR); errors.put("lastName", i18n.text(MALFORMED_LAST_NAME_ERROR));
} }
if (firstName == null) { if (firstName == null) {
errors.put("firstName", MISSING_FIRST_NAME_ERROR); errors.put("firstName", i18n.text(MISSING_FIRST_NAME_ERROR));
} }
return errors.size() != 0 ? errors : null; return errors.size() != 0 ? errors : null;

View file

@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -21,28 +22,28 @@ public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
/** Editor role involves hard-coded options for the "right side" of the role or activity. */ /** Editor role involves hard-coded options for the "right side" of the role or activity. */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"", "Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://purl.org/NET/c4dm/event.owl#Event", "Event", I18n.bundle(vreq).text("select_type"),
"http://vivoweb.org/ontology/core#Competition", "Competition", "http://purl.org/NET/c4dm/event.owl#Event",
"http://purl.org/ontology/bibo/Conference", "Conference", "http://vivoweb.org/ontology/core#Competition",
"http://vivoweb.org/ontology/core#Course", "Course", "http://purl.org/ontology/bibo/Conference",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit", "http://vivoweb.org/ontology/core#Course",
"http://purl.org/ontology/bibo/Hearing", "Hearing", "http://vivoweb.org/ontology/core#Exhibit",
"http://purl.org/ontology/bibo/Interview", "Interview", "http://purl.org/ontology/bibo/Hearing",
"http://vivoweb.org/ontology/core#Meeting", "Meeting", "http://purl.org/ontology/bibo/Interview",
"http://purl.org/ontology/bibo/Performance", "Performance", "http://vivoweb.org/ontology/core#Meeting",
"http://vivoweb.org/ontology/core#Presentation", "Presentation", "http://purl.org/ontology/bibo/Performance",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk", "http://vivoweb.org/ontology/core#Presentation",
"http://purl.org/ontology/bibo/Workshop", "Workshop", "http://vivoweb.org/ontology/core#InvitedTalk",
"http://vivoweb.org/ontology/core#EventSeries", "Event Series", "http://purl.org/ontology/bibo/Workshop",
"http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series", "http://vivoweb.org/ontology/core#EventSeries",
"http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series", "http://vivoweb.org/ontology/core#ConferenceSeries",
"http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series" "http://vivoweb.org/ontology/core#SeminarSeries",
); "http://vivoweb.org/ontology/core#WorkshopSeries"
);
} }
@Override
boolean isShowRoleLabelField() { boolean isShowRoleLabelField() {
return false; return false;
} }
@ -65,3 +66,4 @@ public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
} }
*/ */
} }

View file

@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -22,22 +23,21 @@ public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
} }
/** Clinical role involves hard-coded options for the "right side" of the role or activity. */ /** Clinical role involves hard-coded options for the "right side" of the role or activity. */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"", "Select one", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://vivoweb.org/ontology/core#Project", "Project", I18n.bundle(vreq).text("select_type"),
"http://purl.obolibrary.org/obo/ERO_0000005", "Service" "http://vivoweb.org/ontology/core#Project",
); "http://purl.obolibrary.org/obo/ERO_0000005" /* Service */
);
} }
//isShowRoleLabelField remains true for this so doesn't need to be overwritten
@Override @Override
boolean isShowRoleLabelField(){ boolean isShowRoleLabelField(){
return true; return true;
} }
/* /*
* Use the methods below to change the date/time precision in the * Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the * custom form associated with this generator. When not used, the

View file

@ -5,6 +5,8 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.i18n.I18nBundle;
/** /**
* Generates the edit configuration for adding a Role to a Person. * Generates the edit configuration for adding a Role to a Person.
@ -46,8 +48,13 @@ public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGener
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
// UQAM-Linguistic-Management Managing linguistic context
I18nBundle i18n = I18n.bundle(vreq);
String i18nSelectType = i18n.text("select_type");
String selectType = (i18nSelectType == null || i18nSelectType.isEmpty()) ? "Select type" : i18nSelectType ;
return new ChildVClassesOptions(OPTION_CLASS_URI) return new ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type"); .setDefaultOptionLabel(selectType);
} }
/** Do not show the role label field for the AddEditorRoleToPerson form */ /** Do not show the role label field for the AddEditorRoleToPerson form */

View file

@ -32,6 +32,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUti
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
/** /**
* This is a slightly unusual generator that is used by Manage Editors on * This is a slightly unusual generator that is used by Manage Editors on
@ -83,7 +84,7 @@ public class AddEditorsToInformationResourceGenerator extends VivoBaseGenerator
//template file //template file
editConfiguration.setTemplate("addEditorsToInformationResource.ftl"); editConfiguration.setTemplate("addEditorsToInformationResource.ftl");
//add validators //add validators
editConfiguration.addValidator(new FirstAndLastNameValidator("personUri")); editConfiguration.addValidator(new FirstAndLastNameValidator("personUri", I18n.bundle(vreq)));
//Adding additional data, specifically edit mode //Adding additional data, specifically edit mode
addFormSpecificData(editConfiguration, vreq); addFormSpecificData(editConfiguration, vreq);

View file

@ -23,9 +23,10 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess; import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode;
import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
@ -108,8 +109,8 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
conf.addField( new FieldVTwo(). conf.addField( new FieldVTwo().
setName("documentType"). setName("documentType").
setValidators( list("nonempty") ). setValidators( list("nonempty") ).
setOptions( new ConstantFieldOptions("documentType", getDocumentTypeLiteralOptions() )) // UQAM-Linguistic-Management vreq for linguistic context
); setOptions( getDocumentTypeLiteralOptions(vreq) ) );
conf.addField( new FieldVTwo(). conf.addField( new FieldVTwo().
setName("documentLabel"). setName("documentLabel").
@ -203,21 +204,22 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
return null; return null;
} }
private List<List<String>> getDocumentTypeLiteralOptions() { private FieldOptions getDocumentTypeLiteralOptions(VitroRequest vreq) throws Exception {
List<List<String>> literalOptions = new ArrayList<List<String>>(); return GeneratorUtil.buildResourceAndLabelFieldOptions(
literalOptions.add(list("http://purl.org/ontology/bibo/Book", "Book")); vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
literalOptions.add(list("http://purl.org/ontology/bibo/Chapter", "Chapter")); I18n.bundle(vreq).text("select_type"),
literalOptions.add(list("http://purl.org/ontology/bibo/EditedBook", "Edited Book")); "http://purl.org/ontology/bibo/Book",
literalOptions.add(list("http://purl.org/ontology/bibo/Film", "Film")); "http://purl.org/ontology/bibo/Chapter",
literalOptions.add(list("http://purl.org/ontology/bibo/Magazine", "Magazine")); "http://purl.org/ontology/bibo/EditedBook",
literalOptions.add(list("http://vivoweb.org/ontology/core#Newsletter", "Newsletter")); "http://purl.org/ontology/bibo/Film",
literalOptions.add(list("http://purl.org/ontology/bibo/Newspaper", "Newspaper")); "http://purl.org/ontology/bibo/Magazine",
literalOptions.add(list("http://vivoweb.org/ontology/core#NewsRelease", "News Release")); "http://vivoweb.org/ontology/core#Newsletter",
literalOptions.add(list("http://purl.org/ontology/bibo/Report", "Report")); "http://purl.org/ontology/bibo/Newspaper",
literalOptions.add(list("http://vivoweb.org/ontology/core#Video", "Video")); "http://vivoweb.org/ontology/core#NewsRelease",
literalOptions.add(list("http://purl.org/ontology/bibo/Webpage", "Webpage")); "http://purl.org/ontology/bibo/Report",
literalOptions.add(list("http://purl.org/ontology/bibo/Website", "Website")); "http://vivoweb.org/ontology/core#Video",
return literalOptions; "http://purl.org/ontology/bibo/Webpage",
"http://purl.org/ontology/bibo/Website");
} }
} }

View file

@ -5,6 +5,8 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.i18n.I18nBundle;
public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -25,10 +27,14 @@ public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGener
/** Head Of role involves hard-coded options for the "right side" of the role or activity */ /** Head Of role involves hard-coded options for the "right side" of the role or activity */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
// UQAM-Linguistic-Management Taking into account the linguistic context
I18nBundle i18n = I18n.bundle(vreq);
String i18nSelectType = i18n.text("select_type");
String selectType = (i18nSelectType == null || i18nSelectType.isEmpty()) ? "Select type" : i18nSelectType ;
return new return new
ChildVClassesOptions(OPTION_CLASS_URI) ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type"); .setDefaultOptionLabel(selectType);
} }
@Override @Override

View file

@ -2,9 +2,28 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ResultSet;
import org.apache.jena.rdf.model.AnonId;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.i18n.I18nBundle;
import edu.cornell.mannlib.vitro.webapp.i18n.selection.SelectedLocale;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.impl.RDFServiceUtils;
public class AddMemberRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddMemberRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -20,44 +39,45 @@ public class AddMemberRoleToPersonGenerator extends AddRoleToPersonTwoStageGener
return "http://vivoweb.org/ontology/core#MemberRole"; return "http://vivoweb.org/ontology/core#MemberRole";
} }
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"","Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://vivoweb.org/ontology/core#AcademicDepartment","Academic Department", I18n.bundle(vreq).text("select_type"),
"http://vivoweb.org/ontology/core#Association","Association", "http://vivoweb.org/ontology/core#AcademicDepartment",
"http://vivoweb.org/ontology/core#Center","Center", "http://vivoweb.org/ontology/core#Association",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization", "http://vivoweb.org/ontology/core#Center",
"http://vivoweb.org/ontology/core#College","College", "http://vivoweb.org/ontology/core#ClinicalOrganization",
"http://vivoweb.org/ontology/core#Committee","Committee", "http://vivoweb.org/ontology/core#College",
"http://vivoweb.org/ontology/core#Company","Company", "http://vivoweb.org/ontology/core#Committee",
"http://vivoweb.org/ontology/core#Consortium","Consortium", "http://vivoweb.org/ontology/core#Company",
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory", "http://vivoweb.org/ontology/core#Consortium",
"http://vivoweb.org/ontology/core#Department","Department", "http://vivoweb.org/ontology/core#CoreLaboratory",
"http://vivoweb.org/ontology/core#Division","Division", "http://vivoweb.org/ontology/core#Department",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit", "http://vivoweb.org/ontology/core#Division",
"http://vivoweb.org/ontology/core#Foundation","Foundation", "http://vivoweb.org/ontology/core#ExtensionUnit",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization", "http://vivoweb.org/ontology/core#Foundation",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency", "http://vivoweb.org/ontology/core#FundingOrganization",
"http://xmlns.com/foaf/0.1/Group","Group", "http://vivoweb.org/ontology/core#GovernmentAgency",
"http://vivoweb.org/ontology/core#Hospital","Hospital", "http://xmlns.com/foaf/0.1/Group",
"http://vivoweb.org/ontology/core#Institute","Institute", "http://vivoweb.org/ontology/core#Hospital",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory", "http://vivoweb.org/ontology/core#Institute",
"http://vivoweb.org/ontology/core#Library","Library", "http://vivoweb.org/ontology/core#Laboratory",
"http://purl.obolibrary.org/obo/OBI_0000835","Manufacturer", "http://vivoweb.org/ontology/core#Library",
"http://vivoweb.org/ontology/core#Museum","Museum", "http://purl.obolibrary.org/obo/OBI_0000835" /* Manufacturer */,
"http://xmlns.com/foaf/0.1/Organization","Organization", "http://vivoweb.org/ontology/core#Museum",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company", "http://xmlns.com/foaf/0.1/Organization",
"http://vivoweb.org/ontology/core#Program","Program", "http://vivoweb.org/ontology/core#PrivateCompany",
"http://vivoweb.org/ontology/core#Publisher","Publisher", "http://vivoweb.org/ontology/core#Program",
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization", "http://vivoweb.org/ontology/core#Publisher",
"http://vivoweb.org/ontology/core#School","School", "http://vivoweb.org/ontology/core#ResearchOrganization",
"http://vivoweb.org/ontology/core#Team","Team", "http://vivoweb.org/ontology/core#School",
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab", "http://vivoweb.org/ontology/core#Team",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization", "http://vivoweb.org/ontology/core#ServiceProvidingLaboratory",
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office", "http://vivoweb.org/ontology/core#StudentOrganization",
"http://vivoweb.org/ontology/core#University","University"); "http://purl.obolibrary.org/obo/ERO_0000565" /* Technology Transfer Office */,
} "http://vivoweb.org/ontology/core#University");
}
@Override @Override
boolean isShowRoleLabelField(){return true;} boolean isShowRoleLabelField(){return true;}

View file

@ -3,8 +3,8 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddOrganizerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddOrganizerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -22,26 +22,27 @@ public class AddOrganizerRoleToPersonGenerator extends AddRoleToPersonTwoStageGe
} }
//Organizer role involves hard-coded options for the "right side" of the role or activity //Organizer role involves hard-coded options for the "right side" of the role or activity
@Override FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"","Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(),
"http://vivoweb.org/ontology/core#Competition", "Competition", "", I18n.bundle(vreq).text("select_type"),
"http://purl.org/ontology/bibo/Conference", "Conference", "http://vivoweb.org/ontology/core#Competition",
"http://vivoweb.org/ontology/core#Course", "Course", "http://purl.org/ontology/bibo/Conference",
"http://purl.org/NET/c4dm/event.owl#Event", "Event", "http://vivoweb.org/ontology/core#Course",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit", "http://purl.org/NET/c4dm/event.owl#Event",
"http://purl.org/ontology/bibo/Hearing", "Hearing", "http://vivoweb.org/ontology/core#Exhibit",
"http://purl.org/ontology/bibo/Interview", "Interview", "http://purl.org/ontology/bibo/Hearing",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk", "http://purl.org/ontology/bibo/Interview",
"http://vivoweb.org/ontology/core#Meeting", "Meeting", "http://vivoweb.org/ontology/core#InvitedTalk",
"http://purl.org/ontology/bibo/Performance", "Performance", "http://vivoweb.org/ontology/core#Meeting",
"http://vivoweb.org/ontology/core#Presentation", "Presentation", "http://purl.org/ontology/bibo/Performance",
"http://purl.org/ontology/bibo/Workshop", "Workshop", "http://vivoweb.org/ontology/core#Presentation",
"http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series", "http://purl.org/ontology/bibo/Workshop",
"http://vivoweb.org/ontology/core#EventSeries", "Event Series", "http://vivoweb.org/ontology/core#ConferenceSeries",
"http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series", "http://vivoweb.org/ontology/core#EventSeries",
"http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series"); "http://vivoweb.org/ontology/core#SeminarSeries",
"http://vivoweb.org/ontology/core#WorkshopSeries");
} }
@Override @Override

View file

@ -3,8 +3,8 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -22,59 +22,60 @@ public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwo
} }
//Outreach Provider role involves hard-coded options for the "right side" of the role or activity //Outreach Provider role involves hard-coded options for the "right side" of the role or activity
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"","Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://vivoweb.org/ontology/core#AcademicDepartment","Academic Department", I18n.bundle(vreq).text("select_type"),
"http://vivoweb.org/ontology/core#Association","Association", "http://vivoweb.org/ontology/core#AcademicDepartment",
"http://vivoweb.org/ontology/core#Center","Center", "http://vivoweb.org/ontology/core#Association",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization", "http://vivoweb.org/ontology/core#Center",
"http://vivoweb.org/ontology/core#College","College", "http://vivoweb.org/ontology/core#ClinicalOrganization",
"http://vivoweb.org/ontology/core#Committee","Committee", "http://vivoweb.org/ontology/core#College",
"http://vivoweb.org/ontology/core#Company","Company", "http://vivoweb.org/ontology/core#Committee",
"http://vivoweb.org/ontology/core#Competition", "Competition", "http://vivoweb.org/ontology/core#Company",
"http://purl.org/ontology/bibo/Conference", "Conference", "http://vivoweb.org/ontology/core#Competition",
"http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series", "http://purl.org/ontology/bibo/Conference",
"http://vivoweb.org/ontology/core#Consortium","Consortium", "http://vivoweb.org/ontology/core#ConferenceSeries",
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory", "http://vivoweb.org/ontology/core#Consortium",
"http://vivoweb.org/ontology/core#Course", "Course", "http://vivoweb.org/ontology/core#CoreLaboratory",
"http://vivoweb.org/ontology/core#Department","Department", "http://vivoweb.org/ontology/core#Course",
"http://vivoweb.org/ontology/core#Division","Division", "http://vivoweb.org/ontology/core#Department",
"http://purl.org/NET/c4dm/event.owl#Event","Event", "http://vivoweb.org/ontology/core#Division",
"http://vivoweb.org/ontology/core#EventSeries", "Event Series", "http://purl.org/NET/c4dm/event.owl#Event",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit", "http://vivoweb.org/ontology/core#EventSeries",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit", "http://vivoweb.org/ontology/core#Exhibit",
"http://vivoweb.org/ontology/core#Foundation","Foundation", "http://vivoweb.org/ontology/core#ExtensionUnit",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization", "http://vivoweb.org/ontology/core#Foundation",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency", "http://vivoweb.org/ontology/core#FundingOrganization",
"http://xmlns.com/foaf/0.1/Group","Group", "http://vivoweb.org/ontology/core#GovernmentAgency",
"http://purl.org/ontology/bibo/Hearing", "Hearing", "http://xmlns.com/foaf/0.1/Group",
"http://vivoweb.org/ontology/core#Hospital","Hospital", "http://purl.org/ontology/bibo/Hearing",
"http://vivoweb.org/ontology/core#Institute","Institute", "http://vivoweb.org/ontology/core#Hospital",
"http://purl.org/ontology/bibo/Interview", "Interview", "http://vivoweb.org/ontology/core#Institute",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk", "http://purl.org/ontology/bibo/Interview",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory", "http://vivoweb.org/ontology/core#InvitedTalk",
"http://vivoweb.org/ontology/core#Library","Library", "http://vivoweb.org/ontology/core#Laboratory",
"http://purl.obolibrary.org/obo/OBI_0000835","Manufacturer", "http://vivoweb.org/ontology/core#Library",
"http://vivoweb.org/ontology/core#Meeting", "Meeting", "http://purl.obolibrary.org/obo/OBI_0000835" /* Manufacturer */,
"http://vivoweb.org/ontology/core#Museum","Museum", "http://vivoweb.org/ontology/core#Meeting",
"http://xmlns.com/foaf/0.1/Organization","Organization", "http://vivoweb.org/ontology/core#Museum",
"http://purl.org/ontology/bibo/Performance", "Performance", "http://xmlns.com/foaf/0.1/Organization",
"http://vivoweb.org/ontology/core#Presentation", "Presentation", "http://purl.org/ontology/bibo/Performance",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company", "http://vivoweb.org/ontology/core#Presentation",
"http://vivoweb.org/ontology/core#Program","Program", "http://vivoweb.org/ontology/core#PrivateCompany",
"http://vivoweb.org/ontology/core#Publisher","Publisher", "http://vivoweb.org/ontology/core#Program",
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization", "http://vivoweb.org/ontology/core#Publisher",
"http://vivoweb.org/ontology/core#School","School", "http://vivoweb.org/ontology/core#ResearchOrganization",
"http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series", "http://vivoweb.org/ontology/core#School",
"http://vivoweb.org/ontology/core#Team","Team", "http://vivoweb.org/ontology/core#SeminarSeries",
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab", "http://vivoweb.org/ontology/core#Team",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization", "http://vivoweb.org/ontology/core#ServiceProvidingLaboratory",
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office", "http://vivoweb.org/ontology/core#StudentOrganization",
"http://vivoweb.org/ontology/core#University","University", "http://purl.obolibrary.org/obo/ERO_0000565" /*Technology Transfer Office*/,
"http://purl.org/ontology/bibo/Workshop", "Workshop", "http://vivoweb.org/ontology/core#University",
"http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series"); "http://purl.org/ontology/bibo/Workshop",
"http://vivoweb.org/ontology/core#WorkshopSeries");
} }
@Override @Override

View file

@ -29,8 +29,10 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisio
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess; import edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode;
import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
@ -624,7 +626,8 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
private void setFields(EditConfigurationVTwo editConfiguration, VitroRequest vreq) throws Exception { private void setFields(EditConfigurationVTwo editConfiguration, VitroRequest vreq) throws Exception {
setTitleField(editConfiguration); setTitleField(editConfiguration);
setPubTypeField(editConfiguration); //UQAM-Linguistic-Management needs for getting appropriated value in the linguistic context
setPubTypeField(editConfiguration, vreq);
setPubUriField(editConfiguration); setPubUriField(editConfiguration);
setCollectionLabelField(editConfiguration); setCollectionLabelField(editConfiguration);
setCollectionDisplayField(editConfiguration); setCollectionDisplayField(editConfiguration);
@ -664,13 +667,14 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
setRangeDatatypeUri(stringDatatypeUri)); setRangeDatatypeUri(stringDatatypeUri));
} }
private void setPubTypeField(EditConfigurationVTwo editConfiguration) throws Exception { //UQAM-Linguistic-Management add vreq to get linguistic context
editConfiguration.addField(new FieldVTwo(). private void setPubTypeField(EditConfigurationVTwo editConfiguration, VitroRequest vreq) throws Exception {
setName("pubType"). editConfiguration.addField(new FieldVTwo().
setValidators( list("nonempty") ). setName("pubType").
setOptions( new ConstantFieldOptions("pubType", getPublicationTypeLiteralOptions() )) setValidators( list("nonempty") ).
); setOptions( getPublicationTypeLiteralOptions(vreq) )
} );
}
private void setPubUriField(EditConfigurationVTwo editConfiguration) { private void setPubUriField(EditConfigurationVTwo editConfiguration) {
editConfiguration.addField(new FieldVTwo(). editConfiguration.addField(new FieldVTwo().
@ -886,39 +890,40 @@ public class AddPublicationToPersonGenerator extends VivoBaseGenerator implement
); );
} }
private List<List<String>> getPublicationTypeLiteralOptions() { private FieldOptions getPublicationTypeLiteralOptions(VitroRequest vreq) throws Exception {
List<List<String>> literalOptions = new ArrayList<List<String>>(); return GeneratorUtil.buildResourceAndLabelFieldOptions(
literalOptions.add(list("http://vivoweb.org/ontology/core#Abstract", "Abstract")); vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
literalOptions.add(list("http://purl.org/ontology/bibo/AcademicArticle", "Academic Article")); I18n.bundle(vreq).text("select_type"),
literalOptions.add(list("http://purl.org/ontology/bibo/Article", "Article")); "http://vivoweb.org/ontology/core#Abstract",
literalOptions.add(list("http://purl.org/ontology/bibo/AudioDocument", "Audio Document")); "http://purl.org/ontology/bibo/AcademicArticle",
literalOptions.add(list("http://vivoweb.org/ontology/core#BlogPosting", "Blog Posting")); "http://purl.org/ontology/bibo/Article",
literalOptions.add(list("http://purl.org/ontology/bibo/Book", "Book")); "http://purl.org/ontology/bibo/AudioDocument",
literalOptions.add(list("http://vivoweb.org/ontology/core#CaseStudy", "Case Study")); "http://vivoweb.org/ontology/core#BlogPosting",
literalOptions.add(list("http://vivoweb.org/ontology/core#Catalog", "Catalog")); "http://purl.org/ontology/bibo/Book",
literalOptions.add(list("http://purl.org/ontology/bibo/Chapter", "Chapter")); "http://vivoweb.org/ontology/core#CaseStudy",
literalOptions.add(list("http://vivoweb.org/ontology/core#ConferencePaper", "Conference Paper")); "http://vivoweb.org/ontology/core#Catalog",
literalOptions.add(list("http://vivoweb.org/ontology/core#ConferencePoster", "Conference Poster")); "http://purl.org/ontology/bibo/Chapter",
literalOptions.add(list("http://vivoweb.org/ontology/core#Database", "Database")); "http://vivoweb.org/ontology/core#ConferencePaper",
literalOptions.add(list("http://vivoweb.org/ontology/core#Dataset", "Dataset")); "http://vivoweb.org/ontology/core#ConferencePoster",
literalOptions.add(list("http://purl.org/ontology/bibo/EditedBook", "Edited Book")); "http://vivoweb.org/ontology/core#Database",
literalOptions.add(list("http://vivoweb.org/ontology/core#EditorialArticle", "Editorial Article")); "http://vivoweb.org/ontology/core#Dataset",
literalOptions.add(list("http://purl.org/ontology/bibo/Film", "Film")); "http://purl.org/ontology/bibo/EditedBook",
literalOptions.add(list("http://vivoweb.org/ontology/core#Newsletter", "Newsletter")); "http://vivoweb.org/ontology/core#EditorialArticle",
literalOptions.add(list("http://vivoweb.org/ontology/core#NewsRelease", "News Release")); "http://purl.org/ontology/bibo/Film",
literalOptions.add(list("http://purl.org/ontology/bibo/Patent", "Patent")); "http://vivoweb.org/ontology/core#Newsletter",
literalOptions.add(list("http://purl.obolibrary.org/obo/OBI_0000272", "Protocol")); "http://vivoweb.org/ontology/core#NewsRelease",
literalOptions.add(list("http://purl.org/ontology/bibo/Report", "Report")); "http://purl.org/ontology/bibo/Patent",
literalOptions.add(list("http://vivoweb.org/ontology/core#ResearchProposal", "Research Proposal")); "http://purl.obolibrary.org/obo/OBI_0000272",
literalOptions.add(list("http://vivoweb.org/ontology/core#Review", "Review")); "http://purl.org/ontology/bibo/Report",
literalOptions.add(list("http://purl.obolibrary.org/obo/ERO_0000071 ", "Software")); "http://vivoweb.org/ontology/core#ResearchProposal",
literalOptions.add(list("http://vivoweb.org/ontology/core#Speech", "Speech")); "http://vivoweb.org/ontology/core#Review",
literalOptions.add(list("http://purl.org/ontology/bibo/Thesis", "Thesis")); "http://purl.obolibrary.org/obo/ERO_0000071 ",
literalOptions.add(list("http://vivoweb.org/ontology/core#Video", "Video")); "http://vivoweb.org/ontology/core#Speech",
literalOptions.add(list("http://purl.org/ontology/bibo/Webpage", "Webpage")); "http://purl.org/ontology/bibo/Thesis",
literalOptions.add(list("http://purl.org/ontology/bibo/Website", "Website")); "http://vivoweb.org/ontology/core#Video",
literalOptions.add(list("http://vivoweb.org/ontology/core#WorkingPaper", "Working Paper")); "http://purl.org/ontology/bibo/Webpage",
return literalOptions; "http://purl.org/ontology/bibo/Website",
"http://vivoweb.org/ontology/core#WorkingPaper");
} }
//Form specific data //Form specific data

View file

@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -23,12 +24,13 @@ public class AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageG
/** Researcher role involves hard-coded options for the "right side" of the role or activity. */ /** Researcher role involves hard-coded options for the "right side" of the role or activity. */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"", "Select one", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://vivoweb.org/ontology/core#Grant", "Grant", I18n.bundle(vreq).text("select_type"),
"http://purl.obolibrary.org/obo/ERO_0000015", "Human Study", "http://vivoweb.org/ontology/core#Grant",
"http://vivoweb.org/ontology/core#Project", "Project", "http://purl.obolibrary.org/obo/ERO_0000015" /* Human Study" */,
"http://purl.obolibrary.org/obo/ERO_0000014", "Research Project"); "http://vivoweb.org/ontology/core#Project",
"http://purl.obolibrary.org/obo/ERO_0000014" /* Research Project */);
} }
@Override @Override

View file

@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -32,80 +33,80 @@ public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
* Each subclass generator will return its own type of option here: * Each subclass generator will return its own type of option here:
* whether literal hardcoded, based on class group, or subclasses of a specific class * whether literal hardcoded, based on class group, or subclasses of a specific class
*/ */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"", "Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://purl.org/ontology/bibo/AcademicArticle", "Academic Article", I18n.bundle(vreq).text("select_type"),
"http://purl.org/ontology/bibo/Article", "Article", "http://purl.org/ontology/bibo/AcademicArticle",
"http://purl.org/ontology/bibo/AudioDocument", "Audio Document", "http://purl.org/ontology/bibo/Article",
"http://purl.org/ontology/bibo/AudioVisualDocument", "Audio-Visual Document", "http://purl.org/ontology/bibo/AudioDocument",
"http://purl.org/ontology/bibo/Bill", "Bill", "http://purl.org/ontology/bibo/AudioVisualDocument",
"http://vivoweb.org/ontology/core#Blog", "Blog", "http://purl.org/ontology/bibo/Bill",
"http://vivoweb.org/ontology/core#BlogPosting", "Blog Posting", "http://vivoweb.org/ontology/core#Blog",
"http://purl.org/ontology/bibo/Book", "Book", "http://vivoweb.org/ontology/core#BlogPosting",
"http://purl.org/ontology/bibo/BookSection", "Book Section", "http://purl.org/ontology/bibo/Book",
"http://purl.org/ontology/bibo/Brief", "Brief", "http://purl.org/ontology/bibo/BookSection",
"http://vivoweb.org/ontology/core#CaseStudy", "Case Study", "http://purl.org/ontology/bibo/Brief",
"http://vivoweb.org/ontology/core#Catalog", "Catalog", "http://vivoweb.org/ontology/core#CaseStudy",
"http://purl.org/ontology/bibo/Chapter", "Chapter", "http://vivoweb.org/ontology/core#Catalog",
"http://purl.org/spar/fabio/ClinicalGuideline", "Clinical Guideline", "http://purl.org/ontology/bibo/Chapter",
"http://purl.org/ontology/bibo/Code", "Code", "http://purl.org/spar/fabio/ClinicalGuideline",
"http://purl.org/ontology/bibo/CollectedDocument", "Collected Document", "http://purl.org/ontology/bibo/Code",
"http://purl.org/spar/fabio/Comment", "Comment", "http://purl.org/ontology/bibo/CollectedDocument",
"http://vivoweb.org/ontology/core#ConferencePaper", "Conference Paper", "http://purl.org/spar/fabio/Comment",
"http://vivoweb.org/ontology/core#ConferencePoster", "Conference Poster", "http://vivoweb.org/ontology/core#ConferencePaper",
"http://purl.org/ontology/bibo/CourtReporter", "Court Reporter", "http://vivoweb.org/ontology/core#ConferencePoster",
"http://vivoweb.org/ontology/core#Database", "Database", "http://purl.org/ontology/bibo/CourtReporter",
"http://purl.org/ontology/bibo/LegalDecision", "Decision", "http://vivoweb.org/ontology/core#Database",
"http://purl.org/ontology/bibo/DocumentPart", "Document Part", "http://purl.org/ontology/bibo/LegalDecision",
"http://purl.org/ontology/bibo/EditedBook", "Edited Book", "http://purl.org/ontology/bibo/DocumentPart",
"http://vivoweb.org/ontology/core#EditorialArticle", "Editorial Article", "http://purl.org/ontology/bibo/EditedBook",
"http://purl.org/spar/fabio/Erratum", "Erratum", "http://vivoweb.org/ontology/core#EditorialArticle",
"http://purl.org/ontology/bibo/Excerpt", "Excerpt", "http://purl.org/spar/fabio/Erratum",
"http://purl.org/ontology/bibo/Film", "Film", "http://purl.org/ontology/bibo/Excerpt",
"http://purl.org/ontology/bibo/Image", "Image", "http://purl.org/ontology/bibo/Film",
"http://purl.org/ontology/bibo/Issue", "Issue", "http://purl.org/ontology/bibo/Image",
"http://purl.org/ontology/bibo/Journal", "Journal", "http://purl.org/ontology/bibo/Issue",
"http://purl.obolibrary.org/obo/IAO_0000013", "Journal Article", "http://purl.org/ontology/bibo/Journal",
"http://purl.org/ontology/bibo/LegalCaseDocument", "Legal Case Document", "http://purl.obolibrary.org/obo/IAO_0000013" /* "Journal Article" */,
"http://purl.org/ontology/bibo/LegalDocument", "Legal Document", "http://purl.org/ontology/bibo/LegalCaseDocument",
"http://purl.org/ontology/bibo/Legislation", "Legislation", "http://purl.org/ontology/bibo/LegalDocument",
"http://purl.org/ontology/bibo/Letter", "Letter", "http://purl.org/ontology/bibo/Legislation",
"http://purl.org/ontology/bibo/Magazine", "Magazine", "http://purl.org/ontology/bibo/Letter",
"http://purl.org/ontology/bibo/Manual", "Manual", "http://purl.org/ontology/bibo/Magazine",
"http://purl.org/ontology/bibo/Manuscript", "Manuscript", "http://purl.org/ontology/bibo/Manual",
"http://purl.org/ontology/bibo/Map", "Map", "http://purl.org/ontology/bibo/Manuscript",
"http://vivoweb.org/ontology/core#Newsletter", "Newsletter", "http://purl.org/ontology/bibo/Map",
"http://purl.org/ontology/bibo/Newspaper", "Newspaper", "http://vivoweb.org/ontology/core#Newsletter",
"http://vivoweb.org/ontology/core#NewsRelease", "News Release", "http://purl.org/ontology/bibo/Newspaper",
"http://purl.org/ontology/bibo/Note", "Note", "http://vivoweb.org/ontology/core#NewsRelease",
"http://purl.org/ontology/bibo/Patent", "Patent", "http://purl.org/ontology/bibo/Note",
"http://purl.org/ontology/bibo/Periodical", "Periodical", "http://purl.org/ontology/bibo/Patent",
"http://purl.org/ontology/bibo/PersonalCommunicationDocument", "Personal Communication Document", "http://purl.org/ontology/bibo/Periodical",
"http://purl.org/ontology/bibo/Proceedings", "Proceedings", "http://purl.org/ontology/bibo/PersonalCommunicationDocument",
"http://purl.obolibrary.org/obo/OBI_0000272", "protocol", "http://purl.org/ontology/bibo/Proceedings",
"http://purl.org/ontology/bibo/Quote", "Quote", "http://purl.obolibrary.org/obo/OBI_0000272" /* Protocol" */,
"http://purl.org/ontology/bibo/ReferenceSource", "Reference Source", "http://purl.org/ontology/bibo/Quote",
"http://purl.org/ontology/bibo/Report", "Report", "http://purl.org/ontology/bibo/ReferenceSource",
"http://vivoweb.org/ontology/core#ResearchProposal", "Research Proposal", "http://purl.org/ontology/bibo/Report",
"http://vivoweb.org/ontology/core#Review", "Review", "http://vivoweb.org/ontology/core#ResearchProposal",
"http://vivoweb.org/ontology/core#Score", "Score", "http://vivoweb.org/ontology/core#Review",
"http://vivoweb.org/ontology/core#Screenplay", "Screenplay", "http://vivoweb.org/ontology/core#Score",
"http://purl.org/ontology/bibo/Series", "Series", "http://vivoweb.org/ontology/core#Screenplay",
"http://purl.org/ontology/bibo/Slide", "Slide", "http://purl.org/ontology/bibo/Series",
"http://purl.org/ontology/bibo/Slideshow", "Slideshow", "http://purl.org/ontology/bibo/Slide",
"http://vivoweb.org/ontology/core#Speech", "Speech", "http://purl.org/ontology/bibo/Slideshow",
"http://purl.org/ontology/bibo/Standard", "Standard", "http://vivoweb.org/ontology/core#Speech",
"http://purl.org/ontology/bibo/Statute", "Statute", "http://purl.org/ontology/bibo/Standard",
"http://purl.org/ontology/bibo/Thesis", "Thesis", "http://purl.org/ontology/bibo/Statute",
"http://vivoweb.org/ontology/core#Translation", "Translation", "http://purl.org/ontology/bibo/Thesis",
"http://vivoweb.org/ontology/core#Video", "Video", "http://vivoweb.org/ontology/core#Translation",
"http://purl.org/ontology/bibo/Webpage", "Webpage", "http://vivoweb.org/ontology/core#Video",
"http://purl.org/ontology/bibo/Website", "Website", "http://purl.org/ontology/bibo/Webpage",
"http://vivoweb.org/ontology/core#WorkingPaper", "Working Paper" "http://purl.org/ontology/bibo/Website",
); "http://vivoweb.org/ontology/core#WorkingPaper");
} }
//isShowRoleLabelField remains true for this so doesn't need to be overwritten //isShowRoleLabelField remains true for this so doesn't need to be overwritten
public boolean isShowRoleLabelField() { public boolean isShowRoleLabelField() {

View file

@ -415,7 +415,7 @@ public abstract class AddRoleToPersonTwoStageGenerator extends BaseEditConfigura
//make list of type URIs from options, this can be called with null since //make list of type URIs from options, this can be called with null since
//ConstantFieldOptions doesn't use any of the arguments. //ConstantFieldOptions doesn't use any of the arguments.
Map<String,String> options = fieldOptions.getOptions(null, null, null) ; Map<String,String> options = fieldOptions.getOptions(null, null, null, null) ;
if (options != null && options.size() > 0) { if (options != null && options.size() > 0) {
List<String> typeUris = new ArrayList<String>(); List<String> typeUris = new ArrayList<String>();

View file

@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
@ -17,63 +18,63 @@ public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoS
String getRoleType() { String getRoleType() {
return "http://purl.obolibrary.org/obo/ERO_0000012"; return "http://purl.obolibrary.org/obo/ERO_0000012";
} }
/** Service Provider role involves hard-coded options for the
* "right side" of the role or activity. */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return GeneratorUtil.buildResourceAndLabelFieldOptions(
"","Select type", vreq.getRDFService(), vreq.getWebappDaoFactory(), "",
"http://vivoweb.org/ontology/core#AcademicDepartment","Academic Department", I18n.bundle(vreq).text("select_type"),
"http://vivoweb.org/ontology/core#Association","Association", "","Select type",
"http://vivoweb.org/ontology/core#Center","Center", "http://vivoweb.org/ontology/core#AcademicDepartment",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization", "http://vivoweb.org/ontology/core#Association",
"http://vivoweb.org/ontology/core#College","College", "http://vivoweb.org/ontology/core#Center",
"http://vivoweb.org/ontology/core#Committee","Committee", "http://vivoweb.org/ontology/core#ClinicalOrganization",
"http://vivoweb.org/ontology/core#Company","Company", "http://vivoweb.org/ontology/core#College",
"http://vivoweb.org/ontology/core#Competition", "Competition", "http://vivoweb.org/ontology/core#Committee",
"http://purl.org/ontology/bibo/Conference", "Conference", "http://vivoweb.org/ontology/core#Company",
"http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series", "http://vivoweb.org/ontology/core#Competition",
"http://vivoweb.org/ontology/core#Consortium","Consortium", "http://purl.org/ontology/bibo/Conference",
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory", "http://vivoweb.org/ontology/core#ConferenceSeries",
"http://vivoweb.org/ontology/core#Course", "Course", "http://vivoweb.org/ontology/core#Consortium",
"http://vivoweb.org/ontology/core#Department","Department", "http://vivoweb.org/ontology/core#CoreLaboratory",
"http://vivoweb.org/ontology/core#Division","Division", "http://vivoweb.org/ontology/core#Course",
"http://purl.org/NET/c4dm/event.owl#Event","Event", "http://vivoweb.org/ontology/core#Department",
"http://vivoweb.org/ontology/core#EventSeries", "Event Series", "http://vivoweb.org/ontology/core#Division",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit", "http://purl.org/NET/c4dm/event.owl#Event",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit", "http://vivoweb.org/ontology/core#EventSeries",
"http://vivoweb.org/ontology/core#Foundation","Foundation", "http://vivoweb.org/ontology/core#Exhibit",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization", "http://vivoweb.org/ontology/core#ExtensionUnit",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency", "http://vivoweb.org/ontology/core#Foundation",
"http://xmlns.com/foaf/0.1/Group","Group", "http://vivoweb.org/ontology/core#FundingOrganization",
"http://purl.org/ontology/bibo/Hearing", "Hearing", "http://vivoweb.org/ontology/core#GovernmentAgency",
"http://vivoweb.org/ontology/core#Hospital","Hospital", "http://xmlns.com/foaf/0.1/Group",
"http://vivoweb.org/ontology/core#Institute","Institute", "http://purl.org/ontology/bibo/Hearing",
"http://purl.org/ontology/bibo/Interview", "Interview", "http://vivoweb.org/ontology/core#Hospital",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk", "http://vivoweb.org/ontology/core#Institute",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory", "http://purl.org/ontology/bibo/Interview",
"http://vivoweb.org/ontology/core#Library","Library", "http://vivoweb.org/ontology/core#InvitedTalk",
"http://purl.obolibrary.org/obo/OBI_0000835","Manufacturer", "http://vivoweb.org/ontology/core#Laboratory",
"http://vivoweb.org/ontology/core#Meeting", "Meeting", "http://vivoweb.org/ontology/core#Library",
"http://vivoweb.org/ontology/core#Museum","Museum", "http://purl.obolibrary.org/obo/OBI_0000835" /* Manufacturer */,
"http://xmlns.com/foaf/0.1/Organization","Organization", "http://vivoweb.org/ontology/core#Meeting",
"http://purl.org/ontology/bibo/Performance", "Performance", "http://vivoweb.org/ontology/core#Museum",
"http://vivoweb.org/ontology/core#Presentation", "Presentation", "http://xmlns.com/foaf/0.1/Organization",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company", "http://purl.org/ontology/bibo/Performance",
"http://vivoweb.org/ontology/core#Program","Program", "http://vivoweb.org/ontology/core#Presentation",
"http://vivoweb.org/ontology/core#Publisher","Publisher", "http://vivoweb.org/ontology/core#PrivateCompany",
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization", "http://vivoweb.org/ontology/core#Program",
"http://vivoweb.org/ontology/core#School","School", "http://vivoweb.org/ontology/core#Publisher",
"http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series", "http://vivoweb.org/ontology/core#ResearchOrganization",
"http://vivoweb.org/ontology/core#Team","Team", "http://vivoweb.org/ontology/core#School",
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab", "http://vivoweb.org/ontology/core#SeminarSeries",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization", "http://vivoweb.org/ontology/core#Team",
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office", "http://vivoweb.org/ontology/core#ServiceProvidingLaboratory",
"http://vivoweb.org/ontology/core#University","University", "http://vivoweb.org/ontology/core#StudentOrganization",
"http://purl.org/ontology/bibo/Workshop", "Workshop", "http://purl.obolibrary.org/obo/ERO_0000565" /* Technology Transfer Office" */,
"http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series"); "http://vivoweb.org/ontology/core#University",
} "http://purl.org/ontology/bibo/Workshop",
"http://vivoweb.org/ontology/core#WorkshopSeries");
}
@Override @Override
boolean isShowRoleLabelField(){return true;} boolean isShowRoleLabelField(){return true;}

View file

@ -0,0 +1,127 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.vocabulary.RDFS;
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
public class GeneratorUtil {
private static final Log log = LogFactory.getLog(GeneratorUtil.class);
/**
* Build a field options list of resource URIs paired with their labels as
* retrieved from the supplied RDFService.
*
* @param rdfService from which to retrieve labels: this should typically
* be a LanguageFilteringRDFService.
*
* @param webappDaoFactory may be null. If non-null, labels for classes will be
* returned from here first before consulting
* rdfService.
*
* @param headerValue optional value for first value/label pair in the
* options list before appending the URIs with their
* labels. May be null. Example: empty string
*
* @param headerLabel optional label for first value/label pair in the
* options list before appending the URIs with their
* labels. May be null. Example: "Select type"
*
* @param resourceURIs variable list of resource URI strings
*
* @return empty ConstantFieldOptions list if resourceURIs is null or empty or
* if rdfService is null
* @throws RDFServiceException from the supplied rdfService
* @throws Exception from ConstantFieldOptions constructor
*/
public static ConstantFieldOptions buildResourceAndLabelFieldOptions(
RDFService rdfService, WebappDaoFactory webappDaoFactory, String headerValue,
String headerLabel, String ... resourceURIs) throws Exception {
if(resourceURIs == null || resourceURIs.length == 0 || rdfService == null) {
return new ConstantFieldOptions();
}
List<String> options = new ArrayList<String>();
if(headerValue != null && headerLabel != null) {
options.add(headerValue);
options.add(headerLabel);
}
IRIFactory iriFactory = IRIFactory.iriImplementation();
for(String resourceURI : resourceURIs) {
IRI iri = iriFactory.create(resourceURI);
if(iri.hasViolation(false)) {
log.warn("Not adding invalid URI " + resourceURI
+ " to field options list");
} else {
String label = getLabel(iri, rdfService, webappDaoFactory);
if(!StringUtils.isEmpty(label)) {
options.add(iri.toString());
options.add(label);
}
}
}
return new ConstantFieldOptions(options.toArray(
new String[options.size()]));
}
/**
* Retrieve label for iri from webappDaoFactory if available and iri is
* for a VClass, otherwise retrieve lowest-sorting rdfs:label for iri from
* rdfService
* @param iri may not be null
* @param rdfService may not be null
*/
private static String getLabel(IRI iri, RDFService rdfService,
WebappDaoFactory webappDaoFactory) throws RDFServiceException {
// Try the WebappDaoFactory for class labels that exist only in
// "everytime" and do not show up in the RDFService.
if(webappDaoFactory != null) {
VClass vclass = webappDaoFactory.getVClassDao().getVClassByURI(
iri.toString());
if(vclass != null) {
return vclass.getLabel();
}
}
StringBuilder select = new StringBuilder("SELECT ?label WHERE { \n");
select.append(" <" + iri + "> <" + RDFS.label.getURI() + "> ?label \n");
select.append("} ORDER BY ?label");
LabelConsumer labelConsumer = new LabelConsumer();
rdfService.sparqlSelectQuery(select.toString(), labelConsumer);
return labelConsumer.getLabel();
}
private static class LabelConsumer extends ResultSetConsumer {
private String label;
@Override
protected void processQuerySolution(QuerySolution qsoln) {
if(label != null) {
return;
// keep only the first value returned in the result set
}
if(qsoln.contains("label") && qsoln.get("label").isLiteral()) {
label = qsoln.getLiteral("label").getLexicalForm();
}
}
public String getLabel() {
return label;
}
}
}

View file

@ -19,6 +19,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode;
import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class GrantHasContributorGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{ public class GrantHasContributorGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{
@ -92,7 +93,7 @@ public class GrantHasContributorGenerator extends VivoBaseGenerator implements
//Add validator //Add validator
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new FirstAndLastNameValidator("existingPerson")); conf.addValidator(new FirstAndLastNameValidator("existingPerson", I18n.bundle(vreq)));
//Adding additional data, specifically edit mode //Adding additional data, specifically edit mode
addFormSpecificData(conf, vreq); addFormSpecificData(conf, vreq);

View file

@ -267,6 +267,19 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat
config.addFormSpecificData("selectLocale",availableLocalesForAdd); config.addFormSpecificData("selectLocale",availableLocalesForAdd);
config.addFormSpecificData("displayRemoveLink", (numberExistingLabels > 1)); config.addFormSpecificData("displayRemoveLink", (numberExistingLabels > 1));
// get current selected locale
String rangeLang = vreq.getLocale().getLanguage();
if (!vreq.getLocale().getCountry().isEmpty()) {
rangeLang += "-" + vreq.getLocale().getCountry();
}
// check if locale already has an entry (label)
boolean localeEntryExisting = true;
for (HashMap<String, String> tmp : availableLocalesForAdd) {
if (tmp.get("code").equals(rangeLang)) localeEntryExisting = false;
}
config.addFormSpecificData("localeEntryExisting", localeEntryExisting);
config.addFormSpecificData("currentSelectedLocale", rangeLang);
//How do we edit? Will need to see //How do we edit? Will need to see
config.addFormSpecificData("deleteWebpageUrl", "/edit/primitiveDelete"); config.addFormSpecificData("deleteWebpageUrl", "/edit/primitiveDelete");

View file

@ -3,20 +3,20 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.jena.query.ParameterizedSparqlString;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QuerySolution; import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ResultSet; import org.apache.jena.query.ResultSet;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.RDFNode; import org.apache.jena.rdf.model.RDFNode;
import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.beans.Individual;
@ -26,6 +26,8 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMa
import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.i18n.selection.SelectedLocale;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
/** /**
* This is an odd controller that is just drawing a page with links on it. * This is an odd controller that is just drawing a page with links on it.
@ -153,16 +155,36 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG
+ "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> \n" + "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n" + "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "SELECT DISTINCT ?vcard ?link ?url ?rank ?typeLabel (group_concat(distinct ?linkLabel;separator=\"/\") as ?label) WHERE { \n" + "SELECT DISTINCT ?vcard ?link ?url (MIN(?rank_) AS ?rank) \n"
+ "(MIN(?typeLabel_) AS ?typeLabel) \n"
+ "(group_concat(distinct ?linkLabel;separator=\"/\") as ?label) WHERE { \n"
+ " ?subject <http://purl.obolibrary.org/obo/ARG_2000028> ?vcard . \n" + " ?subject <http://purl.obolibrary.org/obo/ARG_2000028> ?vcard . \n"
+ " ?vcard vcard:hasURL ?link . \n" + " ?vcard vcard:hasURL ?link . \n"
+ " ?link a vcard:URL \n" + " ?link a vcard:URL \n"
+ " OPTIONAL { ?link vcard:url ?url } \n" + " OPTIONAL { ?link vcard:url ?url } \n"
+ " OPTIONAL { ?link rdfs:label ?linkLabel } \n" + " OPTIONAL { ?link rdfs:label ?linkLabel } \n"
+ " OPTIONAL { ?link core:rank ?rank } \n" + " OPTIONAL { ?link core:rank ?rank_ } \n"
+ " OPTIONAL { ?link vitro:mostSpecificType ?type } \n" + " OPTIONAL { ?link vitro:mostSpecificType ?type } \n"
+ " OPTIONAL { ?type rdfs:label ?typeLabel } \n" // UQAM-Linguistic-Management Add linguistic control on label
+ "} GROUP BY ?rank ?vcard ?link ?url ?typeLabel \n" // Try full locale
+ " OPTIONAL { ?type rdfs:label ?typeLabelPrimary . \n"
+ " FILTER (LANG(?typeLabelPrimary) = ?locale) \n"
+ " } \n"
// Try language only
+ " OPTIONAL { ?type rdfs:label ?typeLabelSecondary . \n"
+ " FILTER (LANG(?typeLabelSecondary) = ?language) \n"
+ " } \n"
// Try the same language in another other locale
+ " OPTIONAL { ?type rdfs:label ?typeLabelTertiary . \n"
+ " FILTER (STRBEFORE(STR(LANG(?typeLabelTertiary)), \"-\") = ?language) \n"
+ " } \n"
// Try any other available label
+ " OPTIONAL { ?type rdfs:label ?typeLabelFallback . \n"
+ " FILTER (LANG(?typeLabelFallback) != ?locale \n"
+ " && LANG(?typeLabelFallback) != ?language) \n"
+ " } \n"
+ " BIND(COALESCE(?typeLabelPrimary, ?typeLabelSecondary, ?typeLabelTertiary, ?typeLabelFallback) AS ?typeLabel_) \n"
+ "} GROUP BY ?vcard ?link ?url \n"
+ " ORDER BY ?rank"; + " ORDER BY ?rank";
@ -175,8 +197,10 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG
Model constructedModel = ModelFactory.createDefaultModel(); Model constructedModel = ModelFactory.createDefaultModel();
rdfService.sparqlConstructQuery(constructStr, constructedModel); rdfService.sparqlConstructQuery(constructStr, constructedModel);
/*
String queryStr = QueryUtils.subUriForQueryVar(this.getQuery(), "subject", subjectUri); * UQAM-Linguistic-Management Adjust the getQuery signature for managing the linguistic context
*/
String queryStr = QueryUtils.subUriForQueryVar(this.getQuery(vreq), "subject", subjectUri);
log.debug("Query string is: " + queryStr); log.debug("Query string is: " + queryStr);
QueryExecution qe = QueryExecutionFactory.create(queryStr, constructedModel); QueryExecution qe = QueryExecutionFactory.create(queryStr, constructedModel);
@ -205,8 +229,16 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG
return AddEditWebpageFormGenerator.class.getName(); return AddEditWebpageFormGenerator.class.getName();
} }
protected String getQuery() { protected String getQuery(VitroRequest vreq) {
return WEBPAGE_QUERY; /*
* UQAM-Linguistic-Management Adjust the query to the linguistic context
*/
Locale locale = SelectedLocale.getCurrentLocale(vreq);
ParameterizedSparqlString queryPstr = new ParameterizedSparqlString(
WEBPAGE_QUERY);
queryPstr.setLiteral("locale", locale.toString().replace("_", "-"));
queryPstr.setLiteral("language", locale.getLanguage());
return queryPstr.toString();
} }
protected String getTemplate() { protected String getTemplate() {

View file

@ -22,6 +22,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsVi
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode;
import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class OrganizationForTrainingGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{ public class OrganizationForTrainingGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{
@ -166,7 +167,7 @@ public class OrganizationForTrainingGenerator extends VivoBaseGenerator impleme
//Add validator //Add validator
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new FirstAndLastNameValidator("existingPerson")); conf.addValidator(new FirstAndLastNameValidator("existingPerson", I18n.bundle(vreq)));
//Adding additional data, specifically edit mode //Adding additional data, specifically edit mode
addFormSpecificData(conf, vreq); addFormSpecificData(conf, vreq);

View file

@ -17,6 +17,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisio
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator
implements EditConfigurationGenerator { implements EditConfigurationGenerator {
@ -256,7 +257,7 @@ public class OrganizationHasPositionHistoryGenerator extends VivoBaseGenerator
conf.addField(endField.setEditElement(new DateTimeWithPrecisionVTwo( conf.addField(endField.setEditElement(new DateTimeWithPrecisionVTwo(
endField, URI_PRECISION_YEAR, URI_PRECISION_NONE))); endField, URI_PRECISION_YEAR, URI_PRECISION_NONE)));
conf.addValidator(new FirstAndLastNameValidator("existingPerson")); conf.addValidator(new FirstAndLastNameValidator("existingPerson", I18n.bundle(vreq)));
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new DateTimeIntervalValidationVTwo("startField", conf.addValidator(new DateTimeIntervalValidationVTwo("startField",
"endField")); "endField"));

View file

@ -20,6 +20,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClasses
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator implements public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator implements
EditConfigurationGenerator { EditConfigurationGenerator {
@ -184,7 +185,7 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new FirstAndLastNameValidator("existingAdvisor")); conf.addValidator(new FirstAndLastNameValidator("existingAdvisor", I18n.bundle(vreq)));
addFormSpecificData(conf, vreq); addFormSpecificData(conf, vreq);
prepare(vreq, conf); prepare(vreq, conf);

View file

@ -20,6 +20,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClasses
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator implements public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator implements
EditConfigurationGenerator { EditConfigurationGenerator {
@ -184,7 +185,7 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField"));
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new FirstAndLastNameValidator("existingAdvisee")); conf.addValidator(new FirstAndLastNameValidator("existingAdvisee", I18n.bundle(vreq)));
addFormSpecificData(conf, vreq); addFormSpecificData(conf, vreq);
prepare(vreq, conf); prepare(vreq, conf);

View file

@ -17,6 +17,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode;
import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils; import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
public class ProjectHasParticipantGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{ public class ProjectHasParticipantGenerator extends VivoBaseGenerator implements EditConfigurationGenerator{
@ -92,7 +93,7 @@ public class ProjectHasParticipantGenerator extends VivoBaseGenerator implement
//Add validator //Add validator
conf.addValidator(new AntiXssValidation()); conf.addValidator(new AntiXssValidation());
conf.addValidator(new FirstAndLastNameValidator("existingPerson")); conf.addValidator(new FirstAndLastNameValidator("existingPerson", I18n.bundle(vreq)));
//Adding additional data, specifically edit mode //Adding additional data, specifically edit mode
addFormSpecificData(conf, vreq); addFormSpecificData(conf, vreq);

View file

@ -0,0 +1,36 @@
package edu.cornell.mannlib.vitro.webapp.utilities;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.ontology.OntModel;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.rdf.model.Statement;
import org.apache.jena.rdf.model.StmtIterator;
import org.apache.jena.vocabulary.RDFS;
public class Describe {
private static final Log log = LogFactory.getLog(Describe.class.getName());
public static void main(String[] args) {
OntModel model = ModelFactory.createOntologyModel();
model.read("C:\\VIVO-Trad-ecosysteme\\vivo\\home\\rdf\\applicationMetadata\\firsttime\\classgroups_fr_CA.rdf") ;
model.read("C:\\VIVO-Trad-ecosysteme\\vivo\\home\\rdf\\applicationMetadata\\firsttime\\classgroups.rdf") ;
Describe.showVitroClassGroupequipmentLabels(model,"test");
System.out.println("Done!");
}
private static void showVitroClassGroupequipmentLabels(OntModel model, String message) {
String uri = "http://vivoweb.org/ontology#vitroClassGroupequipment";
List<Statement> stmts = model.listStatements(ResourceFactory.createResource(uri), RDFS.label, (RDFNode)null).toList();
for (Iterator iterator = stmts.iterator(); iterator.hasNext();) {
Statement statement = (Statement) iterator.next();
log.debug("\t\t"+message + " " +statement);
}
}
}

View file

@ -54,10 +54,16 @@ public class CapabilityMapRequestHandler implements VisualizationRequestHandler
@Override @Override
public Object generateAjaxVisualization(VitroRequest vitroRequest, Log log, Dataset dataSource) throws MalformedQueryParametersException, JsonProcessingException { public Object generateAjaxVisualization(VitroRequest vitroRequest, Log log, Dataset dataSource) throws MalformedQueryParametersException, JsonProcessingException {
ConceptLabelMap conceptLabelMap = VisualizationCaches.conceptToLabel.getNoWait(vitroRequest.getRDFService()); RDFService rdfService = vitroRequest.getRDFService();
ConceptPeopleMap conceptPeopleMap = VisualizationCaches.conceptToPeopleMap.getNoWait(vitroRequest.getRDFService()); rdfService.setVitroRequest(vitroRequest);
OrganizationPeopleMap organizationPeopleMap = VisualizationCaches.organisationToPeopleMap.getNoWait(vitroRequest.getRDFService()); // VisualizationCaches.rebuildAll(rdfService);
Map<String, String> organizationLabels = VisualizationCaches.organizationLabels.getNoWait(vitroRequest.getRDFService()); // VisualizationCaches.conceptToLabel.build(rdfService);
// ConceptLabelMap conceptLabelMap = VisualizationCaches.conceptToLabel.getNoWait(rdfService);
// UQAM-Bug-Correction Refresh all memory models with appropriate liguistic labels
ConceptLabelMap conceptLabelMap = VisualizationCaches.conceptToLabel.get(rdfService, true, true);
ConceptPeopleMap conceptPeopleMap = VisualizationCaches.conceptToPeopleMap.getNoWait(rdfService);
OrganizationPeopleMap organizationPeopleMap = VisualizationCaches.organisationToPeopleMap.getNoWait(rdfService);
Map<String, String> organizationLabels = VisualizationCaches.organizationLabels.getNoWait(rdfService);
String data = vitroRequest.getParameter("data"); String data = vitroRequest.getParameter("data");
if (!StringUtils.isEmpty(data)) { if (!StringUtils.isEmpty(data)) {

View file

@ -2,8 +2,10 @@
package edu.cornell.mannlib.vitro.webapp.visualization.utilities; package edu.cornell.mannlib.vitro.webapp.visualization.utilities;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.utils.threads.VitroBackgroundThread; import edu.cornell.mannlib.vitro.webapp.utils.threads.VitroBackgroundThread;
import edu.cornell.mannlib.vitro.webapp.visualization.model.ConceptLabelMap;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
@ -85,7 +87,69 @@ public class CachingRDFServiceExecutor<T> {
if (backgroundTask != null && backgroundTask.isDone()) { if (backgroundTask != null && backgroundTask.isDone()) {
completeBackgroundTask(); completeBackgroundTask();
} }
// If we have cached results
if (cachedResults != null) {
// If the background service exists, and the cache is considered invalid
if (backgroundRDFService != null && resultBuilder.invalidateCache(System.currentTimeMillis() - lastCacheTime)) {
// In most cases, only wait for half a second
long waitFor = 500;
if (backgroundTask == null) {
// Start the background task to refresh the cache
startBackgroundTask(backgroundRDFService);
// As we've just started the background task, allow a wait time of 1 second
waitFor = 1000;
}
// See if we expect it to complete in time, and if so, wait for it
if (allowWaits && isExpectedToCompleteIn(waitFor)) {
completeBackgroundTask(waitFor);
}
}
} else {
// No cached results, so fetch the results using any available RDF service
if (rdfService != null) {
startBackgroundTask(rdfService);
} else if (backgroundRDFService != null) {
startBackgroundTask(backgroundRDFService);
} else {
throw new RuntimeException("Can't execute without an RDF Service");
}
// As there are no cached results, wait for an answer regardless of the RDF service used
completeBackgroundTask();
}
return cachedResults;
}
public synchronized T get(RDFService rdfService, boolean allowWaits, boolean force) {
/*
* UQAM-Bug-Correction
* Forces the regeneration of the result
*/
if (force) {
try {
String backLang = backgroundRDFService.getVitroRequest().getLocale().getLanguage();
String srvLang = rdfService.getVitroRequest().getLocale().getLanguage();
if (!backLang.equals(srvLang)) {
backgroundRDFService.setVitroRequest(rdfService.getVitroRequest());
startBackgroundTask(rdfService);
completeBackgroundTask();
}
} catch (Exception e) {
backgroundRDFService.setVitroRequest(rdfService.getVitroRequest());
startBackgroundTask(rdfService);
completeBackgroundTask();
}
return cachedResults;
}
// First, check if there are results from the previous background task, and update the cache
if (backgroundTask != null && backgroundTask.isDone()) {
completeBackgroundTask();
}
// If we have cached results // If we have cached results
if (cachedResults != null) { if (cachedResults != null) {
// If the background service exists, and the cache is considered invalid // If the background service exists, and the cache is considered invalid

View file

@ -9,6 +9,8 @@ import org.apache.jena.rdf.model.Literal;
import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Resource; import org.apache.jena.rdf.model.Resource;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants; import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
@ -232,13 +234,37 @@ final public class VisualizationCaches {
new CachingRDFServiceExecutor.RDFServiceCallable<Map<String, String>>(visualizationAffinity) { new CachingRDFServiceExecutor.RDFServiceCallable<Map<String, String>>(visualizationAffinity) {
@Override @Override
protected Map<String, String> callWithService(RDFService rdfService) throws Exception { protected Map<String, String> callWithService(RDFService rdfService) throws Exception {
// get current selected language tag
VitroRequest vreq = rdfService.getVitroRequest();
String langCtx = "en-US"; // set default
String language = "en"; // set fallback language
try {
langCtx = language = vreq.getLocale().getLanguage();
if (!vreq.getLocale().getCountry().isEmpty()) {
langCtx += "-" + vreq.getLocale().getCountry();
}
} catch (Exception e) { }
String query = QueryConstants.getSparqlPrefixQuery() + String query = QueryConstants.getSparqlPrefixQuery() +
"SELECT ?org ?orgLabel\n" + "SELECT ?org (Min(?orgLabel_) AS ?orgLabel) \n" +
"WHERE\n" + "WHERE\n" +
"{\n" + "{\n" +
" ?org a foaf:Organization .\n" + " ?org a foaf:Organization \n" +
" ?org rdfs:label ?orgLabel .\n" + " OPTIONAL { ?org rdfs:label ?orgLabelPrimary . \n" +
"}\n"; " FILTER (LANG(?orgLabelPrimary) = '" + langCtx + "') \n" +
"} \n" +
" OPTIONAL { ?org rdfs:label ?orgLabelSecondary . \n" +
" FILTER (LANG(?orgLabelSecondary) = '" + language + "') \n" +
"} \n" +
" OPTIONAL { ?org rdfs:label ?orgLabelTertiary .\n" +
" FILTER (STRBEFORE(STR(LANG(?orgLabelTertiary)), '-') = '" + language + "') \n" +
"} \n" +
" OPTIONAL { ?org rdfs:label ?orgLabelFallback .\n" +
" FILTER (LANG(?orgLabelFallback) != '" + langCtx + "' \n" +
" && LANG(?orgLabelFallback) != '" + language + "' ) \n" +
"} \n" +
"BIND(COALESCE(?orgLabelPrimary, ?orgLabelSecondary, ?orgLabelTertiary, ?orgLabelFallback) AS ?orgLabel_) \n" +
"} GROUP BY ?org \n";
final Map<String, String> map = new HashMap<>(); final Map<String, String> map = new HashMap<>();
@ -390,6 +416,16 @@ final public class VisualizationCaches {
new CachingRDFServiceExecutor.RDFServiceCallable<ConceptLabelMap>() { new CachingRDFServiceExecutor.RDFServiceCallable<ConceptLabelMap>() {
@Override @Override
protected ConceptLabelMap callWithService(RDFService rdfService) throws Exception { protected ConceptLabelMap callWithService(RDFService rdfService) throws Exception {
VitroRequest vreq = rdfService.getVitroRequest();
String langCtx = "en-US";
// UQAM-Optimization Adjust to linguistic context
try {
langCtx = vreq.getLocale().getLanguage();
if (!vreq.getLocale().getCountry().isEmpty()) {
langCtx += "-" + vreq.getLocale().getCountry();
}
} catch (Exception e) {
}
String query = QueryConstants.getSparqlPrefixQuery() + String query = QueryConstants.getSparqlPrefixQuery() +
"SELECT ?concept ?label\n" + "SELECT ?concept ?label\n" +
"WHERE\n" + "WHERE\n" +
@ -398,13 +434,13 @@ final public class VisualizationCaches {
" ?person core:hasResearchArea ?concept .\n" + " ?person core:hasResearchArea ?concept .\n" +
" ?concept a skos:Concept .\n" + " ?concept a skos:Concept .\n" +
" ?concept rdfs:label ?label .\n" + " ?concept rdfs:label ?label .\n" +
" FILTER (lang(?label) = '" + langCtx+"' ) \n" +
"}\n"; "}\n";
// final Map<String, String> map = new HashMap<>(); // final Map<String, String> map = new HashMap<>();
final ConceptLabelMap map = new ConceptLabelMap(); final ConceptLabelMap map = new ConceptLabelMap();
rdfService.sparqlSelectQuery(query, new ResultSetConsumer() { rdfService.sparqlSelectQuery(query, new ResultSetConsumer() {
@Override
protected void processQuerySolution(QuerySolution qs) { protected void processQuerySolution(QuerySolution qs) {
String conceptURI = qs.getResource("concept").getURI().intern(); String conceptURI = qs.getResource("concept").getURI().intern();
String label = qs.getLiteral("label").getString().intern(); String label = qs.getLiteral("label").getString().intern();

View file

@ -7,6 +7,12 @@ import edu.cornell.mannlib.vitro.webapp.i18n.VitroResourceBundle;
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener; import javax.servlet.ServletContextListener;
/**
* Configures VIVO to look for i18n properties files prefixed with 'vivo_'.
* This listener must be run before any other code that uses resource bundles.
* As this listener does not depend on any others, it should be run at or near
* the top of the list in startup_listeners.txt.
*/
public class i18nSetup implements ServletContextListener { public class i18nSetup implements ServletContextListener {
@Override @Override

View file

@ -180,8 +180,8 @@ selfEditing.idMatchingProperty = http://vivo.mydomain.edu/ns#networkId
# #
# A list of supported languages or Locales that the user may choose to # A list of supported languages or Locales that the user may choose to
# use instead of the one specified by the browser. Selection images must # use instead of the one specified by the browser. The selected language(s)
# be available in the i18n/images directory of the theme. This affects # must exist in the VIVO-languages repository. This affects
# RDF data retrieved from the model, if RDFService.languageFilter is true. # RDF data retrieved from the model, if RDFService.languageFilter is true.
# This also affects the text of pages that have been modified to support # This also affects the text of pages that have been modified to support
# multiple languages. # multiple languages.

View file

@ -23,7 +23,8 @@ display:academicDeptsDataGetter
WHERE WHERE
{ {
?theURI a vivo:AcademicDepartment . ?theURI a vivo:AcademicDepartment .
?theURI rdfs:label ?label ?theURI rdfs:label ?label .
FILTER (lang(?label) = '?country' ) .
} }
""" . """ .

View file

@ -1,24 +0,0 @@
# $This file is distributed under the terms of the license in LICENSE$
@prefix about: <http://vitro.mannlib.cornell.edu/ns/default/about#> .
about:ABOUTDG
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter> ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#htmlValue>
"""<h2>About VIVO</h2>
<div class=\"pageGroupBody\" id=\"aboutText\"><p>The VIVO application enables the discovery of researchers across institutions. Participants in the network include institutions with local installations of VIVO or those with research discovery and profiling applications that can provide semantic web-compliant data. The information accessible through VIVO's search and browse capability will therefore reside and be controlled locally, within institutional VIVOs or other semantic web-compliant applications.</p>
<p>VIVO is an open source semantic web application originally developed and implemented at Cornell. When installed and populated with content at an institution, it enables the discovery of research and scholarship across disciplines at that institution. VIVO supports browsing and a search function which returns faceted results for rapid retrieval of desired information. Content in any local VIVO installation may be maintained manually or brought into the database in automated ways from local systems of record, such as human resources, scholarships, grants, course, and faculty activity databases.</p>
<p>See more information on the <a href=\"http://vivoweb.org\">VIVO Project</a>.</p></div>
"""@en ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
"aboutPage" .
about:ABOUTPAGE
a <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page> ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasDataGetter>
about:ABOUTDG ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#title>
"About Page" ;
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#urlMapping>
"/about" .

View file

@ -14,7 +14,6 @@
display:DefaultMenu display:DefaultMenu
a display:MainMenu ; a display:MainMenu ;
rdfs:label "Default Menu" ;
display:hasElement display:EventsMenuItem ; display:hasElement display:EventsMenuItem ;
display:hasElement display:HomeMenuItem ; display:hasElement display:HomeMenuItem ;
display:hasElement display:OrganizationsMenuItem ; display:hasElement display:OrganizationsMenuItem ;
@ -27,43 +26,36 @@ display:DefaultMenu
display:HomeMenuItem display:HomeMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 1; display:menuPosition 1;
display:linkText "Home";
display:toPage display:Home . display:toPage display:Home .
display:PeopleMenuItem display:PeopleMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 2; display:menuPosition 2;
display:linkText "People";
display:toPage display:People . display:toPage display:People .
display:OrganizationsMenuItem display:OrganizationsMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 3; display:menuPosition 3;
display:linkText "Organizations";
display:toPage display:Organizations . display:toPage display:Organizations .
display:ResearchMenuItem display:ResearchMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 4; display:menuPosition 4;
display:linkText "Research";
display:toPage display:Research . display:toPage display:Research .
display:EventsMenuItem display:EventsMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 5; display:menuPosition 5;
display:linkText "Events";
display:toPage display:Events . display:toPage display:Events .
display:CapabilityMapMenuItem display:CapabilityMapMenuItem
a display:NavigationElement ; a display:NavigationElement ;
display:menuPosition 6; display:menuPosition 6;
display:linkText "Capability Map";
display:toPage display:CapabilityMap . display:toPage display:CapabilityMap .
display:Home display:Home
a display:HomePage ; a display:HomePage ;
a display:Page ; a display:Page ;
display:title "Home" ;
display:urlMapping "/" ; display:urlMapping "/" ;
display:hasDataGetter display:homeDataGetter; display:hasDataGetter display:homeDataGetter;
display:cannotDeletePage "true" . display:cannotDeletePage "true" .
@ -72,7 +64,6 @@ display:Events
a display:Page ; a display:Page ;
a display:ClassGroupPage; a display:ClassGroupPage;
display:forClassGroup vivoweb:vitroClassGroupevents ; display:forClassGroup vivoweb:vitroClassGroupevents ;
display:title "Events" ;
display:urlMapping "/events" ; display:urlMapping "/events" ;
display:hasDataGetter display:eventsDataGetter . display:hasDataGetter display:eventsDataGetter .
@ -80,7 +71,6 @@ display:Organizations
a display:Page ; a display:Page ;
a display:ClassGroupPage; a display:ClassGroupPage;
display:forClassGroup vivoweb:vitroClassGrouporganizations ; display:forClassGroup vivoweb:vitroClassGrouporganizations ;
display:title "Organizations" ;
display:urlMapping "/organizations"; display:urlMapping "/organizations";
display:hasDataGetter display:organizationsDataGetter . display:hasDataGetter display:organizationsDataGetter .
@ -88,7 +78,6 @@ display:People
a display:Page ; a display:Page ;
a display:ClassGroupPage; a display:ClassGroupPage;
display:forClassGroup vivoweb:vitroClassGrouppeople ; display:forClassGroup vivoweb:vitroClassGrouppeople ;
display:title "People" ;
display:urlMapping "/people" ; display:urlMapping "/people" ;
display:hasDataGetter display:peopleDataGetter . display:hasDataGetter display:peopleDataGetter .
@ -96,13 +85,11 @@ display:Research
a display:Page ; a display:Page ;
a display:ClassGroupPage; a display:ClassGroupPage;
display:forClassGroup vivoweb:vitroClassGrouppublications ; display:forClassGroup vivoweb:vitroClassGrouppublications ;
display:title "Research" ;
display:urlMapping "/research" ; display:urlMapping "/research" ;
display:hasDataGetter display:researchDataGetter . display:hasDataGetter display:researchDataGetter .
display:CapabilityMap display:CapabilityMap
a display:Page ; a display:Page ;
display:title "Capability Map" ;
display:urlMapping "/vis/capabilitymap" ; display:urlMapping "/vis/capabilitymap" ;
display:hasDataGetter display:capabilityMapDataGetter . display:hasDataGetter display:capabilityMapDataGetter .

View file

@ -4763,9 +4763,8 @@ use one freetextKeyword assertion for each keyword or phrase.</obo:IAO_0000112>
<!-- http://vivoweb.org/ontology/core#researcherId --> <!-- http://vivoweb.org/ontology/core#researcherId -->
<owl:DatatypeProperty rdf:about="http://vivoweb.org/ontology/core#researcherId"> <owl:DatatypeProperty rdf:about="http://vivoweb.org/ontology/core#researcherId">
<rdfs:label xml:lang="en">ISI Researcher ID</rdfs:label> <rdfs:label xml:lang="en">ResearcherID</rdfs:label>
<obo:IAO_0000112 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">RearcherID is a Thomson Reuters project where researchers have a place to manage and share their professional information. It will allow them to solve author identity issues while simultaneously adding dynamic citation metrics and collaboration networks to your personal profile. <obo:IAO_0000112 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ResearcherID is a Clarivate project where researchers have a place to manage and share their professional information. It will allow them to solve author identity issues while simultaneously adding dynamic citation metrics and collaboration networks to your personal profile. http://www.researcherid.com/</obo:IAO_0000112>
Definition source: http://isiwebofknowledge.com/researcherid/</obo:IAO_0000112>
<rdfs:subPropertyOf rdf:resource="http://vivoweb.org/ontology/core#identifier"/> <rdfs:subPropertyOf rdf:resource="http://vivoweb.org/ontology/core#identifier"/>
<rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Person"/> <rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</owl:DatatypeProperty> </owl:DatatypeProperty>

File diff suppressed because it is too large Load diff

View file

@ -52,11 +52,11 @@
<type>tar.gz</type> <type>tar.gz</type>
</dependency> </dependency>
<!-- Dependency for multilingual support --> <!-- Dependency for multilingual support -->
<!-- dependency> <dependency>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-home</artifactId> <artifactId>vivo-languages-home-core</artifactId>
<version>[2.0.0,2.1.0)</version> <version>${project.version}</version>
<type>tar.gz</type> <type>tar.gz</type>
</dependency --> </dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -78,16 +78,16 @@
<type>war</type> <type>war</type>
</overlay> </overlay>
<!-- Overlays for multilingual support --> <!-- Overlays for multilingual support -->
<!-- overlay> <overlay>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vitro-languages-webapp</artifactId> <artifactId>vitro-languages-webapp-core</artifactId>
<type>war</type> <type>war</type>
</overlay> </overlay>
<overlay> <overlay>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-webapp</artifactId> <artifactId>vivo-languages-webapp-core</artifactId>
<type>war</type> <type>war</type>
</overlay --> </overlay>
</overlays> </overlays>
<webResources> <webResources>
<resource> <resource>
@ -115,18 +115,18 @@
<type>war</type> <type>war</type>
</dependency> </dependency>
<!-- Dependencies for multilingual support --> <!-- Dependencies for multilingual support -->
<!-- dependency> <dependency>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vitro-languages-webapp</artifactId> <artifactId>vitro-languages-webapp-core</artifactId>
<version>[2.0.0,2.1.0)</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-languages-webapp</artifactId> <artifactId>vivo-languages-webapp-core</artifactId>
<version>[2.0.0,2.1.0)</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency --> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

View file

@ -5,6 +5,10 @@
# https://sourceforge.net/apps/mediawiki/vivo/index.php?title=The_StartupManager # https://sourceforge.net/apps/mediawiki/vivo/index.php?title=The_StartupManager
# #
# This listener must be run before any other code that uses resource bundles,
# otherwise there will be problems with i18n-support.
org.vivoweb.webapp.startup.i18nSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.JvmSmokeTests edu.cornell.mannlib.vitro.webapp.servlet.setup.JvmSmokeTests
edu.cornell.mannlib.vitro.webapp.application.ApplicationSetup edu.cornell.mannlib.vitro.webapp.application.ApplicationSetup
@ -21,6 +25,9 @@ edu.cornell.mannlib.vitro.webapp.config.RevisionInfoSetup
edu.cornell.mannlib.vitro.webapp.email.FreemarkerEmailFactory$Setup edu.cornell.mannlib.vitro.webapp.email.FreemarkerEmailFactory$Setup
# For multiple language support
edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.ConfigurationModelsSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.ConfigurationModelsSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.ContentModelSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.ContentModelSetup
@ -67,9 +74,6 @@ org.vivoweb.webapp.startup.SearchResultTemplateModelSetup
edu.ucsf.vitro.opensocial.OpenSocialSmokeTests edu.ucsf.vitro.opensocial.OpenSocialSmokeTests
# For multiple language support
edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionSetup
# The search indexer uses a "public" permission, so the PropertyRestrictionPolicyHelper # The search indexer uses a "public" permission, so the PropertyRestrictionPolicyHelper
# and the PermissionRegistry must already be set up. # and the PermissionRegistry must already be set up.
edu.cornell.mannlib.vitro.webapp.searchindex.SearchIndexerSetup edu.cornell.mannlib.vitro.webapp.searchindex.SearchIndexerSetup
@ -91,5 +95,3 @@ edu.cornell.mannlib.vitro.webapp.controller.individual.VIVOIndividualResponseBui
# This should be near the end, because it will issue a warning if the connection to the SearchEngine times out. # This should be near the end, because it will issue a warning if the connection to the SearchEngine times out.
edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest edu.cornell.mannlib.vitro.webapp.servlet.setup.SearchEngineSmokeTest
org.vivoweb.webapp.startup.i18nSetup

View file

@ -0,0 +1,37 @@
.capability, .edge, .group, .links2, .links3, .links4 {
text-indent: 28px;
font-size: 9px;
width: 98%;
background-repeat: no-repeat;
background-image: url("../../../images/visualization/capabilitymap/key-sprite.png")
}
.capability {
background-position: 0px 0px;
height: 22px;
}
.edge {
background-position: 0px -22px;
height: 24px;
}
.group {
background-position: 0px -48px;
height: 20px;
}
.links2 {
background-position: 0px -73px;
height: 20px;
}
.links3 {
background-position: 0px -96px;
height: 20px;
}
.links4 {
background-position: 0px -121px;
height: 20px;
}

View file

@ -1,908 +0,0 @@
#
# Text strings for the controllers and templates
#
# Default (English)
#
uri_icon = uri icon
#
# "partial" individual templates ( /templates/freemarker/body/partials/individual )
#
contact_capitalized = Contact
phone = phone
primary_email = primary email
additional_emails = additional emails
email = email
primary_email_capitalized = Primary Email
additional_emails_capitalized = Additional Emails
contact_info = Contact Info
active_grants_for = Active Grants for the
department = department
grant_name = Grant Name
close_date = Close Date
no_active_grants = There are currently no active grants for this department.
view_all_active_grants = View all active grants
individuals_with_researh_area_one = Here are the individuals in <a href="{1}">{0}</a> who have an interest in this research area.
individuals_with_researh_area_two = Here are the individuals in the <a href="{1}">{0}</a> who have an interest in this research area.
individuals_with_dept = Here are the individuals with an interest in <a href="{1}">{0}</a> who are in this organization.
faculty_with_researh_area = Here are the faculty members in the {0} department who have an interest in this research area.
view_all_individuals_in_area = View all individuals with an interest in this area.
view_all_individuals_in_dept = View all individuals in this organization.
view_all_faculty_in_area = View all faculty with an interest in this area.
faculty_research_areas = Faculty Research Areas
affiliated_research_areas = Affiliated Research Areas
affiliated_departments = Associated Departments
organization = individuals with the research area in this organization
share_the_uri = share the uri
export_qr_codes = Export QR codes
vcard_qr = vCard QR
vcard_qr_code = vCard QR Code
close_capitalized = Close
qr_icon = qr icon
qr_code = QR Code
invalid_qr_code_parameter = You have passed an invalid value for the qrCode display parameter.
research_areas = research areas
publications_in_vivo = Publications in VIVO
co_author = co-author
co_authors = co-authors
co_author_network = Co-author Network
map_of_science = map of science
map_of_science_capitalized = Map of Science
co_investigator_network = co-investigator network
co_investigator_network_capitalized = Co-investigator Network
networks = Networks
co_authors_capitalized = Co-authors
temporal_graph = temporal graph
temporal_graph_capitalized = Temporal Graph
websites = Websites
advisee_label = advisee label
advisor_label = advisor label
candidate = candidate
candidacy = candidacy
advisingRel_label = advisory label
editor_abbreviated = Ed.
volume_abbreviated = Ed.
resource_name = resource name
missing_info_resource = missing information resource
award_receipt_name = award receipt name
award_name = award name
conferred_by = conferred by
conferred_on = conferred on
selected_award = Selected Award
incomplete_date_time_interval = incomplete date/time interval
incomplete_date_time_value = incomplete date/time value
in = in
organization_name = organization name
missing_organization = missing organization
middle_organization = middle organization
concept_name = concept name
at = at
event_name = event name
missing_event = missing event
event_label = event label
activity_name = activity name
missing_activity = missing activity
awarded_by = awarded by
administered_by = administered by
presentation_name = presentation name
missing_presentation = missing presentation
conference = conference
series = series
author_name = author name
missing_author = missing author
person_name = person name
missing_person_in_posn = missing person in this position
missing_person_in_role = missing person in this role
scopus_id_link = Scopus ID Link
click_to_view_web_page = Click to view the {0} web page
screenshot_of_webpage = screenshot of webpage {0}
click_webpage_icon = click webpage icon
link_text = link text
link_name = link name
no_url_provided = no url provided for link
#
# individual templates ( /templates/freemarker/body/individual )
#
standard_view = Standard profile view
quick_view = Quick profile view
quick_view_icon = quick view icon
geographic_focus = Geographic Focus
background_top_image = background top image
full_view_icon = full view icon
profile_type = Profile Type
#
# body templates ( /templates/freemarker/body/ )
#
export_qr_code = Export QR code
more_qr_info = More info on QR codes
what_is_this = What is this?
view_this_profile = View this person's profile
vcard = Vcard
hyperlink = Hyperlink
#
# harvester templates ( /templates/freemarker/body/harvester )
#
must_be_admin = You must be an administrator to use this tool.
error_no_job_specified = Error: No file harvest job was specified, or an unknown job was specified.
probably_a_bug_so_report = The end user should not see this error under normal circumstances, so this is probably a bug and should be reported.
return_to_ingest_menu = Return to the Data Ingest Tools menu
ingest_menu = Ingest Menu
data_being_harvested = Please wait while your data is harvested.
harvest_complete = Harvest complete. For another, please refresh the page.
error_harvest_cannot_continue = An error has occurred and the file harvest cannot continue.
harvest_error_instructions_one = This is most likely due to an improper Harvester configuration. Please ensure the following:
harvest_error_instructions_two = VIVO Harvester is installed.
the_capitalized = The
harvester_location = harvester.location
harvest_error_instructions_three = property in runtime.properties is pointed to the Harvester installation directory.
harvest_error_instructions_fourA = In VIVO Harvester, the web server user (typically tomcat6) has read and write access to the
harvest_error_instructions_fourB = vivo/
harvest_error_instructions_fourC = directory and all of its children.
harvest_error_instructions_fiveA = In VIVO Harvester, the
harvest_error_instructions_fiveB = logs/
harvest_error_instructions_fiveC = directory exists and the web server user has read and write access to it.
harvest_error_instructions_sixA = In VIVO Harvester, the file
harvest_error_instructions_sixB = vivo/config/vivo.xml
harvest_error_instructions_sixC = is properly configured with your database information and namespace.
step_one = Step 1
download_template = Download template
download = Download
step_two = Step 2
fill_in_data = Fill in data
help_capitalized = Help
fill_in_template_with_data = Fill in the template with your data. You may fill in multiple templates if you wish to harvest multiple files at once.
step_three = Step 3
upload_files = Upload file(s)
upload_completed_templates = Upload your completed template(s).
upload_capitalized = Upload
uploaded_files = Uploaded files
step_four = Step 4
harvest_capitalized = Harvest
click_to_harvest = Click the button to harvest your file(s).
step_five = Step 5
view_results = View results
script_executed = Script being executed
progress_capitalized = Progress
undefined_runtime_property = property in runtime.properties is undefined.
define_value_for_property = In order to use this feature, please define a value for this property that points to the Harvester installation directory before redeploying and restarting the application.
#
# lib templates ( /templates/freemarker/body/lib )
#
faculty_capitalized = Faculty
loading_faculty = Loading faculty . . .
research_capitalized = Research
view_all = View all ...
view_all_research = view all research
no_research_content_found = No research content found.
departments = Departments
loading_map_information = Loading map information . . .
verify_match_capitalized = Verify this match
#
# custom form templates ( /templates/freemarker/edit/forms )
#
manage_concepts = Manage Concepts
no_concepts_specified = There are currently no concepts specified.
return_to_profile = Return to Profile Page
external_vocabulary_services = External Vocabulary Services
create_own_concept = Select or create a VIVO-defined concept.
add_selected_concept = Add Selected Concept
cannot_find_concept = Can't find the concept you want? Select or create a VIVO-defined concept.
add_concept = Add Concept
event_type = event type
attended = attended
manage_authors = Manage Authors
no_linked_author = no linked author
remove_author_link = remove author link
add_author = Add Author
return_to_publication = Return to publication
add_an_author = Add an Author
person_capitalized = Person
organization_capitalized = Organization
middle_name = Middle name
initial_okay = initial okay
selected_author = Selected Author
organization_name_capitalized = Organization name
selected_organization = Selected Organization
clinical_activity = clinical activity
clinical_activity_type = clinical activity type
year_hint_format = YYYY
collection_series_editor_role = collection or series editor role
editor_role_in = editor role in
edit_wbpage_of = Edit webpage of
add_webpage_for = Add webpage for
add_webpage = Add Web Page
url_type = URL Type
faculty_of_1000 = Faculty of 1000 Link
standard_web_link = Standard Web Link
webpage_name = Webpage Name
investigator_entry_for = investigator entry for
investigator_capitalized = Investigator
principal_investigator_entry_for = principal investigator entry for
co_principal_investigator_entry_for = co-principal investigator entry for
start_year_must_precede_end = The Start Year must be earlier than the End Year.
end_year_must_be_later = The End Year must be later than the Start Year.
enter_or_select_grant = Please enter or select a value in the Grant Name field.
selected_grant = Selected Grant
years_of_grant_participation = Years of Participation in Grant
leadership = leadership
organization_type = organization type
membership = membership
membership_in = membership in
organizations = organizations
organizer_of = organizer of
outreach_comm_service = outreach & community service
outreach_comm_service_in = outreach & community service in
select_or_enter_name = Please select an existing value or enter a new value in the Name field.
presentation_entry_for = presentation entry for
presentation_capitalized = Presentation
presentation_type = Presentation Type
role_in = Role in
presentation_hint = e.g., Moderator, Speaker, Panelist
presented_at = Presented At
selected_conference = Selected Conference
select_existing_pub_or_enter_new = Please select an existing publication in the Title field or enter a new one.
publication_entry_for = publication entry for
publication_type = Publication Type
selected_publication = Selected Publication
published_in = Published in
selected_journal = Selected Journal
selected_event = Selected Event
proceedings_of = Proceedings of
editor_capitalized = Editor
required_with_last_name = required with new Last name
selected_editor = Selected Editor
publisher_capitalized = Publisher
selected_publisher = Selected Publisher
volume_capitalized = Volume
number_capitalized = Number
issue_capitalized = Issue
chapter_capitalized = Chapter
start_page = Start Page
end_page = End Page
selected_book = Selected Book
publication_date = Publication Date
place_of_publication = Place of Publication
research_activity = research activity
research_activity_type = research activity type
reviewer_of = reviewer of
entry_for = entry for
specify_role_for_activity = Please specify a role for this activity.
start_year = Start Year
service_to_profession = service to the profession
service_to_profession_in = service to the profession in
teaching_activity = teaching activity
teaching_activity_type = teaching activity type
teaching_role_hint = e.g., Instructor, Facilitator, Assistant
create_own_concept_all_caps = Create Your Own Concept
concept_capitalized = Concept
selected_concept = Selected Concept
create_concept = Create Concept
return_to_manage_concepts = Return to Manage Concepts
institutional_internal_class = Institutional Internal Class
internal_class_intro_one = This class will be used to designate those individuals internal to your institution.
internal_class_intro_two = This will allow you to limit the individuals displayed on your menu pages (People, Research, etc.) to only those within your institution.
no_local_oncologies = There are currently no recognized local ontologies.
namespace_must_use_this_pattern = In order for a local ontology to be recognized here, its namespace URI must follow this pattern
new_local_oncology = a new local ontology
return_here_to_define_class = and then return here to define the institutional internal class.
select_existing_local_class = Select an existing class from a local extension
cannot_find_class = Can't find an appropriate class?
create_new_class = Create a new class
create_new_one = Create a new one
use_capitals_each_word = use capitals for the first letter of each word
local_namespace = Local Namespace
problematic_section_error = Error: problematic section as above should all have been handled.
new_local_ontology = new local ontology
manage_grants_and_projects = Manage Grants & Projects for
check_grants_to_exclude = Check those grants and projects you want to <em>exclude</em> from the profile page.
manage_affiliated_people = Manage People Affiliated with
check_people_to_exclude = Check those people you want to <em>exclude</em> from the profile page.
manage_publications_for = Manage Publications for
check_pubs_to_exclude = Check those publications you want to <em>exclude</em> from the profile page.
manage_web_pages = Manage Web Pages
has_no_webpages = This individual currently has no web pages specified. Add a new web page by clicking on the button below.
edit_webpage_link = edit web page link
delete_webpage_link = delete web page link
webpage_url = webpage url
add_new_web_page = Add New Web Page
enable_internal_class_one = To enable this option, you must first select an
enable_internal_class_two = for your instance
internal_class = institutional internal class
only_display = Only display
within_my_institution = within my institution
enter_a_name = Please enter a value in the Name field.
enter_last_name = Please enter a Last name for this person.
enter_first_name = Please enter a First name for this person.
posn_history_entry_for = position history entry for
enter_posn_title_value = Please enter a value in the Position Title field.
enter_posn_type_value = Please select a value in the Position Type field.
enter_or_select_person_value = Please select an existing value or enter a new value in the Person field.
position_title = Position Title
position_type = Position Type
selected_person = Selected Person
degree_candidacy = Degree Candidacy
subject_area = Subject Area
selected_subject_area = Selected Subject Area
selected_advisee = Selected Advisee
selected_advisor = Selected Advisor
advisee_capitalized = Advisee
advisor_capitalized = Advisor
advising_relationship_type = Advising Relationship Type
select_advising_relationship_type = Please select an Advising Relationship Type.
advisor_relationship_entry_for = advisor relationship entry for
advisee_relationship_entry_for = advisee relationship entry for
years_participating = Years of Participation
award_or_honor_for = award or honor for
select_Award_or_enter_name = Please select an existing value or enter a new value in the Award or Honor Name field.
award_honor_name = Award or Honor Name
conferred_by_capitalized = Conferred by
selected_conferred = Selected Conferrer
description = Description
year_awarded = Year Awarded
years_inclusive = Years Inclusive
award_hint = (e.g., for multi-year awards)
educational_training_for = educational training entry for
select_organization_type = Please select a value in the Organization Type field.
select_an_organization_name = Please enter or select a value in the Name field.
select_educational_training_value = Please select a value in the Type of Educational Training field.
org_type_capitalized = Organization Type
educational_training_type = Type of Educational Training
dept_or_school_name = Department or School Name within the
degree = Degree
missing_degree = missing degree
major_field = Major Field of Degree
supplemental_information = Supplemental Information
supplemental_information_hint = (e.g., Thesis title, Transfer info, etc.)
academic_studies_or_other = Academic Studies or Other Training
create_mailing_address = Create Mailing Address
mailing_address_for = mailing address for
enter_a_country = Please enter a value in the Country field.
enter_street_address = Please enter a value in the Street Address field.
enter_a_locality = Please enter a value in the City/Locality field.
enter_postal_code = Please enter a value in the Postal Code field.
country = Country
street_address = Street Address
city_locality = City/Locality
region = State/Province/Region
postal_code = Postal Code
posn_entry_for = position entry for
#
# coauthorship templates ( /templates/freemarker/visualization/coauthorship )
#
within_last_10_years = within the last 10 years
total = total
from = from
file = file
file_capitalized = File
view_full_timeline_and_network = View full timeline and co-author network.
download_data_as = Download data as
unique_coauthors_per_year = Unique Co-Authors per year
count_capitalized = Count
#
# copi templates ( /templates/freemarker/visualization/copi )
#
year_capitalized = Year
unique_coinvestigators = Unique co-investigators
co_investigator = co-investigator
co_investigators = co-investigators
unique_coinvestigators_per_year = Unique Co-Investigators per year
view_timeline_copi_network = View full timeline and co-investigator network.
#
# entity comparison templates ( /templates/freemarker/visualization/entitycomparison )
#
parent_organization_of = Parent organization of
temporal_graph_drill_up = temporal graph drill up
how_to_compare = How do you want to compare?
no_view_link = no view link
persistent_link_to_visualization = Persistent link to current visualization
error_notification = error notification
close_me = Close Me
what_to_compare = What do you want to compare?
organizations_capitalized = Organizations
people_capitalized = People
organization_hierarchy_note = Note: the organizations or people listed below are only those which are directly beneath {0} in the organization hierarchy. You may 'drill down' to see the organizations or people below a given sub-organization by selecting the chart icon next to a selected sub-organization's name below the graph on the right.
save_all_as_csv = Save All as CSV
clear_capitalized = Clear
clear_all_selected_entities = Clear all selected entities.
comparing_capitalized = Comparing
of = of
institutions_capitalized = Institutions
info_based_on_vivo_data = This information is based solely on {0} which have been loaded into the VIVO system.
you_have_selected = You have selected
of_a_maximum = of a maximum
schools = schools
legend_capitalized = Legend
with_unknown_year = with unknown year
with_known_year = with known year
from_current_incomplete_year = from current incomplete year
entity_comp_error_text1 = This organization has neither sub-organizations nor people with
entity_comp_error_text2 = in the system.
entity_comp_error_text3 = Please visit the full
entity_comp_error_text4 = for a more complete overview.
profile_page = profile page
publication = publication
published = published
publications = publications
by_publications = by Publications
publications_capitalized = Publications
grant = grant
granted = granted
grants = grants
by_grants = by Grants
grants_capitalized = Grants
activity = activity
activities = activities
#
# grant visualization templates ( /templates/freemarker/visualization/grant )
#
view_all_grants = view all grants
view_all_grants_text = View all VIVO grants and corresponding co-investigator network.
grant_per_year = Grants per year
link = link
#
# map of science templates ( /templates/freemarker/visualization/mapOfScience )
#
parent_entity = parent entity
map_of_science_icon = map of science icon
explore_activity = Explore activity
explore_capitalized = Explore
across_subdisciplines = across 554 scientific subdisciplines
compare_organizations = Compare organizations
mapped = mapped
save_unmapped_publications = Save Unmapped Publications
map_of_science_visualization = Map of Science Visualization
no_publications_for_this_organization = No publications in the system have been attributed to this organization.
please_visit = Please visit the
for_complete_overview = for a complete overview.
#
# model constructor templates ( /templates/freemarker/visualization/modelconstructor )
#
cached_models_regenerated = The following cached models will be regenerated.
uri_independent_model = URI Independent Model
currently_no_constructed_models = Currently there are no constructed models for use by visualization.
#
# person level templates ( /templates/freemarker/visualization/personlevel)
#
co_investigator_icon = co-investigator icon
co_authorship = co-authorship
this_author = this author
in_the_vivo_db = in the VIVO database.
no_papers_for = Currently there are no papers for
publication_s_capitalized = Publication(s)
co_author_s_capitalized = Co-author(s)
incomplete_data_note1 = Note: This information is based solely on publications that have been loaded into the VIVO system. This may only be a small sample of the person's total work.
incomplete_data_note2 = Go to your profile page to enter additional details about your publications.
incomplete_data_note3 = Log in to enter additional details about your publications on your profile page.
tables_capitalized = Tables
publications_per_year = Publications per year
investigator_name = investigator name
co_author_icon = co-author icon
currently_no_grants_for = Currently there are no {0} grants for
this_investigator = this investigator
grant_s_capitalized = Grant(s)
co_investigator_s_capitalized = Co-investigator(s)
incomplete_grant_data_note1 = Note: This information is based solely on grants that have been loaded into the VIVO system. This may only be a small sample of the person's total work.
incomplete_grant_data_note2 = Go to your profile page to enter additional details about your grants.
incomplete_grant_data_note3 = Log in to enter additional details about your grants on your profile page.
grants_per_year = Grants per year
grant_info_for_all_years = The information in the following tables is for all years.
grant_sparkline_note = The spark lines shown above reflect grants through the last complete calendar year. These tables, however, show the grant information for all years, based on the information loaded in the VIVO system.
#
# publication templates ( /templates/freemarker/visualization/publication)
#
numbers_based_on_publications_in_vivo = These numbers are based solely on publications that have been loaded into this VIVO application. If this is your profile, you can enter additional publications below.
last_ten_full_years = in the last 10 full years
last_ten_full = in the last 10 full
download_link = download link
years = years
#
# miscellaneous visualization templates ( /templates/freemarker/visualization)
#
visualization_tools = Visualization Tools
refresh_cached_vis_models = Refresh Cached Models for Visualization
why_needed = Why is it needed?
vis_tools_note_one = Large-scale visualizations like the Temporal Graph or the Map of Science involve calculating total counts of publications or of grants for some entity. Since this also means checking through all of its sub-entities, the underlying queries can be both memory-intensive and time-consuming. For a faster user experience, we wish to save the results of these queries for later re-use.
vis_caching_process = What's involved in the caching process?
vis_tools_note_two = To this end we have devised a caching solution which will retain information about the hierarchy of organizations -- namely, which publications are attributed to which organizations -- by storing the RDF model.
vis_tools_note_three = We're currently caching these models in memory. The cache is built (only once) on the first user request after a server restart. Because of this, the same model will be served until the next restart. This means that the data in these models may become stale depending upon when it was last created. This works well enough for now. In future releases we will improve this solution so that models are stored on disk and periodically updated.
vis_tools_note_four = The models are refreshed each time the server restarts. Since this is not generally practical on production instances, administrators can instead use the "refresh cache" link above to do this without a restart.
#
# custom form javascript variables ( /templates/freemarker/edit/js)
#
drag_drop_reorder_authors = Drag and drop to reorder authors
reordering_authors_failed = Reordering of authors failed.
confirm_author_removal = Are you sure you want to remove this author:
error_processing_author_request = Error processing request: author not removed
author_capitalized = Author
or_add_new_one = or add a new one.
vocabulary_service_unavailable = An error was encountered in executing this search.
no_serch_results_found = No search results were found.
label_type = Label (Type)
label_altLabels = Label (Alternate Labels)
definition_capitalized = Definition
best_match = Best Match
select_term_from_results = Please select at least one term from the search search results.
select_vocabulary_source_to_search = Please select at least one external vocabulary source to search.
confirm_term_deletion = Are you sure you want to remove this term?
error_term_not_deleted = Error processing request: term not removed
advising = advising
advising_relationship = advising relationship
select_or_create_organization = Select an existing Organization or create a new one.
grant_successfully_excluded = The item has been successfully excluded from the profile page.
error_excluding_grant = Error processing request: the item cannot be excluded from the profile page.
person_successfully_excluded = The person has been successfully excluded from the organization page.
error_excluding_person = Error processing request: the person cannot be excluded from the organization page.
publication_successfully_excluded = The publication will has been successfully excluded from the profile page.
error_excluding_publication = Error processing request: the publication cannot be excluded from the profile page.
drag_drop_to_reorder_webpages = Drag and drop to reorder web pages
webpage_reordering_failed = Reordering of web pages failed.
confirm_webpage_deletion = Are you sure you want to remove this web page?
error_removing_webpage = Error processing request: web page not removed.
#
# miscellaneous javascript variables ( productMods/js)
#
researcher = researcher
#
# individual javascript variables ( productMods/js/individual)
#
error_processing_type_change = Error processing request: the unchecked labels could not be deleted.
#
# visualization javascript variables ( productMods/js/visualization)
#
publications_with = Publications with
co_investigators_capitalized = Co-investigators
grants_with = Grants with
vis_first_link = First
vis_last_link = Last
vis_previous_link = Prev
vis_next_link = Next
max_entity_note = A Maximum 10 entities can be compared. Please remove some & try again.
organizations_and_people = Organizations and People
loading_data_for = Loading data for
data_for = Data for
refreshing_data_message = is now being refreshed. The visualization will load as soon as we are done computing, or you can search or browse other data in VIVO and come back in a few minutes.
disclaimer_text_one = This information is based solely on
disclaimer_text_two = which have been loaded into the VIVO system as of
level_undefined_error = ENTITY LEVEL UNDEFINED ERROR
total_number_of = Total Number of
number_of = Number of
have_an_unknown = have an unknown
year_not_chartered = year (not charted above)
in_completed_year = in a completed year
were = were
in_current_incomplete_year = in the current incomplete year (not charted above)
publication_count = Publication Count
grant_count = Grant Count
entity_type = Entity Type
entity_label = Entity Label
no_matching_entities_found = No matching entities found
clear_search_query = clear search query
short_max_entity_note = A Maximum of 10 entities can be compared.
information_capitalized = Information
content_requires_flash = This content requires the Adobe Flash Player.
get_flash = Get Flash
of_pubs = of pubs.
max_nbr_for_comp = The maximum number of items for comparison is 3.
no_matching_science_areas = No matching science areas found
subdisciplines = Subdisciplines
disciplines = Disciplines
science_area_level = Level of Science Area
of_activity = of activity
drill_down = drill down
disciplines_lower = disciplines
subdisciplines_lower = subdisciplines
show_discipline_labels = Show discipline labels
no_attributed_publications = No publications in the system have been attributed to this
none_of_the = None of the
publications_attributed_to = publications attributed to this
been_science_located = have been "science-located."
publication_attributed_to = The publication attributed to this
not_science_located = has not been "science-located."
no_journal_information = have no journal information.
no_matching_map_location = could not be matched with a map location using their journal information.
map_being_refreshed_msg = is now being refreshed. The visualization will load as soon as we are done computing, or you can search or browse other data in VIVO and come back in a few minutes.
publication_pubs = publications (pubs.)
percent_activity = % activity
#
# miscellaneous additions
#
standardview_tooltip_one = Click to display the
standardview_tooltip_two = profile quick view.
research_area_tooltip_one = Click an area to view others
research_area_tooltip_two = with the same interest.
quickview_tooltip = Click to view the standard profile page.
global_research = Global Research
country_wide_research = Country-wide Research
local_research = Local Research
selected_presentation = Selected Presentation
event_capitalized = Event
item_capitalized = Item
telephone_number_for = telephone number for
telephone_number = Telephone Number
enter_telephone_number = Please enter a value in the Telephone Number field.
email_address_for = email address for
enter_email_address = Please enter a value in the Email Address field.
full_name_for = full name for
title_not_found = Title not found.
speeches_capitalized = Speeches
theses_capitalized = Theses
select_document_type = Please select a value in the Document Type field.
select_a_document_name = Please enter or select a value in the Document Name field.
document_type_capitalized = Document Type
document_name_capitalized = Document Name
selected_document = Selected Document
editor_name = editor name
missing_editor = missing editor
drag_drop_reorder_editors = Drag and drop to reorder editors
reordering_editors_failed = Reordering of editors failed.
confirm_editor_removal = Are you sure you want to remove this editor:
error_processing_editor_request = Error processing request: editor not removed
manage_editors = Manage Editors
no_linked_editor = no linked editor
remove_editor_link = remove editor link
add_an_editor = Add an Editor
add_editor = Add Editor
please_select_type = Please select a type from the drop-down list.
preferred_title = Preferred Title
preferred_title_for = preferred title for
enter_preferred_title = Please enter a value in the Preferred Title field.
fax_number_for = fax number for
fax_number = Fax Number
enter_fax_number = Please enter a value in the Fax Number field.
credentials = credentials
select_credential_or_enter_name = Please enter or select a value in the Credential Name field.
type_of_credential = Type of Credential
credential_name = Credential Name
selected_credential = Selected Credential
year_issued = Year Issued
year_awarded_for = year awarded for
create_year_awarded = Create year awarded
edit_year_awarded = Edit year awarded
publication_date_for = publication date for
create_publication_date = Create publication date
edit_publication_date = Edit publication date
name_prefix = Name Prefix
name_suffix = Name Suffix
administering_organization_for = administering organization for
missing_credential = missing credential
grant_administered_by = grant being administered by
missing_grant = missing grant
editor_of_entry = editor of entry for
role_type = Role type
researcher_role = Researcher Role
search_service_btn = Search Service
through_today = Publications through today's date
doi_link=Digital Object Identifier (DOI)
using_cache_time=Using information cached at
#
#New Entries for i18n purposes
#
edit_entry_for_head_role=: Edit this "head of" role
edit_entry_for_member_role=: Edit this membership
edit_entry_for_clinical_role=: Edit this clinical activity
edit_entry_for_attendee_role=: Edit this participation
edit_entry_for_organizer_role=: Edit this organizer role
edit_entry_for_editor_role=: Edit this editor role
edit_entry_for_service_provider_role=: Edit this service provider role
edit_entry_for_outreach_provider_role=: Edit this outreach provider role
edit_entry_for_researcher_role=: Edit this researcher role
edit_entry_for_reviewer_role=: Edit this reviewer role
edit_entry_for_teacher_role=: Edit this teaching role
create_entry_for_head_role=: Add a new "head of" role
create_entry_for_member_role=: Add a new membership
create_entry_for_clinical_role=: Add a new clinical activity
create_entry_for_attendee_role=: Add a new participation
create_entry_for_organizer_role=: Add a new Organizer role
create_entry_for_editor_role=: Add a new editor role
create_entry_for_service_provider_role=: Add a new service provider role
create_entry_for_outreach_provider_role=: Add a new outreach provider role
create_entry_for_researcher_role=: Add a new researcher role
create_entry_for_reviewer_role=: Add a new reviewer role
create_entry_for_teacher_role=: Add a new teaching role
save_changes=Save
start_capitalized = Start
end_capitalized = End
institution_name=Name of Institution
role_in_institution=Role in Institution
presentation_name_capitalized=Title of Presentation
role_in_presentation_capitalized=Role in Presentation
advisee_capitalized_first_name=First Name
advisee_capitalized_lastname=Last Name
add_orcid_id=Add an iD
orcid_title_add = Do you want to add an ORCID iD?
orcid_step1_add = Step 1: Adding your ORCID iD
orcid_title_confirm = Do you want to add an ORCID iD?
orcid_step1_confirm = Step 1: Adding your ORCID iD
orcid_step1_description = <ul><li>VIVO redirects you to ORCID's web site.</li> \
<li>You log in to your ORCID account. <ul class="inner"><li>If you don't have an account, you can create one.</li></ul></li> \
<li>You tell ORCID that VIVO may read your ORCID record. (one-time permission)</li> \
<li>VIVO reads your ORCID record.</li> \
<li>VIVO notes that your ORCID iD is confirmed.</li></ul>
orcid_step1_denied = <p>You denied VIVO's request to read your ORCID record.</p> \
<p>Confirmation can't continue.</p>
orcid_step1_failed = <p>VIVO failed to read your ORCID record.</p> \
<p>Confirmation can't continue.</p>
orcid_step1_confirmed = <p>Your ORCID iD is confirmed as {0}</p>
orcid_step2_heading = Step 2 (recommended): Linking your ORCID record to VIVO
orcid_step2_description = <ul><li>VIVO redirects you to ORCID's web site</li> \
<li>You tell ORCID that VIVO may add an "external ID" to your ORCID record. (one-time permission)</li> \
<li>VIVO adds the external ID.</li></ul>
orcid_step2_already_present = <p>Your ORCID record already includes a link to VIVO.</p>
orcid_step2_denied = <p>You denied VIVO's request to add an External ID to your ORCID record.</p> \
<p>Linking can't continue.</p>
orcid_step2_failed = <p>VIVO failed to add an External ID to your ORCID record.</p> \
<p>Linking can't continue.</p>
orcid_step2_added = <p>Your ORCID record is linked to VIVO</p>
orcid_button_step1 = Continue Step 1
orcid_button_step2 = Continue Step 2
orcid_step_completed = (step completed)
orcid_view_orcid_record = View your ORCID record.
orcid_return_to_vivo = Return to your VIVO profile page
# Messages for creating and linking resources (publications)
create_and_link_enter=Enter {0}:
create_and_link_claim_for=Claiming works for<br />{0}
create_and_link_confirm_works=Confirm your work(s)
create_and_link_confirm_works_intro=Please check that these are the work(s) that you wish to claim, and indicate your relationship with them.
create_and_link_authors=Authors
create_and_link_authors_desc=If you are an author of a work, please select your name in the author list.<br />Retrieved metadata may be incomplete. If you can not see your name listed, select "Unlisted Author".
create_and_link_editors=Editors
create_and_link_editors_desc=If you edited the work, please select "Editor".
create_and_link_not_mine_desc=If you do not wish to claim a work, select "This is not my work".
create_and_link_already_claimed=You have already claimed this work.
create_and_link_unlisted_author=Unlisted Author
create_and_link_editor=Editor
create_and_link_not_mine=This is not my work
create_and_link_remaining=There are {0} ids remaining
create_and_link_thank_you=Thank you
create_and_link_finished=There are no more works left to claim.<br />You may enter more IDs below, or view your profile.
create_and_link_go_profile=Go to profile
create_and_link_enter_dois_intro=You may enter one or more DOIs to match, and can be entered either as an ID or URL:<br /><br />e.g.
create_and_link_enter_dois_supported=Currently, DOIs issued by Crossref, DataCite and mEDRA are supported.<br />Each DOI should be separated by a comma or new line.
create_and_link_enter_pmid_intro=You may enter one or more PubMed IDs to match. Each ID should be separated by a comma or new line.
create_and_link_enter_pmid_supported=Note that metadata will be retrieved from Crossref, if the PubMed ID can be resolved to a DOI.
create_and_link_unknown_profile=Unknown Profile
create_and_link_unknown_resource=Unknown Resource Type
create_and_link_unauthorized_for_profile=You do not have permissions to claim for this user
create_and_link_submit_ids=Submit IDs
create_and_link_submit_confirm=Confirm
create_and_link_error=Unable to retrieve citation details
create_and_link_type_article=Article
create_and_link_type_article_journal=Journal Article
create_and_link_type_book=Book
create_and_link_type_chapter=Chapter
create_and_link_type_dataset=Dataset
create_and_link_type_figure=Image
create_and_link_type_graphic=Image
create_and_link_type_legal_case=Legal Case
create_and_link_type_legislation=Legislation
create_and_link_type_manuscript=Manuscript
create_and_link_type_map=Map
create_and_link_type_musical_score=Musical Score
create_and_link_type_paper_conference=Conference Paper
create_and_link_type_patent=Patent
create_and_link_type_personal_communication=Letter
create_and_link_type_post_weblog=Blog
create_and_link_type_report=Report
create_and_link_type_review=Review
create_and_link_type_speech=Speech
create_and_link_type_thesis=Thesis
create_and_link_type_webpage=Webpage
claim_publications_by=Claim publications by
claim_publications_by_doi=DOI
claim_publications_by_pmid=PubMed ID

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -64,7 +64,7 @@ $(document).ready(function(){
} }
vcard += "END:VCARD"; vcard += "END:VCARD";
spanStr = "<a title='${i18n().export_qr_codes}' href='" spanStr = "<a title='${i18n().export_qr_codes?js_string}' href='"
+ exportQrCodeUrl + "'>" + exportQrCodeUrl + "'>"
+ "<img id='codeImage' src='https://chart.googleapis.com/chart?cht=qr&amp;chs=125x125&amp;chl=" + "<img id='codeImage' src='https://chart.googleapis.com/chart?cht=qr&amp;chs=125x125&amp;chl="
+ vcard + vcard

View file

@ -26,6 +26,22 @@ var demos = [[
if (!console) var console = { if (!console) var console = {
log : function() {} log : function() {}
}; };
if (typeof i18nStringsCap == 'undefined')
{
var i18nStringsCap = {
term: 'Term',
group: 'Group',
pause: 'pause',
resume: 'resume',
reset: 'Reset',
show_group_labels: 'show group labels',
hide_group_labels: 'hide group labels',
delete_selected: 'delete selected',
remove_capability: 'Remove capability',
remove_group: 'Remove group',
expand: 'Expand'
}
};
var schemes = { var schemes = {
"white" : { "white" : {
"backgroundcolor" : "#FFFFFF", "backgroundcolor" : "#FFFFFF",
@ -395,7 +411,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) {
if (mode != "group") { if (mode != "group") {
$(this.panel) $(this.panel)
.empty() .empty()
.append(title = $("<h2>Term: " + decodeURIComponent(id) + "</h2>") .append(title = $("<h2>" + i18nStringsCap.term + ": " + decodeURIComponent(id) + "</h2>")
.bind("click", function() { .bind("click", function() {
highlight(id); highlight(id);
detailsPane.showDetails(mode, id); detailsPane.showDetails(mode, id);
@ -403,7 +419,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) {
.css("cursor", "pointer") .css("cursor", "pointer")
.prepend($("<span/>").addClass("orange-square")) .prepend($("<span/>").addClass("orange-square"))
) )
.append($("<button>Remove capability</button>") .append($("<button>" + i18nStringsCap.remove_capability + "</button>")
.bind("click", function() { .bind("click", function() {
g.removeCapability(id); g.removeCapability(id);
that.clearDetails(); that.clearDetails();
@ -411,7 +427,7 @@ DetailsPanel.prototype.showDetails = function(mode, id) {
}) })
) )
.append($("<span> </span>")) .append($("<span> </span>"))
.append($("<button>Expand</button>") .append($("<button>" + i18nStringsCap.expand + "</button>")
.bind("click", function() { .bind("click", function() {
expandLastQuery = 1; expandLastQuery = 1;
addKwd(decodeURIComponent(id)); addKwd(decodeURIComponent(id));
@ -454,7 +470,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) {
}); });
return $("<div/>") return $("<div/>")
.append( .append(
$("<h2>" + "Group: " + group.capabilities.map(function(c) { $("<h2>" + i18nStringsCap.group + ": " + group.capabilities.map(function(c) {
return decodeURIComponent(c.term); return decodeURIComponent(c.term);
}).join(", ") + "</h2>") }).join(", ") + "</h2>")
.bind("click", function() { .bind("click", function() {
@ -464,7 +480,7 @@ DetailsPanel.prototype.groupInfo = function(i, group, mode, id) {
.css("cursor", "pointer") .css("cursor", "pointer")
.prepend($("<span/>").addClass("blue-circle")) .prepend($("<span/>").addClass("blue-circle"))
) )
.append($("<button>Remove group</button>") .append($("<button>" + i18nStringsCap.remove_group + "</button>")
.bind("click", function() { .bind("click", function() {
g.removeGroup(group); g.removeGroup(group);
that.clearDetails(); that.clearDetails();
@ -615,12 +631,12 @@ var ipretResults = function(results) {
var disableSubButton = function() { var disableSubButton = function() {
subButton.disabled = true; subButton.disabled = true;
$("#sExpand").attr("disabled", true); $("#sExpand").attr("disabled", true);
$("#resetButton").val("Stop"); $("#resetButton").val(i18nStringsCap.pause);
} }
var enableSubButton = function() { var enableSubButton = function() {
subButton.disabled = false; subButton.disabled = false;
$("#sExpand").attr("disabled", false); $("#sExpand").attr("disabled", false);
$("#resetButton").val("Reset"); $("#resetButton").val(i18nStringsCap.reset);
} }
var getLinkColor = function() { var getLinkColor = function() {
var linkColor = $("#linkColor").val(); var linkColor = $("#linkColor").val();
@ -807,7 +823,7 @@ var render = function() {
} }
force.on("tick", function() { force.on("tick", function() {
$("#log button:first-child").html("pause"); $("#log button:first-child").html(i18nStringsCap.pause);
force2.start(); force2.start();
node.call(updateNode); node.call(updateNode);
anchorNode.each(function(d, i) { anchorNode.each(function(d, i) {
@ -832,30 +848,30 @@ var render = function() {
}); });
// refresh UI // refresh UI
$("#log").empty().append($("<button>pause</button>") $("#log").empty().append($("<button>" + i18nStringsCap.pause + "</button>")
.bind("click", function() { .bind("click", function() {
if ($(this).html() != "resume") { if ($(this).html() != i18nStringsCap.resume) {
$(this).html("resume"); $(this).html(i18nStringsCap.resume);
force.stop(); force.stop();
force2.stop(); force2.stop();
} else { } else {
$(this).html("pause"); $(this).html(i18nStringsCap.pause);
force.resume(); force.resume();
force2.resume(); force2.resume();
} }
}) })
).append(" ").append($("<button>hide group labels</button>") ).append(" ").append($("<button>" + i18nStringsCap.hide_group_labels + "</button>")
.bind("click", function() { .bind("click", function() {
if ($(this).html() != "show group labels") { if ($(this).html() != i18nStringsCap.show_group_labels) {
$(this).html("show group labels"); $(this).html(i18nStringsCap.show_group_labels);
$(".label-group").css("visibility", "hidden"); $(".label-group").css("visibility", "hidden");
} else { } else {
$(this).html("hide group labels"); $(this).html(i18nStringsCap.hide_group_labels);
$(".label-group").css("visibility", "visible"); $(".label-group").css("visibility", "visible");
} }
}) })
); );
$("#log_printout").empty().append($("<button>Delete selected</button>").bind("click", function() { $("#log_printout").empty().append($("<button>" + i18nStringsCap.delete_selected + "</button>").bind("click", function() {
$("input[type=checkbox]:checked").each(function() { $("input[type=checkbox]:checked").each(function() {
g.removeCapability($(this).attr("name")); g.removeCapability($(this).attr("name"));
$(this).parent().remove(); $(this).parent().remove();

View file

@ -1,25 +0,0 @@
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
<#-- Page providing details on how QR codes work -->
<h2>About QR Codes</h2>
<h3>What is QR?</h3>
<p>QR, which stands for <i>Quick Response</i>, is a standard for two-dimensional barcodes that can be read by mobile devices equipped with cameras (such as a smartphone).</p>
<h3>What kind of data is in a QR code?</h3>
<p>QR codes can encode many different types of data. The QR code on the profile page of a person in VIVO encodes information about that person in <i>vCard</i> format. This is a sort of digital business card, containing information about the person's name, address, telephone number, email address, and more.</p>
<p>If you click on a person's QR code in VIVO, you will be taken to the <i>QR Export</i> page for that person. This page contains the vCard QR code seen on the front page, as well as a QR code containing a simple hyperlink to the user's VIVO profile. It also contains an HTML tag for each code, that can be embedded in a web page to display that code on other sites.</p>
<#-- todo: make VIVO API? Currently pasting Google API code into export area, this will be static and not change if VIVO data is updated. -->
<h3>How do I read a QR code?</h3>
<p>There are apps you can download for the iPhone and Android phones that allow you to use your phone's camera to interact with QR codes placed on objects in the real world.</p>
<h3>What can I do with a QR code?</h3>
<p>Anything! For a state-of-the-art business card, put your hyperlink QR code on the back of it. That way anyone with a properly-equipped smartphone can quickly go to your VIVO profile by simply pointing their camera at the code. Or put your vCard QR code on your office door to provide more contact information.</p>

View file

@ -25,7 +25,7 @@
function doHarvest() { function doHarvest() {
document.getElementById("harvestButton").disabled = true; document.getElementById("harvestButton").disabled = true;
document.getElementById("harvestButtonHelpText").innerHTML = "${i18n().data_being_harvested}"; document.getElementById("harvestButtonHelpText").innerHTML = "${i18n().data_being_harvested?js_string}";
var request = createRequest(); var request = createRequest();
request.onreadystatechange=function() { request.onreadystatechange=function() {
@ -92,7 +92,7 @@
importedItems.appendChild(newLi); importedItems.appendChild(newLi);
} }
document.getElementById("harvestButtonHelpText").innerHTML = "${i18n().harvest_complete}"; document.getElementById("harvestButtonHelpText").innerHTML = "${i18n().harvest_complete?js_string}";
} }
} }

View file

@ -170,20 +170,20 @@ var profileTypeData = {
defaultProfileType: '${profileType!}' defaultProfileType: '${profileType!}'
}; };
var i18nStrings = { var i18nStrings = {
errorProcessingTypeChange: '${i18n().error_processing_type_change}', errorProcessingTypeChange: '${i18n().error_processing_type_change?js_string}',
displayLess: '${i18n().display_less}', displayLess: '${i18n().display_less?js_string}',
displayMoreEllipsis: '${i18n().display_more_ellipsis}', displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
showMoreContent: '${i18n().show_more_content}', showMoreContent: '${i18n().show_more_content?js_string}',
verboseTurnOff: '${i18n().verbose_turn_off}', verboseTurnOff: '${i18n().verbose_turn_off?js_string}',
standardviewTooltipOne: '${i18n().standardview_tooltip_one}', standardviewTooltipOne: '${i18n().standardview_tooltip_one?js_string}',
standardviewTooltipTwo: '${i18n().standardview_tooltip_two}', standardviewTooltipTwo: '${i18n().standardview_tooltip_two?js_string}',
researchAreaTooltipOne: '${i18n().research_area_tooltip_one}', researchAreaTooltipOne: '${i18n().research_area_tooltip_one?js_string}',
researchAreaTooltipTwo: '${i18n().research_area_tooltip_two}' researchAreaTooltipTwo: '${i18n().research_area_tooltip_two?js_string}'
}; };
var i18nStringsUriRdf = { var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri}', shareProfileUri: '${i18n().share_profile_uri?js_string}',
viewRDFProfile: '${i18n().view_profile_in_rdf}', viewRDFProfile: '${i18n().view_profile_in_rdf?js_string}',
closeString: '${i18n().close}' closeString: '${i18n().close?js_string}'
}; };
</script> </script>
@ -209,5 +209,5 @@ ${scripts.add('<script async type="text/javascript" src="${urls.base}/js/individ
'<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')} '<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
<script type="text/javascript"> <script type="text/javascript">
i18n_confirmDelete = "${i18n().confirm_delete}"; i18n_confirmDelete = "${i18n().confirm_delete?js_string}";
</script> </script>

View file

@ -220,19 +220,19 @@ var profileTypeData = {
defaultProfileType: '${profileType!}' defaultProfileType: '${profileType!}'
}; };
var i18nStrings = { var i18nStrings = {
errorProcessingTypeChange: '${i18n().error_processing_type_change}', errorProcessingTypeChange: '${i18n().error_processing_type_change?js_string}',
displayLess: '${i18n().display_less}', displayLess: '${i18n().display_less?js_string}',
displayMoreEllipsis: '${i18n().display_more_ellipsis}', displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
showMoreContent: '${i18n().show_more_content}', showMoreContent: '${i18n().show_more_content?js_string}',
verboseTurnOff: '${i18n().verbose_turn_off}', verboseTurnOff: '${i18n().verbose_turn_off?js_string}',
quickviewTooltip: '${i18n().quickview_tooltip}', quickviewTooltip: '${i18n().quickview_tooltip?js_string}',
researchAreaTooltipOne: '${i18n().research_area_tooltip_one}', researchAreaTooltipOne: '${i18n().research_area_tooltip_one?js_string}',
researchAreaTooltipTwo: '${i18n().research_area_tooltip_two}' researchAreaTooltipTwo: '${i18n().research_area_tooltip_two?js_string}'
}; };
var i18nStringsUriRdf = { var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri}', shareProfileUri: '${i18n().share_profile_uri?js_string}',
viewRDFProfile: '${i18n().view_profile_in_rdf}', viewRDFProfile: '${i18n().view_profile_in_rdf?js_string}',
closeString: '${i18n().close}' closeString: '${i18n().close?js_string}'
}; };
</script> </script>
<#if editable> <#if editable>
@ -270,5 +270,5 @@ ${scripts.add('<script async type="text/javascript" src="${urls.base}/js/individ
'<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')} '<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
<script type="text/javascript"> <script type="text/javascript">
i18n_confirmDelete = "${i18n().confirm_delete}"; i18n_confirmDelete = "${i18n().confirm_delete?js_string}";
</script> </script>

View file

@ -33,10 +33,10 @@
<#include "individual-vitro.ftl"> <#include "individual-vitro.ftl">
<script> <script>
var i18nStrings = { var i18nStrings = {
displayLess: '${i18n().display_less}', displayLess: '${i18n().display_less?js_string}',
displayMoreEllipsis: '${i18n().display_more_ellipsis}', displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
showMoreContent: '${i18n().show_more_content}', showMoreContent: '${i18n().show_more_content?js_string}',
verboseTurnOff: '${i18n().verbose_turn_off}', verboseTurnOff: '${i18n().verbose_turn_off?js_string}',
}; };
</script> </script>

View file

@ -28,16 +28,6 @@
<input size="30" type="text" id="label" name="label" value="${labelValue}" /> <input size="30" type="text" id="label" name="label" value="${labelValue}" />
</p> </p>
</#if> </#if>
<label for="newLabelLanguage">${i18n().add_label_for_language}</label>
<select name="newLabelLanguage" id="newLabelLanguage" >
<option value=""<#if !newLabelLanguageValue?has_content> selected="selected"</#if>>${i18n().select_locale}</option>
<#if editConfiguration.pageData.selectLocale?has_content>
<#assign selectLocale = editConfiguration.pageData.selectLocale />
<#list selectLocale as locale>
<option value="${locale.code}"<#if newLabelLanguageValue?has_content && locale.code == newLabelLanguageValue> selected="selected"</#if>>${locale.label}</option>
</#list>
</#if>
</select>
<input type="hidden" name="editKey" id="editKey" value="${editKey}"/> <input type="hidden" name="editKey" id="editKey" value="${editKey}"/>

View file

@ -46,10 +46,10 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="column conceptLabelInfo"> <div class="column conceptLabelInfo">
<h4>Concept (Type)</h4> <h4>${i18n().concept_type}</h4>
</div> </div>
<div class="column conceptVocabSource"> <div class="column conceptVocabSource">
<h4>Vocabulary Source</h4> <h4>${i18n().vocabulary_source}</h4>
</div> </div>
<div class="column conceptRemoval">&nbsp; <div class="column conceptRemoval">&nbsp;
</div> </div>
@ -173,19 +173,19 @@ var vocabSpecificDisplay = {};
vocabSpecificDisplay["${vocab}"] = "${vocabSpecificDisplay[vocab]}"; vocabSpecificDisplay["${vocab}"] = "${vocabSpecificDisplay[vocab]}";
</#list> </#list>
var i18nStrings = { var i18nStrings = {
vocServiceUnavailable: '${i18n().vocabulary_service_unavailable}', vocServiceUnavailable: '${i18n().vocabulary_service_unavailable?js_string}',
noResultsFound: '${i18n().no_serch_results_found}', noResultsFound: '${i18n().no_serch_results_found?js_string}',
defaultLabelTypeString: '${i18n().label_type}', defaultLabelTypeString: '${i18n().label_type?js_string}',
definitionString: '${i18n().definition_capitalized}', definitionString: '${i18n().definition_capitalized?js_string}',
bestMatchString: '${i18n().best_match}', bestMatchString: '${i18n().best_match?js_string}',
selectTermFromResults: '${i18n().select_term_from_results}', selectTermFromResults: '${i18n().select_term_from_results?js_string}',
selectVocSource: '${i18n().select_vocabulary_source_to_search}', selectVocSource: '${i18n().select_vocabulary_source_to_search?js_string}',
confirmTermDelete: '${i18n().confirm_term_deletion}', confirmTermDelete: '${i18n().confirm_term_deletion?js_string}',
errorTernNotRemoved: '${i18n().error_term_not_deleted}', errorTernNotRemoved: '${i18n().error_term_not_deleted?js_string}',
vocabSpecificLabels: vocabSpecificDisplay, vocabSpecificLabels: vocabSpecificDisplay,
displayMoreEllipsis: '${i18n().display_more_ellipsis}', displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
displayLess: '${i18n().display_less}', displayLess: '${i18n().display_less?js_string}',
showMoreContent: '${i18n().show_more_content}' showMoreContent: '${i18n().show_more_content?js_string}'
}; };
</script> </script>

View file

@ -185,14 +185,14 @@ var customFormData = {
reorderUrl: '${urls.base}/edit/reorder' reorderUrl: '${urls.base}/edit/reorder'
}; };
var i18nStrings = { var i18nStrings = {
authorNameWrapperTitle: '${i18n().drag_drop_reorder_authors}', authorNameWrapperTitle: '${i18n().drag_drop_reorder_authors?js_string}',
reorderAuthorsAlert: '${i18n().reordering_authors_failed}', reorderAuthorsAlert: '${i18n().reordering_authors_failed?js_string}',
removeAuthorshipMessage: '${i18n().confirm_author_removal}', removeAuthorshipMessage: '${i18n().confirm_author_removal?js_string}',
removeAuthorshipAlert: '${i18n().error_processing_author_request}', removeAuthorshipAlert: '${i18n().error_processing_author_request?js_string}',
authorTypeText: '${i18n().author_capitalized}', authorTypeText: '${i18n().author_capitalized?js_string}',
organizationTypeText: '${i18n().organization_capitalized}', organizationTypeText: '${i18n().organization_capitalized?js_string}',
helpTextSelect: '${i18n().select_an_existing}', helpTextSelect: '${i18n().select_an_existing?js_string}',
helpTextAdd: '${i18n().or_add_new_one}' helpTextAdd: '${i18n().or_add_new_one?js_string}'
}; };
</script> </script>

View file

@ -77,7 +77,7 @@
<p> <p>
<input type="submit" id="submit" value="${submitButtonText}" role="button" disabled="disabled"/> <input type="submit" id="submit" value="${submitButtonText}" role="button" disabled="disabled"/>
<span class="or"> or </span> <span class="or"> ${i18n().or} </span>
<a title="${i18n().cancel_title}" class="cancel" href="${cancelUrl}">${i18n().cancel_link}</a> <a title="${i18n().cancel_title}" class="cancel" href="${cancelUrl}">${i18n().cancel_link}</a>
</p> </p>
</form> </form>
@ -124,9 +124,9 @@ Also multiple types parameter set to true only if more than one type returned-->
baseHref: '${urls.base}/individual?uri=' baseHref: '${urls.base}/individual?uri='
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>
<#-- <#--

View file

@ -156,13 +156,13 @@ var customFormData = {
reorderUrl: '${urls.base}/edit/reorder' reorderUrl: '${urls.base}/edit/reorder'
}; };
var i18nStrings = { var i18nStrings = {
editorNameWrapperTitle: '${i18n().drag_drop_reorder_editors}', editorNameWrapperTitle: '${i18n().drag_drop_reorder_editors?js_string}',
reorderEditorsAlert: '${i18n().reordering_editors_failed}', reorderEditorsAlert: '${i18n().reordering_editors_failed?js_string}',
removeEditorshipMessage: '${i18n().confirm_editor_removal}', removeEditorshipMessage: '${i18n().confirm_editor_removal?js_string}',
removeEditorshipAlert: '${i18n().error_processing_editor_request}', removeEditorshipAlert: '${i18n().error_processing_editor_request?js_string}',
editorTypeText: '${i18n().editor_capitalized}', editorTypeText: '${i18n().editor_capitalized?js_string}',
helpTextSelect: '${i18n().select_an_existing}', helpTextSelect: '${i18n().select_an_existing?js_string}',
helpTextAdd: '${i18n().or_add_new_one}' helpTextAdd: '${i18n().or_add_new_one?js_string}'
}; };
</script> </script>

View file

@ -84,7 +84,6 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<label for="orgType">${i18n().document_type_capitalized} ${requiredHint}</label> <label for="orgType">${i18n().document_type_capitalized} ${requiredHint}</label>
<#assign docTypeOpts = editConfiguration.pageData.documentType /> <#assign docTypeOpts = editConfiguration.pageData.documentType />
<select id="typeSelector" name="documentType" acGroupName="document"> <select id="typeSelector" name="documentType" acGroupName="document">
<option value="" selected="selected">${i18n().select_one}</option>
<#list docTypeOpts?keys as key> <#list docTypeOpts?keys as key>
<#if documentTypeValue = key> <#if documentTypeValue = key>
<option value="${key}" selected >${docTypeOpts[key]}</option> <option value="${key}" selected >${docTypeOpts[key]}</option>
@ -136,9 +135,9 @@ var customFormData = {
subjectName: '${editConfiguration.subjectName}' subjectName: '${editConfiguration.subjectName}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -167,9 +167,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css" />')}

View file

@ -184,9 +184,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -132,7 +132,6 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<#--TODO: Check if possible to have existing publication options here in order to select--> <#--TODO: Check if possible to have existing publication options here in order to select-->
<p class="inline"><label for="typeSelector">${i18n().publication_type}<#if editMode != "edit"> ${requiredHint}<#else>:</#if></label> <p class="inline"><label for="typeSelector">${i18n().publication_type}<#if editMode != "edit"> ${requiredHint}<#else>:</#if></label>
<select id="typeSelector" name="pubType" acGroupName="publication" > <select id="typeSelector" name="pubType" acGroupName="publication" >
<option value="" <#if (publicationTypeValue?length = 0)>selected="selected"</#if>>${i18n().select_one}</option>
<#list pubTypeLiteralOptions?keys as key> <#list pubTypeLiteralOptions?keys as key>
<option value="${key}" <#if (publicationTypeValue = key)>selected="selected"</#if>>${pubTypeLiteralOptions[key]}</option> <option value="${key}" <#if (publicationTypeValue = key)>selected="selected"</#if>>${pubTypeLiteralOptions[key]}</option>
</#list> </#list>
@ -325,9 +324,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -228,9 +228,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -62,9 +62,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -71,9 +71,9 @@ Also multiple types parameter set to true only if more than one type returned-->
defaultTypeName: '${propertyPublicName}' defaultTypeName: '${propertyPublicName}'
}; };
var i18nStrings = { var i18nStrings = {
selectExisting: '${i18n().select_an_existing}', selectExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -74,7 +74,7 @@
<p class="submit"> <p class="submit">
<input type="submit" id="submit" value="${submitLabel}" role="submit" /> <input type="submit" id="submit" value="${submitLabel}" role="submit" />
<span class="or"> or </span> <span class="or"> ${i18n().or} </span>
<a class="cancel" title="${i18n().cancel_title}" href="${editConfiguration.cancelUrl}">${i18n().cancel_link}</a> <a class="cancel" title="${i18n().cancel_title}" href="${editConfiguration.cancelUrl}">${i18n().cancel_link}</a>
</p> </p>
</form> </form>

View file

@ -114,9 +114,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
}; };
</script> </script>

View file

@ -157,9 +157,9 @@ var customFormData = {
subjectName: '${editConfiguration.subjectName}' subjectName: '${editConfiguration.subjectName}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
$(document).ready(function() { $(document).ready(function() {

View file

@ -146,9 +146,9 @@ var publicationToPersonUtils = {
// hide everything, then show what's needed based on type // hide everything, then show what's needed based on type
// simpler in the event the user changes the type // simpler in the event the user changes the type
this.hideAllFields(); this.hideAllFields();
var selectedType = this.typeSelector.find(':selected').text(); var selectedType = this.typeSelector.find(':selected').val();
if ( selectedType == 'Academic Article' ) { if ( selectedType == 'http://purl.org/ontology/bibo/AcademicArticle' ) {
// if the user has changed type, keep any relevant values and display the // if the user has changed type, keep any relevant values and display the
// acSelection as appropriate // acSelection as appropriate
var ckForVal = this.getAcUriReceiverVal('collection'); var ckForVal = this.getAcUriReceiverVal('collection');
@ -189,7 +189,7 @@ var publicationToPersonUtils = {
this.number.val(''); this.number.val('');
this.chapterNbr.val(''); this.chapterNbr.val('');
} }
else if ( selectedType == 'Chapter' ) { else if ( selectedType == 'http://purl.org/ontology/bibo/Chapter' ) {
// if the user has changed type, keep any relevant values and display the // if the user has changed type, keep any relevant values and display the
// acSelection as appropriate // acSelection as appropriate
var ckForVal = this.getAcUriReceiverVal('book'); var ckForVal = this.getAcUriReceiverVal('book');
@ -233,7 +233,7 @@ var publicationToPersonUtils = {
this.startPage.val(''); this.startPage.val('');
this.endPage.val(''); this.endPage.val('');
} }
else if ( selectedType == 'Book' || selectedType == 'Edited Book' ) { else if ( selectedType == 'http://purl.org/ontology/bibo/Book' || selectedType == 'http://purl.org/ontology/bibo/EditedBook' ) {
// if the user has changed type, keep any relevant values and display the // if the user has changed type, keep any relevant values and display the
// acSelection as appropriate // acSelection as appropriate
var ckForVal = this.getAcUriReceiverVal('editor'); var ckForVal = this.getAcUriReceiverVal('editor');
@ -270,7 +270,7 @@ var publicationToPersonUtils = {
this.endPage.val(''); this.endPage.val('');
this.chapterNbr.val(''); this.chapterNbr.val('');
} }
else if ( selectedType == 'Conference Paper' ) { else if ( selectedType == 'http://vivoweb.org/ontology/core#ConferencePaper' ) {
// if the user has changed type, keep any relevant values and display the // if the user has changed type, keep any relevant values and display the
// acSelection as appropriate // acSelection as appropriate
ckForVal = this.getAcUriReceiverVal('conference'); ckForVal = this.getAcUriReceiverVal('conference');
@ -310,7 +310,7 @@ var publicationToPersonUtils = {
this.endPage.val(''); this.endPage.val('');
this.chapterNbr.val(''); this.chapterNbr.val('');
} }
else if ( selectedType == 'Conference Poster' || selectedType == 'Speech') { else if ( selectedType == 'http://vivoweb.org/ontology/core#ConferencePoster' || selectedType == 'http://vivoweb.org/ontology/core#Speech') {
// if the user has changed type, keep any relevant values and display the // if the user has changed type, keep any relevant values and display the
// acSelection as appropriate // acSelection as appropriate
var ckForVal = this.getAcUriReceiverVal('conference'); var ckForVal = this.getAcUriReceiverVal('conference');

View file

@ -48,8 +48,8 @@ var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit' processingUrl: '${urls.base}/edit/primitiveRdfEdit'
}; };
var i18nStrings = { var i18nStrings = {
itemSuccessfullyExcluded: '${i18n().grant_successfully_excluded}', itemSuccessfullyExcluded: '${i18n().grant_successfully_excluded?js_string}',
errorExcludingItem: '${i18n().error_excluding_grant}' errorExcludingItem: '${i18n().error_excluding_grant?js_string}'
}; };
</script> </script>

View file

@ -44,8 +44,8 @@ var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit' processingUrl: '${urls.base}/edit/primitiveRdfEdit'
}; };
var i18nStrings = { var i18nStrings = {
itemSuccessfullyExcluded: '${i18n().person_successfully_excluded}', itemSuccessfullyExcluded: '${i18n().person_successfully_excluded?js_string}',
errorExcludingItem: '${i18n().error_excluding_person}' errorExcludingItem: '${i18n().error_excluding_person?js_string}'
}; };
</script> </script>

View file

@ -61,8 +61,8 @@ var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit' processingUrl: '${urls.base}/edit/primitiveRdfEdit'
}; };
var i18nStrings = { var i18nStrings = {
itemSuccessfullyExcluded: '${i18n().publication_successfully_excluded}', itemSuccessfullyExcluded: '${i18n().publication_successfully_excluded?js_string}',
errorExcludingItem: '${i18n().error_excluding_publication}' errorExcludingItem: '${i18n().error_excluding_publication?js_string}'
}; };
</script> </script>

View file

@ -70,10 +70,10 @@ var customFormData = {
reorderUrl: '${urls.base}/edit/reorder' reorderUrl: '${urls.base}/edit/reorder'
}; };
var i18nStrings = { var i18nStrings = {
dragDropToReorderWebpages: '${i18n().drag_drop_to_reorder_webpages}', dragDropToReorderWebpages: '${i18n().drag_drop_to_reorder_webpages?js_string}',
webpageReorderingFailed: '${i18n().webpage_reordering_failed}', webpageReorderingFailed: '${i18n().webpage_reordering_failed?js_string}',
confirmWebpageDeletion: '${i18n().confirm_webpage_deletion}', confirmWebpageDeletion: '${i18n().confirm_webpage_deletion?js_string}',
errorRemovingWebpage: '${i18n().error_removing_webpage}' errorRemovingWebpage: '${i18n().error_removing_webpage?js_string}'
}; };
</script> </script>

View file

@ -114,9 +114,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
}; };
</script> </script>

View file

@ -203,9 +203,9 @@ var customFormData = {
subjectName: '${editConfiguration.subjectName}' subjectName: '${editConfiguration.subjectName}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
$(document).ready(function() { $(document).ready(function() {

View file

@ -165,9 +165,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -217,11 +217,11 @@ var customFormData = {
<#--Removing this line for now from above : newUriSentinel : '${newUriSentinel}',--> <#--Removing this line for now from above : newUriSentinel : '${newUriSentinel}',-->
<#--Also removed this: ,doNotRemoveOriginalObject: '${doNotRemoveOriginalObject}'--> <#--Also removed this: ,doNotRemoveOriginalObject: '${doNotRemoveOriginalObject}'-->
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
advisingString: '${i18n().advising}', advisingString: '${i18n().advising?js_string}',
advisingRelationshipString: '${i18n().advising_relationship}' advisingRelationshipString: '${i18n().advising_relationship?js_string}'
}; };
</script> </script>

View file

@ -217,11 +217,11 @@ var customFormData = {
<#--Removing this line for now from above : newUriSentinel : '${newUriSentinel}',--> <#--Removing this line for now from above : newUriSentinel : '${newUriSentinel}',-->
<#--Also removed this: ,doNotRemoveOriginalObject: '${doNotRemoveOriginalObject}'--> <#--Also removed this: ,doNotRemoveOriginalObject: '${doNotRemoveOriginalObject}'-->
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
advisingString: '${i18n().advising}', advisingString: '${i18n().advising?js_string}',
advisingRelationshipString: '${i18n().advising_relationship}' advisingRelationshipString: '${i18n().advising_relationship?js_string}'
}; };
</script> </script>

View file

@ -195,10 +195,10 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnOrganization: '${i18n().select_or_create_organization}', selectAnOrganization: '${i18n().select_or_create_organization?js_string}',
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
}; };
</script> </script>

View file

@ -224,9 +224,9 @@ var customFormData = {
subjectName: '${editConfiguration.subjectName}' subjectName: '${editConfiguration.subjectName}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
$(document).ready(function() { $(document).ready(function() {

View file

@ -199,9 +199,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}', selectedString: '${i18n().selected?js_string}',
}; };
</script> </script>

View file

@ -183,9 +183,9 @@ var customFormData = {
flagClearLabelForExisting: '${flagClearLabelForExisting}' flagClearLabelForExisting: '${flagClearLabelForExisting}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
</script> </script>

View file

@ -153,9 +153,9 @@ var customFormData = {
subjectName: '${editConfiguration.subjectName}' subjectName: '${editConfiguration.subjectName}'
}; };
var i18nStrings = { var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}', selectAnExisting: '${i18n().select_an_existing?js_string}',
orCreateNewOne: '${i18n().or_create_new_one}', orCreateNewOne: '${i18n().or_create_new_one?js_string}',
selectedString: '${i18n().selected}' selectedString: '${i18n().selected?js_string}'
}; };
$(document).ready(function() { $(document).ready(function() {

View file

@ -11,12 +11,27 @@ ${stylesheets.add(
'<link rel="stylesheet" type="text/css" href="${urls.base}/templates/freemarker/edit/forms/css/autocomplete.css" />', '<link rel="stylesheet" type="text/css" href="${urls.base}/templates/freemarker/edit/forms/css/autocomplete.css" />',
'<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/personlevel/page.css" />', '<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/personlevel/page.css" />',
'<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/visualization.css" />', '<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/visualization.css" />',
'<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/capabilitymap/graph.css" />' '<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/capabilitymap/graph.css" />',
'<link rel="stylesheet" type="text/css" href="${urls.base}/css/visualization/capabilitymap/key.css" />'
)} )}
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
var i18nStringsCap = {
term: '${i18n().term_capitalized?js_string}',
group: '${i18n().group_capitalized?js_string}',
pause: '${i18n().pause?js_string}',
resume: '${i18n().resume?js_string}',
reset: '${i18n().cap_map_reset?js_string}',
show_group_labels: '${i18n().show_group_labels?js_string}',
hide_group_labels: '${i18n().hide_group_labels?js_string}',
delete_selected: '${i18n().delete_selected?js_string}',
remove_capability: '${i18n().remove_capability?js_string}',
remove_group: '${i18n().remove_group?js_string}',
expand: '${i18n().expand?js_string}'
};
var contextPath = "${urls.base}"; var contextPath = "${urls.base}";
$(document).ready(function() { $(document).ready(function() {
document.title = "${i18n().capability_map?js_string}";
var loadedConcepts = $.ajax({ var loadedConcepts = $.ajax({
url: contextPath + "/visualizationAjax?vis=capabilitymap&data=concepts", url: contextPath + "/visualizationAjax?vis=capabilitymap&data=concepts",
type: "GET", type: "GET",
@ -33,8 +48,8 @@ ${stylesheets.add(
</script> </script>
<div class="main" id="main-content" role="main"> <div class="main" id="main-content" role="main">
<div class="col-8"> <div class="col-8">
<h2>Capability Map</h2> <h2>${i18n().capability_map}</h2>
<p>Build a &lsquo;first pass&rsquo; capability map by typing in a<!-- set of--> search term<!--s--> that could be said to represent a broad research capability.</p> <p>${i18n().cap_map_intro}</p>
</div> </div>
<div id="queryform"> <div id="queryform">
@ -43,9 +58,9 @@ ${stylesheets.add(
<input name="query" id="query" size="34" value="" onfocus="" accesskey="q" onblur="" type="text" onkeydown="queryKeyDown(event);"> <input name="query" id="query" size="34" value="" onfocus="" accesskey="q" onblur="" type="text" onkeydown="queryKeyDown(event);">
<label id="cutofflabel" for="queryCutoff">Cutoff:</label> <label id="cutofflabel" for="queryCutoff">Cutoff:</label>
<input id="queryCutoff" name="queryCutoff" type="text" title="Cutoff" size="4" value="10"> <input id="queryCutoff" name="queryCutoff" type="text" title="Cutoff" size="4" value="10">
<input type="submit" value="Search" id="add" type="button" onclick="addKwd();"> <input value="${i18n().cap_map_search}" type="submit" id="add" type="button" onclick="addKwd();">
<input value="Search and Expand" type="submit" id="sExpand" onclick="expandLastQuery = 1; addKwd();"> <input value="${i18n().cap_map_search_expand}" type="submit" id="sExpand" onclick="expandLastQuery = 1; addKwd();">
<input value="Reset" id="resetButton" type="submit" onclick="reset()" disabled> <input value="${i18n().cap_map_reset}" id="resetButton" type="submit" onclick="reset()" disabled>
<!-- a style="display:inline-block; float:right; line-height:32px; height:32px; cursor:pointer" onclick="showhideadvanced(this)">Show advanced</a --> <!-- a style="display:inline-block; float:right; line-height:32px; height:32px; cursor:pointer" onclick="showhideadvanced(this)">Show advanced</a -->
</span> </span>
</p> </p>
@ -56,56 +71,27 @@ ${stylesheets.add(
<div id="container"> <div id="container">
<div id="helptext"> <div id="helptext">
<p> <p>
Welcome to the Capability Mapping tool. ${i18n().cap_map_text_intro}
This tool visualises how researchers relate to other
researchers via search terms.
</p> </p>
<h3>Getting Started</h3> <h3>${i18n().cap_map_text_headline1}</h3>
<p> <p>
Enter a research area into the search field above and press 'Search'. ${i18n().cap_map_text1}
The resulting diagram displays the search term, rendered in orange,
connected to the blue group of researchers that are active in that area.
Enter another search term to see how researchers from both searches relate.
Keep adding search terms to build a capability map.
</p> </p>
<p> <p>
Tip: you can expand a broad search term into smaller concepts ${i18n().cap_map_text2}
by clicking &lsquo;search and expand&rsquo;.
</p> </p>
<h3>Interacting with the visualisation</h3> <h3>${i18n().cap_map_text_headline2}</h3>
<p> <p>
By clicking on any node in the visualisation, ${i18n().cap_map_text3}
additional information can be viewed in the
'Info' tab on the right-hand side.
For groups of people, the participants in the group
and their information can be viewed,
and individual researchers can be removed from the graph.
Selecting a search term will display all attached groups.
Under each group full information for each person is retrieved,
and the number of matching grants and publications
for each researcher within the mapped capabilities is shown.
Clicking on a researcher's name will lead to the original search
results.
</p> </p>
<h4>Visual cues</h4> <h4>${i18n().cap_map_text_headline3}</h4>
<p> <p>
To make the visualisation easier to read, ${i18n().cap_map_text4}
search terms and groups are scaled according
to the number of results returned.
Groups are also given different shades
according to the number of connected search terms.
The darker the shade, the more search terms a group is connected to.
</p> </p>
<h3>Advanced features</h3> <h3>${i18n().cap_map_text_headline4}</h3>
<h4>Changing the cutoff value</h4> <h4>${i18n().cap_map_text_headline5}</h4>
<p> <p>
The amount of researchers retrieved for each search term ${i18n().cap_map_text5}
for is limited by the cutoff value in the search form
(10 by default).
Increasing this cutoff will increase the likelihood
of an intersection between different search terms.
This will also increase the complexity of the graph,
however, and may make it difficult to identify patterns.
</p> </p>
</div> </div>
@ -118,28 +104,32 @@ ${stylesheets.add(
<div id="right-container"> <div id="right-container">
<div class="tabs"> <div class="tabs">
<ul class="titles"> <ul class="titles">
<li><a href="#demo">Search terms</a></li> <li><a href="#demo">${i18n().cap_map_search_terms}</a></li>
<li><a href="#logg">Info</a></li> <li><a href="#logg">${i18n().cap_map_info}</a></li>
<!-- li><a href="#extractData">Data</a></li --> <!-- li><a href="#extractData">Data</a></li -->
</ul> </ul>
<div class="result_body"> <div class="result_body">
<div class="result_section" id="demo"> <div class="result_section" id="demo">
<h2>Current search terms</h2> <h2>${i18n().cap_map_cur_search_terms}</h2>
<ul id="log_printout"> <ul id="log_printout">
<li>This panel displays a list of the search terms currently <li>
on the graph. Search for something to begin.</li> ${i18n().cap_map_text6}
</li>
</ul> </ul>
<p style="position:absolute; bottom:10px"> <p style="position:absolute; bottom:10px">
<img src="${urls.base}/images/visualization/capabilitymap/key.png" alt="Key"> <div class="capability">${i18n().cap_map_key1}</div>
<div class="edge">${i18n().cap_map_key2}</div>
<div class="group">${i18n().cap_map_key3}</div>
<div class="links2">${i18n().cap_map_key4}</div>
<div class="links3">${i18n().cap_map_key5}</div>
<div class="links4">${i18n().cap_map_key6}</div>
</p> </p>
</div> </div>
<div class="result_section" id="logg"> <div class="result_section" id="logg">
<div id="inner-details"> <div id="inner-details">
<p> <p>
This panel displays information about individual ${i18n().cap_map_text7}
search terms and groups. Click on a group to display
its information.
</p> </p>
</div> </div>
</div> </div>
@ -164,4 +154,3 @@ ${stylesheets.add(
</div> </div>
</div> </div>
</div> </div>

View file

@ -159,17 +159,17 @@
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks; var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks;
if (totalPubs === 1) { if (totalPubs === 1) {
var pubDisplay = "${i18n().co_author}"; var pubDisplay = "${i18n().co_author?js_string}";
} else { } else {
var pubDisplay = "${i18n().co_authors}"; var pubDisplay = "${i18n().co_authors?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + pubDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + pubDisplay + " <br/></span>");
var sparksText = ' ${i18n().within_last_10_years}'; var sparksText = ' ${i18n().within_last_10_years?js_string}';
if (totalPubs !== totalPublicationCount) { if (totalPubs !== totalPublicationCount) {
sparksText += ' (' + totalPublicationCount + ' ${i18n().total})'; sparksText += ' (' + totalPublicationCount + ' ${i18n().total?js_string})';
} }
<#else> <#else>
@ -188,22 +188,22 @@
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks; var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks;
if ( totalPubs == 1 ) { if ( totalPubs == 1 ) {
var pubDisplay = "${i18n().co_author}"; var pubDisplay = "${i18n().co_author?js_string}";
} else { } else {
var pubDisplay = "${i18n().co_authors}"; var pubDisplay = "${i18n().co_authors?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + pubDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + pubDisplay + " <br/></span>");
var sparksText = ' ${i18n().from} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}' var sparksText = ' ${i18n().from?js_string} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
+ ' - ${sparklineVO.latestRenderedPublicationYear?c}</span>'; + ' - ${sparklineVO.latestRenderedPublicationYear?c}</span>';
if (totalPubs !== totalPublicationCount) { if (totalPubs !== totalPublicationCount) {
sparksText += ' (' + totalPublicationCount + ' ${i18n().total})'; sparksText += ' (' + totalPublicationCount + ' ${i18n().total?js_string})';
} }
if (totalPublicationCount) { if (totalPublicationCount) {
sparksText += ' <br /><a href="${sparklineVO.downloadDataLink}" title="csv ${i18n().file_capitalized}">(.CSV ${i18n().file_capitalized})</a> '; sparksText += ' <br /><a href="${sparklineVO.downloadDataLink}" title="csv ${i18n().file_capitalized?js_string}">(.CSV ${i18n().file_capitalized})</a> ';
} }
</#if> </#if>

View file

@ -161,17 +161,17 @@
if (totalGrants === 1) { if (totalGrants === 1) {
var grantDisplay = "${i18n().co_investigator}"; var grantDisplay = "${i18n().co_investigator?js_string}";
} else { } else {
var grantDisplay = "${i18n().co_investigators}"; var grantDisplay = "${i18n().co_investigators?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
var sparksText = ' ${i18n().within_last_10_years}'; var sparksText = ' ${i18n().within_last_10_years?js_string}';
if (totalGrants !== totalGrantCount) { if (totalGrants !== totalGrantCount) {
sparksText += ' (' + totalGrantCount + ' ${i18n().total})'; sparksText += ' (' + totalGrantCount + ' ${i18n().total?js_string})';
} }
<#else> <#else>
@ -190,18 +190,18 @@
var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedSparks; var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedSparks;
if (totalGrants === 1) { if (totalGrants === 1) {
var grantDisplay = "${i18n().co_investigator}"; var grantDisplay = "${i18n().co_investigator?js_string}";
} else { } else {
var grantDisplay = "${i18n().co_investigators}"; var grantDisplay = "${i18n().co_investigators?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
var sparksText = ' ${i18n().from} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}' var sparksText = ' ${i18n().from?js_string} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
+ ' through ${sparklineVO.latestRenderedGrantYear?c}</span>'; + ' through ${sparklineVO.latestRenderedGrantYear?c}</span>';
if (totalGrants !== totalGrantCount) { if (totalGrants !== totalGrantCount) {
sparksText += ' (' + totalGrantCount + ' ${i18n().total})'; sparksText += ' (' + totalGrantCount + ' ${i18n().total?js_string})';
} }
if (totalGrantCount) { if (totalGrantCount) {

View file

@ -34,25 +34,25 @@
<#assign temporalGraphDownloadCSVCommonURL = '${urls.base}${dataVisualizationURLRoot}?uri=${organizationURI}&labelField=label'> <#assign temporalGraphDownloadCSVCommonURL = '${urls.base}${dataVisualizationURLRoot}?uri=${organizationURI}&labelField=label'>
<#assign publicationParameter = { "name": "${i18n().publication}", <#assign publicationParameter = { "name": "${i18n().publication?js_string}",
"pluralName": "${i18n().publications}", "pluralName": "${i18n().publications?js_string}",
"verbName": "${i18n().published}", "verbName": "${i18n().published?js_string}",
"dropDownText": "${i18n().by_publications}", "dropDownText": "${i18n().by_publications?js_string}",
"viewLink": "${organizationPublicationTemporalGraphURL}", "viewLink": "${organizationPublicationTemporalGraphURL}",
"viewBaseLink": "${subOrganizationPublicationTemporalGraphCommonURL}", "viewBaseLink": "${subOrganizationPublicationTemporalGraphCommonURL}",
"dataLink": "${organizationPublicationTemporalGraphDataURL}", "dataLink": "${organizationPublicationTemporalGraphDataURL}",
"csvLink": "${temporalGraphDownloadCSVCommonURL}&vis=entity_comparison", "csvLink": "${temporalGraphDownloadCSVCommonURL}&vis=entity_comparison",
"value": "${i18n().publications}" }> "value": "${i18n().publications?js_string}" }>
<#assign grantParameter = { "name": "${i18n().grant}", <#assign grantParameter = { "name": "${i18n().grant?js_string}",
"pluralName": "${i18n().grants}", "pluralName": "${i18n().grants?js_string}",
"verbName": "${i18n().granted}", "verbName": "${i18n().granted?js_string}",
"dropDownText": "${i18n().by_grants}", "dropDownText": "${i18n().by_grants?js_string}",
"viewLink": "${organizationGrantTemporalGraphURL}", "viewLink": "${organizationGrantTemporalGraphURL}",
"viewBaseLink": "${subOrganizationGrantTemporalGraphCommonURL}", "viewBaseLink": "${subOrganizationGrantTemporalGraphCommonURL}",
"dataLink": "${organizationGrantTemporalGraphDataURL}", "dataLink": "${organizationGrantTemporalGraphDataURL}",
"csvLink": "${temporalGraphDownloadCSVCommonURL}&vis=entity_grant_count", "csvLink": "${temporalGraphDownloadCSVCommonURL}&vis=entity_grant_count",
"value": "${i18n().grants}" }> "value": "${i18n().grants?js_string}" }>
<#assign parameterOptions = [publicationParameter, grantParameter]> <#assign parameterOptions = [publicationParameter, grantParameter]>
@ -70,68 +70,68 @@ we will use rev 293 (dev build version) of the flot & excanvas files.
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
var activitiesLabel = { var activitiesLabel = {
singular: '${i18n().activity}', singular: '${i18n().activity?js_string}',
plural: '${i18n().activities}' plural: '${i18n().activities?js_string}'
}; };
var i18nStringsGuiEvents = { var i18nStringsGuiEvents = {
temporalGraphCapped: '${i18n().temporal_graph_capitalized}', temporalGraphCapped: '${i18n().temporal_graph_capitalized?js_string?js_string},
temporalGraphLower: '${i18n().temporal_graph}', temporalGraphLower: '${i18n().temporal_graph?js_string?js_string}',
viewString: '${i18n().view}', viewString: '${i18n().view?js_string}',
entityMaxNote: '${i18n().max_entity_note}', entityMaxNote: '${i18n().max_entity_note?js_string}',
organizationsCappedString: '${i18n().organizations_capitalized}', organizationsCappedString: '${i18n().organizations_capitalized?js_string}',
peopleCappedString: '${i18n().people_capitalized}', peopleCappedString: '${i18n().people_capitalized?js_string}',
organizationsAndPeople: '${i18n().organizations_and_people}', organizationsAndPeople: '${i18n().organizations_and_people?js_string}',
loadingDataFor: '${i18n().loading_data_for}', loadingDataFor: '${i18n().loading_data_for?js_string}',
dataForString: '${i18n().data_for}', dataForString: '${i18n().data_for?js_string}',
refreshingDataMsg: '${i18n().refreshing_data_message}', refreshingDataMsg: '${i18n().refreshing_data_message?js_string}',
disclaimerTextOne: '${i18n().disclaimer_text_one}', disclaimerTextOne: '${i18n().disclaimer_text_one?js_string}',
disclaimerTextTwo: '${i18n().disclaimer_text_two}', disclaimerTextTwo: '${i18n().disclaimer_text_two?js_string}',
levelUndefinedError: '${i18n().level_undefined_error}', levelUndefinedError: '${i18n().level_undefined_error?js_string}',
sundayString: '${i18n().sunday}', sundayString: '${i18n().sunday?js_string}',
mondayString: '${i18n().monday}', mondayString: '${i18n().monday?js_string}',
tuesdayString: '${i18n().tuesday}', tuesdayString: '${i18n().tuesday?js_string}',
wednesdayString: '${i18n().wednesday}', wednesdayString: '${i18n().wednesday?js_string}',
thursdayString: '${i18n().thursday}', thursdayString: '${i18n().thursday?js_string}',
fridayString: '${i18n().friday}', fridayString: '${i18n().friday?js_string}',
saturdayString: '${i18n().saturday}', saturdayString: '${i18n().saturday?js_string}',
januaryString: '${i18n().january}', januaryString: '${i18n().january?js_string}',
februaryString: '${i18n().february}', februaryString: '${i18n().february?js_string}',
marchString: '${i18n().march}', marchString: '${i18n().march?js_string}',
aprilString: '${i18n().april}', aprilString: '${i18n().april?js_string}',
mayString: '${i18n().may}', mayString: '${i18n().may?js_string}',
juneString: '${i18n().june}', juneString: '${i18n().june?js_string}',
julyString: '${i18n().july}', julyString: '${i18n().july?js_string}',
augustString: '${i18n().august}', augustString: '${i18n().august?js_string}',
septemberString: '${i18n().september}', septemberString: '${i18n().september?js_string}',
octoberString: '${i18n().october}', octoberString: '${i18n().october?js_string}',
novemberString: '${i18n().november}' novemberString: '${i18n().november?js_string}'
}; };
var i18nStringsUtil = { var i18nStringsUtil = {
firstString: '${i18n().vis_first_link}', firstString: '${i18n().vis_first_link?js_string}',
lastString: '${i18n().vis_last_link}', lastString: '${i18n().vis_last_link?js_string}',
previousString: '${i18n().vis_previous_link}', previousString: '${i18n().vis_previous_link?js_string}',
nextString: '${i18n().vis_next_link}', nextString: '${i18n().vis_next_link?js_string}',
totalNumberOf: '${i18n().total_number_of}', totalNumberOf: '${i18n().total_number_of?js_string}',
numberOf: '${i18n().number_of}', numberOf: '${i18n().number_of?js_string}',
withUnknownYear: '${i18n().with_unknown_year}', withUnknownYear: '${i18n().with_unknown_year?js_string}',
withKnownYear: '${i18n().with_known_year}', withKnownYear: '${i18n().with_known_year?js_string}',
fromIncompleteYear: '${i18n().from_current_incomplete_year}', fromIncompleteYear: '${i18n().from_current_incomplete_year?js_string}',
ofString: '${i18n().of}', ofString: '${i18n().of?js_string}',
inCompletedYear: '${i18n().in_completed_year}', inCompletedYear: '${i18n().in_completed_year?js_string}',
haveAnUnknown: '${i18n().have_an_unknown}', haveAnUnknown: '${i18n().have_an_unknown?js_string}',
yearNotChartered: '${i18n().year_not_chartered}', yearNotChartered: '${i18n().year_not_chartered?js_string}',
wereString: '${i18n().were}', wereString: '${i18n().were?js_string}',
inIncompleteYear: '${i18n().in_current_incomplete_year}', inIncompleteYear: '${i18n().in_current_incomplete_year?js_string}',
byPublications: '${i18n().by_publications}', byPublications: '${i18n().by_publications?js_string}',
publicationCount: '${i18n().publication_count}', publicationCount: '${i18n().publication_count?js_string}',
grantCount: '${i18n().grant_count}', grantCount: '${i18n().grant_count?js_string}',
entityLabel: '${i18n().entity_label}', entityLabel: '${i18n().entity_label?js_string}',
entityType: '${i18n().entity_type}', entityType: '${i18n().entity_type?js_string}',
noMatchingEntities: '${i18n().no_matching_entities_found}', noMatchingEntities: '${i18n().no_matching_entities_found?js_string}',
clerSearchQuery: '${i18n().clear_search_query}', clerSearchQuery: '${i18n().clear_search_query?js_string}',
shortMaxEntityNote: '${i18n().short_max_entity_note}', shortMaxEntityNote: '${i18n().short_max_entity_note?js_string}',
informationString: '${i18n().information_capitalized}', informationString: '${i18n().information_capitalized?js_string}',
entityTypeString: '${i18n().entity_type}' entityTypeString: '${i18n().entity_type?js_string}'
}; };
</script> </script>

View file

@ -156,17 +156,17 @@
var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedShortSparks; var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedShortSparks;
if (totalGrants === 1) { if (totalGrants === 1) {
var grantDisplay = "${i18n().grant}"; var grantDisplay = "${i18n().grant?js_string}";
} else { } else {
var grantDisplay = "${i18n().grants}"; var grantDisplay = "${i18n().grants?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
var sparksText = ' ${i18n().within_last_10_years}'; var sparksText = ' ${i18n().within_last_10_years?js_string}';
if (totalGrants !== totalGrantCount) { if (totalGrants !== totalGrantCount) {
sparksText += ' (' + totalGrantCount + ' ${i18n().total})'; sparksText += ' (' + totalGrantCount + ' ${i18n().total?js_string})';
} }
<#else> <#else>
@ -185,9 +185,9 @@
var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedSparks; var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedSparks;
if (totalGrants === 1) { if (totalGrants === 1) {
var grantDisplay = "${i18n().grant}"; var grantDisplay = "${i18n().grant?js_string}";
} else { } else {
var grantDisplay = "${i18n().grants}"; var grantDisplay = "${i18n().grants?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
@ -196,7 +196,7 @@
+ ' through ${sparklineVO.latestRenderedGrantYear?c}</span>'; + ' through ${sparklineVO.latestRenderedGrantYear?c}</span>';
if (totalGrants !== totalGrantCount) { if (totalGrants !== totalGrantCount) {
sparksText += ' (' + totalGrantCount + ' ${i18n().total})'; sparksText += ' (' + totalGrantCount + ' ${i18n().total?js_string})';
} }
if (totalGrantCount) { if (totalGrantCount) {

View file

@ -1,52 +0,0 @@
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
<#assign aboutImagesRoot = '${urls.images}/visualization/mapofscience/about/'>
<h2>About VIVO's Map of Science Visualization</h2>
<h3>Reference Basemap</h3>
<p>The VIVO Map of Science visualization uses the UCSD map of science and classification
system that was computed using paper-level data from about 25,000 journals from Elsevier's
Scopus and Clarivate Analytics' Web of Science (WoS) for the years 2001-2010. The UCSD map
of science assigns the 25,000 journals to 554 subdisciplines that are further aggregated
into 13 main disciplines of science. In the map, each discipline has a distinct color
(green for 'Biology', brown for 'Earth Sciences', etc.) and a label. (Sub)disciplines that
are similar closer to one another on the map. (Sub)disciplines that are especially similar
are connected by grey lines.</p>
<h3>Data Overlay</h3>
<p>Publication activity of a university, organization, or person can be overlaid on the
map to generate expertise profiles. The process is as follows: (1) The set of unique
journals is identified, (2) the number of times each journal served as a publication venue
is calculated, and (3) the area size of the 13 disciplines and 554 subdisciplines is
calculated based on these journal publication venue counts. Note that some journals are
associated with exactly one (sub)discipline while others, e.g., interdisciplinary ones like
<em>Science</em> or <em>Nature</em>, are fractionally associated with multiple
(sub)disciplines. Subdisciplines inherit the colors of their parent disciplines.
(Sub)disciplines without any associated publications are given in gray.</p>
<img src="${aboutImagesRoot}/scimap_discipline.jpg" width="450" height="327" />
<img src="${aboutImagesRoot}/scimap_subdiscipline.jpg" width="450" height="327" />
<h3>Expertise Profile Comparison Map</h3>
<p>Publication activity of up to three organizations or persons can be compared via "Compare
organizations." In the table on the left, select up to three organizations. The expertise
profile of each organizations will be represented as data overlay. Each organizations is
represented in a distinct color and a top-10 list of subdisciplines with the highest number
of publications is given below the comparison map. Data can be saved as CSV file.</p>
<img src="${aboutImagesRoot}/scimap_comparison.jpg" width="803" height="781" style=
"margin-left: 50px;"/>
<h3>Interactivity</h3>
<p>The map can be explored at two levels-by 13 disciplines or 554 subdisciplines. Clicking
on a node in the map brings up the number of fractionally associated journal publications
and the percentage of publications mapped to this (sub)discipline. Hover over a discipline
in the table on the left to see what circles it corresponds to on the map. Use slider below
map, on the right to reduce number of subdisciplines shown to improve legibility</p>
<h3>Links</h3>
<p>For more information on the UCSD map of science and classification system, see
<a href="https://doi.org/10.1371/journal.pone.0039464" target="_blank">https://doi.org/10.1371/journal.pone.0039464</a>.
For other maps of science, see
<a href="http://scimaps.org" target="_blank">http://scimaps.org</a> and
<a href="http://mapofscience.com" target="_blank">http://mapofscience.com</a>.</p>

View file

@ -67,43 +67,43 @@ var entityMapOfScienceSubDisciplineCSVURLPrefix = "${urls.base}${dataVisualizati
var entityMapOfScienceDisciplineCSVURL = "${entityMapOfScienceDisciplineCSVURL}"; var entityMapOfScienceDisciplineCSVURL = "${entityMapOfScienceDisciplineCSVURL}";
var entityMapOfScienceSubDisciplineCSVURL = "${entityMapOfScienceSubDisciplineCSVURL}"; var entityMapOfScienceSubDisciplineCSVURL = "${entityMapOfScienceSubDisciplineCSVURL}";
var i18nStrings = { var i18nStrings = {
firstString: '${i18n().vis_first_link}', firstString: '${i18n().vis_first_link?js_string}',
lastString: '${i18n().vis_last_link}', lastString: '${i18n().vis_last_link?js_string}',
previousString: '${i18n().vis_previous_link}', previousString: '${i18n().vis_previous_link?js_string}',
nextString: '${i18n().vis_next_link}', nextString: '${i18n().vis_next_link?js_string}',
organizationsString: '${i18n().organizations_capitalized}', organizationsString: '${i18n().organizations_capitalized?js_string}',
peopleString: '${i18n().people_capitalized}', peopleString: '${i18n().people_capitalized?js_string}',
infoIconString: '${i18n().info_icon}', infoIconString: '${i18n().info_icon?js_string}',
entityTypeString: '${i18n().entity_type}', entityTypeString: '${i18n().entity_type?js_string}',
organizationString: '${i18n().organization_capitalized}', organizationString: '${i18n().organization_capitalized?js_string}',
personString: '${i18n().person_capitalized}', personString: '${i18n().person_capitalized?js_string}',
numberOfPubs: '${i18n().of_pubs}', numberOfPubs: '${i18n().of_pubs?js_string}',
maxNbrForComp: '${i18n().max_nbr_for_comp}', maxNbrForComp: '${i18n().max_nbr_for_comp?js_string}',
noMatchingScienceAreas: '${i18n().no_matching_science_areas}', noMatchingScienceAreas: '${i18n().no_matching_science_areas?js_string}',
clearSearchQuery: '${i18n().clear_search_query}', clearSearchQuery: '${i18n().clear_search_query?js_string}',
saveAllAsCSV: '${i18n().save_all_as_csv}', saveAllAsCSV: '${i18n().save_all_as_csv?js_string}',
drillDownString: '${i18n().drill_down}', drillDownString: '${i18n().drill_down?js_string}',
subdisciplinesString: '${i18n().subdisciplines}', subdisciplinesString: '${i18n().subdisciplines?js_string}',
disciplinesString: '${i18n().disciplines}', disciplinesString: '${i18n().disciplines?js_string}',
scienceAreaLevel: '${i18n().science_area_level}', scienceAreaLevel: '${i18n().science_area_level?js_string}',
ofActivityString: '${i18n().of_activity}', ofActivityString: '${i18n().of_activity?js_string}',
subdisciplinesLower: '${i18n().subdisciplines_lower}', subdisciplinesLower: '${i18n().subdisciplines_lower?js_string}',
disciplinesLower: '${i18n().disciplines_lower}', disciplinesLower: '${i18n().disciplines_lower?js_string}',
showDisciplineLabels: '${i18n().show_discipline_labels}', showDisciplineLabels: '${i18n().show_discipline_labels?js_string}',
noAttributedPubs: '${i18n().no_attributed_publications}', noAttributedPubs: '${i18n().no_attributed_publications?js_string}',
noneOfThe: '${i18n().none_of_the}', noneOfThe: '${i18n().none_of_the?js_string}',
pubsAttributedTo: '${i18n().publications_attributed_to}', pubsAttributedTo: '${i18n().publications_attributed_to?js_string}',
beenScienceLocated: '${i18n().been_science_located}', beenScienceLocated: '${i18n().been_science_located?js_string}',
pubAttributedTo: '${i18n().publication_attributed_to}', pubAttributedTo: '${i18n().publication_attributed_to?js_string}',
notScienceLocated: '${i18n().not_science_located}', notScienceLocated: '${i18n().not_science_located?js_string}',
publicationsString: '${i18n().publications}', publicationsString: '${i18n().publications?js_string}',
publicationString: '${i18n().publication}', publicationString: '${i18n().publication?js_string}',
noJournalInformation: '${i18n().no_journal_information}', noJournalInformation: '${i18n().no_journal_information?js_string}',
noMatchingMapLocation: '${i18n().no_matching_map_location}', noMatchingMapLocation: '${i18n().no_matching_map_location?js_string}',
loadingDataFor: '${i18n().loading_data_for}', loadingDataFor: '${i18n().loading_data_for?js_string}',
mapBeingRefreshed: '${i18n().map_being_refreshed_msg}', mapBeingRefreshed: '${i18n().map_being_refreshed_msg?js_string}',
publicationsPubs: '${i18n().publication_pubs}', publicationsPubs: '${i18n().publication_pubs?js_string}',
percentActivity: '${i18n().percent_activity}' percentActivity: '${i18n().percent_activity?js_string}'
}; };
</script> </script>

View file

@ -1,70 +0,0 @@
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
<#-- START TOOLTIP TEXT -->
<div id="toolTipOne" style="display:none;">
VIVO's Map of Science visualization depicts the topical expertise a university, organization, or person has
based on past publications loaded into VIVO. The ${entityLabel} expertise profile is shown here--larger
circle sizes denote more publications per topic area.<br /><br />
<a href='${subEntityMapOfScienceCommonURL}about'>Learn more about VIVO's Map of Science visualization?</a>
</div>
<div id="toolTipTwo" style="display:none;">
The table below summarizes the publications plotted on the Map of Science. Each row corresponds to a
(sub)discipline on the map<br /><br />
The <b># of pubs.</b> column shows how many of the publications were mapped to each (sub)discipline. This count can be
fractional because some publication venues are associated with more than one (sub)discipline. Each publication
in such a venue contributes fractionally to all associated (sub)disciplines according to a weighting scheme.<br /><br />
The <b>% of activity</b> column shows what proportion of the publications were mapped to each (sub)discipline.
</div>
<div id="toolTipThree" style="display:none;">
This visualization is based on the publications we were able to 'science locate' for ${entityLabel}, and
therefore it may not be fully representative of the overall publication activity for ${entityLabel}.<br /><br />
The publication coverage of this visualization can be improved by including more publication data in the VIVO
system, and by ensuring that each publication in the VIVO system is associated with a journal that the Map of
Science recognizes (based on the holdings of Clarivate Analytics' Web of Science database and Elsevier's Scopus database). Journal
names containing typos or other idiosyncrasies may need to be cleaned up before they are recognized. You may
contact a VIVO system administrator if publication coverage is a concern.</div>
<div id="exploreTooltipText" style="display:none;">
Overlay and examine expertise profiles for a organization. Color coding by discipline.
</div>
<div id="compareTooltipText" style="display:none;">
Overlay and examine expertise profiles for one or more organizations. Color coding by organization.
</div>
<div id="searchInfoTooltipText" style="display:none;">
List only (sub)disciplines whose names contain this text.
</div>
<#-- COMPARISON TOOLTIP TEXT -->
<div id="comparisonToolTipTwo" style="display:none;">
The listed organizations are children of the ${entityLabel} node in the organizational hierarchy.
You may 'drill down' to see the organizations below a given sub-organization by selecting the chart icon
next to a selected sub-organization's name below the graph on the right.
<br /><br />
The <b># of pubs.</b> column shows how many of the publications were mapped to each subdiscipline. This
count can be fractional because some publication venues are associated with more than one subdiscipline.
Each publication in such a venue contributes fractionally to all associated subdisciplines according to
a weighting scheme.
<br /><br />
The <b>% of activity</b> column shows what proportion of the publications were mapped to each subdiscipline.
</div>
<div id="comparisonSearchInfoTooltipText" style="display:none;">
<!-- Search for specific subdiscipline (or discipline) label in the first column of the table. -->
List only organizations <!--(or people) -->whose name contains this text.
</div>
<#-- END TOOLTIP TEXT -->

View file

@ -39,16 +39,16 @@ var visualizationDataRoot = "${dataVisualizationURLRoot}";
// --> // -->
var i18nStringsCoauthorship = { var i18nStringsCoauthorship = {
coAuthorsString: '${i18n().co_authors_capitalized}', coAuthorsString: '${i18n().co_authors_capitalized?js_string}',
authorString: '${i18n().author_capitalized}', authorString: '${i18n().author_capitalized?js_string}',
publicationsWith: '${i18n().publications_with}', publicationsWith: '${i18n().publications_with?js_string}',
publicationsString: "${i18n().through_today}", publicationsString: '${i18n().through_today?js_string}',
coauthorsString: '${i18n().co_author_s_capitalized}' coauthorsString: '${i18n().co_author_s_capitalized?js_string}'
}; };
var i18nStringsPersonLvl = { var i18nStringsPersonLvl = {
fileCapitalized: '${i18n().file_capitalized}', fileCapitalized: '${i18n().file_capitalized?js_string}',
contentRequiresFlash: '${i18n().content_requires_flash}', contentRequiresFlash: '${i18n().content_requires_flash?js_string}',
getFlashString: '${i18n().get_flash}' getFlashString: '${i18n().get_flash?js_string}'
}; };
</script> </script>

View file

@ -42,16 +42,16 @@ var visualizationDataRoot = "${dataVisualizationURLRoot}";
// --> // -->
var i18nStringsCoPi = { var i18nStringsCoPi = {
coInvestigatorString: '${i18n().co_investigators_capitalized}', coInvestigatorString: '${i18n().co_investigators_capitalized?js_string}',
investigatorString: '${i18n().investigator_capitalized}', investigatorString: '${i18n().investigator_capitalized?js_string}',
grantsWithString: '${i18n().grants_with}', grantsWithString: '${i18n().grants_with?js_string}',
grantsCapitalized: '${i18n().grant_s_capitalized}', grantsCapitalized: '${i18n().grant_s_capitalized?js_string}',
coInvestigatorCapitalized: '${i18n().co_investigator_s_capitalized}' coInvestigatorCapitalized: '${i18n().co_investigator_s_capitalized?js_string}'
}; };
var i18nStringsPersonLvl = { var i18nStringsPersonLvl = {
fileCapitalized: '${i18n().file_capitalized}', fileCapitalized: '${i18n().file_capitalized?js_string}',
contentRequiresFlash: '${i18n().content_requires_flash}', contentRequiresFlash: '${i18n().content_requires_flash?js_string}',
getFlashString: '${i18n().get_flash}' getFlashString: '${i18n().get_flash?js_string}'
}; };
</script> </script>

View file

@ -63,7 +63,7 @@
if ( !onlyUnknownYearPublications ) { if ( !onlyUnknownYearPublications ) {
if ( td1Text == tenYearCount ) { if ( td1Text == tenYearCount ) {
td2Text += "${i18n().last_ten_full_years} " ; td2Text += "${i18n().last_ten_full_years?js_string} " ;
} }
else { else {
td2Text += "<strong>" + tenYearCount + "</strong> ${i18n().last_ten_full_years} " ; td2Text += "<strong>" + tenYearCount + "</strong> ${i18n().last_ten_full_years} " ;

View file

@ -158,9 +158,9 @@
var sparksText = ""; var sparksText = "";
if ( !onlyUnknownYearPublications ) { if ( !onlyUnknownYearPublications ) {
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs + " ${i18n().last_ten_full}").attr("class", "grey-text"); $('#${sparklineContainerID} td.sparkline_number').text(totalPubs + " ${i18n().last_ten_full?js_string}").attr("class", "grey-text");
sparksText += "${i18n().years}"; sparksText += "${i18n().years?js_string}";
if (totalPubs !== totalPublicationCount) { if (totalPubs !== totalPublicationCount) {
//sparksText += ' (' + totalPublicationCount + ' ${i18n().total})' ; //sparksText += ' (' + totalPublicationCount + ' ${i18n().total})' ;
@ -190,18 +190,18 @@
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks; var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks;
if ( totalPubs == 1 ) { if ( totalPubs == 1 ) {
var pubDisplay = "${i18n().publication}"; var pubDisplay = "${i18n().publication?js_string}";
} else { } else {
var pubDisplay = "${i18n().publications}"; var pubDisplay = "${i18n().publications?js_string}";
} }
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).attr("class", "grey-text").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>"); $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).attr("class", "grey-text").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>");
var sparksText = ' ${i18n().from} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}' var sparksText = ' ${i18n().from?js_string} <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
+ ' - ${sparklineVO.latestRenderedPublicationYear?c}</span>'; + ' - ${sparklineVO.latestRenderedPublicationYear?c}</span>';
if (totalPubs !== totalPublicationCount) { if (totalPubs !== totalPublicationCount) {
sparksText += ' (' + totalPublicationCount + ' ${i18n().total})'; sparksText += ' (' + totalPublicationCount + ' ${i18n().total?js_string})';
} }
if (totalPublicationCount) { if (totalPublicationCount) {

View file

@ -1,101 +0,0 @@
collapsed_menu_name = Menu
address_street_two = address street two
loading_website_image = Loading website image
view = view
currently_no_papers_for = Currently there are no {0} papers for
identity_index = Index
service_provider_role = Service Provider Role
intro_searchvivo = Search VIVO
grant_type = grant Type
grants_in_vivo = grants in VIVO
last_grant = Last Grant
no_departments_found = No academic departments found.
leadership_role = Leadership Role
menu_contactus = Contact Us
countries = countries
menu_welcomestart = Welcome
view_all_faculty = view all faculty
menu_copyright = copyright
last_publication = Last publication
menu_item = menu item
address_street_three = address street three
vivo_profile = VIVO profile
identity_myprofile = My profile
unable_to_handle_grant_editing = This form is unable to handle the editing of this grant because it is associated with multiple grant individuals.
unable_to_handle_position_editing = This form is unable to handle the editing of this position because it is associated with multiple Position individuals.
address_label = address label
no_grants_for = Currently there are no grants for
no_faculty_found = No faculty members found.
create_capitalized = Create
first_publication = First publication
address_street_one = address street one
select_award = Selected Award
first_name = First name
change_selection = change selection
menu_support = Support
indiv_foafperson_for = for
statewide_locations = state-wide locations.
password = password
place_of_grant = Place of grant
menu_logout = Log out
identity_edit = Edit Page
menu_loginfull = Log in to manage this site
reviewer_role = Reviewer Role
menu_login = Log in
view_all_departments = view all academic departments
identity_admin = Site Admin
intro_title = Welcome to VIVO
menu_version = Version
grant_date = grant Date
loading_data = loading data
to = to
collection_capitalized = Collection
create_entry = Create Entry
first_grant = First Grant
map_states_string = states.
limit_search = limit search
identity_user = user
menu_about = About
grant_entry_for = grant entry for
regions = regions
faculty_who_are_members_of_org = Here are the faculty in the {0} department who are members of this organization.
placeholder_image = placeholder image
indiv_foafperson_return = return to
enter_new_role_value = Please enter a new value in the Role field.
last_name = Last name
countries_and_regions = countries and regions.
currently_no_researchers = There are currently no researchers with a defined geographic focus.
research_area = individuals in the department with this research area
identity_myaccount = My account
province_or_region = Province or Region
full_name = Full name
researchers = researchers
email_address = Email Address
years_participation_in = Years of Participation in
menu_termuse = Terms of Use
identity_title = VIVO | connect share discover
map_state_string = state.
intro_filtersearch = Filter search
return_to_grant = Return to grant
display_more = more
intro_para2 = Browse or search information on people, departments, courses, grants, and publications.
intro_para1 = VIVO is a research-focused discovery tool that enables collaboration among scholars of all disciplines.
profile_capitalized = Profile
organizer_role = Organizer Role
faculty_memberships = Faculty Memberships
edit_mailing_address = Edit Mailing Address
add_capitalized = Add
attendee_capitalized = Attendee
researchers_in = researchers in
menu_powered = Powered by
view_all_members_of_org = View all the members of this organization.
grants_text_one = This body is from the the template file \
vivo/productMods/templates/freemarker/body/menupage/grants.ftl. \
In the display model, the grants page has a display:requiresBodyTemplate \
property that defines that the grants page overrides the default template. \
The default template for these pages is at /vitro/webapp/web/templates/freemarker/body/menupage/menupage.ftl
grants_two = This technique could be used to define pages without menu items, that get \
their content from a freemarker template. An example would be the about page.
grants_text_three = This would create a page that would use about.ftl as the body. The page would be \
accessed via /about and would override all servlet mappings in web.xml.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -162,17 +162,17 @@
var exportQrCodeUrl = '${urls.base}/qrcode?uri=${individual.uri!}'; var exportQrCodeUrl = '${urls.base}/qrcode?uri=${individual.uri!}';
var baseUrl = '${urls.base}'; var baseUrl = '${urls.base}';
var i18nStrings = { var i18nStrings = {
displayLess: '${i18n().display_less}', displayLess: '${i18n().display_less?js_string}',
displayMoreEllipsis: '${i18n().display_more_ellipsis}', displayMoreEllipsis: '${i18n().display_more_ellipsis?js_string}',
showMoreContent: '${i18n().show_more_content}', showMoreContent: '${i18n().show_more_content?js_string}',
verboseTurnOff: '${i18n().verbose_turn_off}', verboseTurnOff: '${i18n().verbose_turn_off?js_string}',
researchAreaTooltipOne: '${i18n().research_area_tooltip_one}', researchAreaTooltipOne: '${i18n().research_area_tooltip_one?js_string}',
researchAreaTooltipTwo: '${i18n().research_area_tooltip_two}' researchAreaTooltipTwo: '${i18n().research_area_tooltip_two?js_string}'
}; };
var i18nStringsUriRdf = { var i18nStringsUriRdf = {
shareProfileUri: '${i18n().share_profile_uri}', shareProfileUri: '${i18n().share_profile_uri?js_string}',
viewRDFProfile: '${i18n().view_profile_in_rdf}', viewRDFProfile: '${i18n().view_profile_in_rdf?js_string}',
closeString: '${i18n().close}' closeString: '${i18n().close?js_string}'
}; };
</script> </script>

View file

@ -122,23 +122,23 @@
<@lh.listAcademicDepartments /> <@lh.listAcademicDepartments />
<script> <script>
var i18nStrings = { var i18nStrings = {
researcherString: '${i18n().researcher}', researcherString: '${i18n().researcher?js_string}',
researchersString: '${i18n().researchers}', researchersString: '${i18n().researchers?js_string}',
currentlyNoResearchers: '${i18n().currently_no_researchers}', currentlyNoResearchers: '${i18n().currently_no_researchers?js_string}',
countriesAndRegions: '${i18n().countries_and_regions}', countriesAndRegions: '${i18n().countries_and_regions?js_string}',
countriesString: '${i18n().countries}', countriesString: '${i18n().countries?js_string}',
regionsString: '${i18n().regions}', regionsString: '${i18n().regions?js_string}',
statesString: '${i18n().map_states_string}', statesString: '${i18n().map_states_string?js_string}',
stateString: '${i18n().map_state_string}', stateString: '${i18n().map_state_string?js_string}',
statewideLocations: '${i18n().statewide_locations}', statewideLocations: '${i18n().statewide_locations?js_string}',
researchersInString: '${i18n().researchers_in}', researchersInString: '${i18n().researchers_in?js_string}',
inString: '${i18n().in}', inString: '${i18n().in?js_string}',
noFacultyFound: '${i18n().no_faculty_found}', noFacultyFound: '${i18n().no_faculty_found?js_string}',
placeholderImage: '${i18n().placeholder_image}', placeholderImage: '${i18n().placeholder_image?js_string}',
viewAllFaculty: '${i18n().view_all_faculty}', viewAllFaculty: '${i18n().view_all_faculty?js_string}',
viewAllString: '${i18n().view_all}', viewAllString: '${i18n().view_all?js_string}',
viewAllDepartments: '${i18n().view_all_departments}', viewAllDepartments: '${i18n().view_all_departments?js_string}',
noDepartmentsFound: '${i18n().no_departments_found}' noDepartmentsFound: '${i18n().no_departments_found?js_string}'
}; };
// set the 'limmit search' text and alignment // set the 'limmit search' text and alignment
if ( $('input.search-homepage').css('text-align') == "right" ) { if ( $('input.search-homepage').css('text-align') == "right" ) {

View file

@ -3,7 +3,7 @@
<#-- Template for scripts that must be loaded in the head --> <#-- Template for scripts that must be loaded in the head -->
<script> <script>
var i18nStrings = { var i18nStrings = {
allCapitalized: '${i18n().all_capitalized}', allCapitalized: '${i18n().all_capitalized?js_string}',
}; };
</script> </script>
<script type="text/javascript" src="${urls.base}/js/jquery-1.12.4.min.js"></script> <script type="text/javascript" src="${urls.base}/js/jquery-1.12.4.min.js"></script>

View file

@ -1,109 +0,0 @@
menu_contactus = Contact Us
menu_welcomestart = Welcome
menu_copyright = copyright
menu_support = Support
menu_logout = Log out
menu_loginfull = Log in to manage this site
menu_login = Log in
menu_version = Version
menu_about = About
menu_termuse = Terms of Use
menu_powered = Powered by
intro_title = Welcome to VIVO
intro_para1 = VIVO is a research-focused discovery tool that enables collaboration among scholars of all disciplines.
intro_para2 = Browse or search information on people, departments, courses, grants, and publications.
intro_searchvivo = Search VIVO
intro_filtersearch = Filter search
identity_title = VIVO | connect share discover
identity_index = Index
identity_edit = Edit Page
identity_admin = Site Admin
identity_myprofile = My profile
identity_myaccount = My account
identity_user = user
collection_capitalized = Collection
place_of_grant = Place of grant
email_address = Email Address
#
# menupage templates ( /templates/freemarker/body/menupage )
#
grants_text_one = This body is from the the template file \
vivo/productMods/templates/freemarker/body/menupage/grants.ftl. \
In the display model, the grants page has a display:requiresBodyTemplate \
property that defines that the grants page overrides the default template. \
The default template for these pages is at /vitro/webapp/web/templates/freemarker/body/menupage/menupage.ftl
grants_two = This technique could be used to define pages without menu items, that get \
their content from a freemarker template. An example would be the about page.
grants_text_three = This would create a page that would use about.ftl as the body. The page would be \
accessed via /about and would override all servlet mappings in web.xml.
address_street_one = address street one
address_street_two = address street two
address_street_three = address street three
address_label = address label
loading_website_image = Loading website image
researchers_in = researchers in
view = view
grant_type = grant Type
grant_entry_for = grant entry for
regions = regions
grant_date = grant Date
map_states_string = states.
map_state_string = state.
unable_to_handle_grant_editing = This form is unable to handle the editing of this grant because it is associated with multiple grant individuals.
unable_to_handle_position_editing = This form is unable to handle the editing of this position because it is associated with multiple Position individuals.
currently_no_papers_for = Currently there are no {0} papers for
change_selection = change selection
view_all_departments = view all academic departments
first_name = First name
last_name = Last name
first_grant = First Grant
last_grant = Last Grant
currently_no_researchers = There are currently no researchers with a defined geographic focus.
reviewer_role = Reviewer Role
vivo_profile = VIVO profile
loading_data = loading data
select_award = Selected Award
grants_in_vivo = grants in VIVO
service_provider_role = Service Provider Role
view_all_faculty = view all faculty
no_grants_for = Currently there are no grants for
statewide_locations = state-wide locations.
faculty_who_are_members_of_org = Here are the faculty in the {0} department who are members of this organization.
indiv_foafperson_for = for
indiv_foafperson_return = return to
no_departments_found = No academic departments found.
leadership_role = Leadership Role
countries = countries
first_publication = First publication
last_publication = Last publication
research_area = individuals in the department with this research area
password = password
limit_search = limit search
placeholder_image = placeholder image
view_all_members_of_org = View all the members of this organization.
display_more = more
create_entry = Create Entry
attendee_capitalized = Attendee
no_faculty_found = No faculty members found.
create_capitalized = Create
to = to
enter_new_role_value = Please enter a new value in the Role field.
countries_and_regions = countries and regions.
province_or_region = Province or Region
full_name = Full name
researchers = researchers
years_participation_in = Years of Participation in
return_to_grant = Return to grant
profile_capitalized = Profile
organizer_role = Organizer Role
faculty_memberships = Faculty Memberships
edit_mailing_address = Edit Mailing Address
add_capitalized = Add

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Some files were not shown because too many files have changed in this diff Show more