From acef06450d0cc0ab9414537704fba99b7fc10bdf Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Tue, 14 Oct 2014 15:44:40 -0600 Subject: [PATCH 1/9] Microformat markup for Persons using schema.org; JIRA VIVO-882 --- .../individual/individual--foaf-person-2column.ftl | 2 +- .../individual--foaf-person-quickview.ftl | 2 +- .../individual/individual-contactInfo-2column.ftl | 6 +++--- .../partials/individual/individual-contactInfo.ftl | 4 ++-- .../individual/propStatement-personInPosition.ftl | 14 +++++++++----- themes/wilma/templates/individual--foaf-person.ftl | 6 +++--- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl index 8767a3d5..38560fa2 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl @@ -23,7 +23,7 @@ <#assign visRequestingTemplate = "foaf-person-2column"> <#--add the VIVO-ORCID interface --> <#include "individual-orcidInterface.ftl"> -
+
<#-- Image --> <#assign individualImage> diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl index 558d6aa8..b6ef6911 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl @@ -51,7 +51,7 @@ -
+
style="width:45%" >
<#if relatedSubject??> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl index 19540597..8745c0cc 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl @@ -39,7 +39,7 @@
    <#list phone.statements as statement>
  • style="padding-left:10px;"> - ${statement.number!} + ${statement.number!} <@p.editingLinks "${phone.localName}" "${phone.name}" statement editable phone.rangeUri />
  • @@ -65,11 +65,11 @@ <#list email.statements as statement>
  • style="padding-left:10px;"> - + <@p.editingLinks "${email.localName}" "${email.name}" statement editable email.rangeUri />
- \ No newline at end of file + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index 0f990bb2..4399ea5c 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -24,7 +24,7 @@
    style="list-style:none;margin-left:0;"> <#list phone.statements as statement>
  • - ${statement.number!} + ${statement.number!} <@p.editingLinks "${phone.localName}" "${phone.name}" statement editable phone.rangeUri />
  • @@ -46,7 +46,7 @@
      style="list-style:none;margin-left:0;"> <#list email.statements as statement>
    • - + <@p.editingLinks "${email.localName}" "${email.name}" statement editable email.rangeUri />
    • diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl index e6aebc47..e05a47e9 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl @@ -8,28 +8,32 @@ <#import "lib-sequence.ftl" as s> <#import "lib-datetime.ftl" as dt> + <@showPosition statement /> <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the next statement --> <#macro showPosition statement> + <#local posTitle> + ${statement.positionTitle!statement.hrJobTitle!} + <#local linkedIndividual> <#if statement.org??> - ${statement.orgName} + ${statement.orgName} <#else> <#-- This shouldn't happen, but we must provide for it --> - ${i18n().missing_organization} + ${i18n().missing_organization} <#-- The sparql query returns both the org's parent (middleOrg) and grandparent (outerOrg). For now, we are only displaying the parent in the list view. --> <#local middleOrganization> <#if statement.middleOrg??> - ${statement.middleOrgName!} + ${statement.middleOrgName!} - <@s.join [ statement.positionTitle!statement.hrJobTitle!, linkedIndividual, middleOrganization! ]/> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> + <@s.join [ posTitle, linkedIndividual, middleOrganization! ]/> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> - \ No newline at end of file + diff --git a/themes/wilma/templates/individual--foaf-person.ftl b/themes/wilma/templates/individual--foaf-person.ftl index 0799d650..ebc894e7 100644 --- a/themes/wilma/templates/individual--foaf-person.ftl +++ b/themes/wilma/templates/individual--foaf-person.ftl @@ -24,7 +24,7 @@ <#--add the VIVO-ORCID interface --> <#include "individual-orcidInterface.ftl"> -
      +
      @@ -72,7 +72,7 @@ <#else>

      <#-- Label --> - <@p.label individual editable labelCount localesCount/> + <@p.label individual editable labelCount localesCount/> <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!> @@ -84,7 +84,7 @@ <@p.verboseDisplay title /> <#list title.statements as statement> - ${statement.preferredTitle} + ${statement.preferredTitle} <@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri /> From 4dec645dd87bb8c834d945c9d3a7b7989ffd4eec Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Wed, 15 Oct 2014 10:06:54 -0600 Subject: [PATCH 2/9] fixed required 'name' itemprop for Person and made position organizations more descriptive; JIRA VIVO-882 --- .../individual/propStatement-personInPosition.ftl | 10 +++++++--- themes/wilma/templates/individual--foaf-person.ftl | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl index e05a47e9..d3ad9014 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-personInPosition.ftl @@ -20,17 +20,21 @@ <#local linkedIndividual> <#if statement.org??> - ${statement.orgName} + + ${statement.orgName} + <#else> <#-- This shouldn't happen, but we must provide for it --> - ${i18n().missing_organization} + ${i18n().missing_organization} <#-- The sparql query returns both the org's parent (middleOrg) and grandparent (outerOrg). For now, we are only displaying the parent in the list view. --> <#local middleOrganization> <#if statement.middleOrg??> - ${statement.middleOrgName!} + + ${statement.middleOrgName!} + diff --git a/themes/wilma/templates/individual--foaf-person.ftl b/themes/wilma/templates/individual--foaf-person.ftl index ebc894e7..53576623 100644 --- a/themes/wilma/templates/individual--foaf-person.ftl +++ b/themes/wilma/templates/individual--foaf-person.ftl @@ -72,7 +72,7 @@ <#else>

      <#-- Label --> - <@p.label individual editable labelCount localesCount/> + <@p.label individual editable labelCount localesCount/> <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> <#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!> From 4ee01cfe71a73170729b43a9a25d049548ab5de6 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Tue, 18 Nov 2014 12:14:18 -0500 Subject: [PATCH 3/9] VIVO-901: allow more classes to have webpages --- rdf/display/everytime/PropertyConfig.n3 | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3 index 11f47803..0e3e5e32 100644 --- a/rdf/display/everytime/PropertyConfig.n3 +++ b/rdf/display/everytime/PropertyConfig.n3 @@ -953,6 +953,54 @@ local:webpageInfoConfig a :ObjectPropertyDisplayConfig ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; :propertyGroup . +local:webpageSoftwareContext a :ConfigContext ; + :hasConfiguration local:webpageSoftwareConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedByRoot ; + :qualifiedBy . + +local:webpageSoftwareConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-webpage.xml"^^xsd:string ; + :displayName "webpage" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; + :propertyGroup . + +local:webpageFacilityContext a :ConfigContext ; + :hasConfiguration local:webpageFacilityConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedByRoot ; + :qualifiedBy . + +local:webpageFacilityConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-webpage.xml"^^xsd:string ; + :displayName "webpage" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; + :propertyGroup . + +local:webpageProjectContext a :ConfigContext ; + :hasConfiguration local:webpageProjectConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedByRoot ; + :qualifiedBy . + +local:webpageProjectConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-webpage.xml"^^xsd:string ; + :displayName "webpage" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; + :propertyGroup . + local:webpageEventContext a :ConfigContext ; :hasConfiguration local:webpageEventConfig ; :configContextFor ; From f1c10e87681234afd3046972e9e5c884e1f562d2 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Fri, 21 Nov 2014 11:07:18 -0500 Subject: [PATCH 4/9] added optional role in field to the custom form for editor role --- .../templates/freemarker/edit/forms/addEditorRoleToPerson.ftl | 2 +- .../generators/AddEditorRoleToPersonGenerator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/addEditorRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addEditorRoleToPerson.ftl index e0e97118..4e5a2e0f 100644 --- a/productMods/templates/freemarker/edit/forms/addEditorRoleToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addEditorRoleToPerson.ftl @@ -20,7 +20,7 @@ roleExamples--> <#--Variable assignments for Add Clinical Role To Person--> <#assign roleDescriptor = "${i18n().collection_series_editor_role}" /> <#assign typeSelectorLabel = "${i18n().editor_role_in}" /> -<#assign genericLabel = "Collection" /> +<#assign genericLabel = "Collection or Series" /> <#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Collection'}" /> diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java index f2eb0e3d..36721a5e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java @@ -53,7 +53,7 @@ public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGener /** Do not show the role label field for the AddEditorRoleToPerson form */ @Override - boolean isShowRoleLabelField() { return false; } + boolean isShowRoleLabelField() { return true; } /* * Use the methods below to change the date/time precision in the From 1770c41a35e1372f1b8082d8c672730a9cedf328 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 3 Dec 2014 12:35:55 -0500 Subject: [PATCH 5/9] No Jira issue. Links to departments on the home page were not working if the uri was not the default namespace. --- productMods/js/homePageUtils.js | 4 ++-- productMods/templates/freemarker/lib/lib-home-page.ftl | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/productMods/js/homePageUtils.js b/productMods/js/homePageUtils.js index e159ed8f..09cad684 100644 --- a/productMods/js/homePageUtils.js +++ b/productMods/js/homePageUtils.js @@ -134,7 +134,7 @@ $(document).ready(function(){ //Check to see if this index hasn't already been employed if(!indexFound) { //if this index hasn't already been employed then utilize it - html += "
    • " + academicDepartments[index].name + "
    • "; //add this index to the set of already used indices @@ -146,7 +146,7 @@ $(document).ready(function(){ } else { for ( var i=0;i" + academicDepartments[i].name + ""; } diff --git a/productMods/templates/freemarker/lib/lib-home-page.ftl b/productMods/templates/freemarker/lib/lib-home-page.ftl index 25e119b4..c333f091 100644 --- a/productMods/templates/freemarker/lib/lib-home-page.ftl +++ b/productMods/templates/freemarker/lib/lib-home-page.ftl @@ -165,8 +165,7 @@ var academicDepartments = [ <#list academicDeptDG as resultRow> <#assign uri = resultRow["theURI"] /> <#assign label = resultRow["name"] /> - <#assign localName = uri?substring(uri?last_index_of("/")) /> - {"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>, + {"uri": "${uri?url}", "name": "${label}"}<#if (resultRow_has_next)>, ]; From 3188fa767618f7f2241401b5d3f1585664dabd5e Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Fri, 5 Dec 2014 17:01:32 -0500 Subject: [PATCH 6/9] VIVO-927: fixed number formatting issue which appeared with international users --- productMods/templates/freemarker/lib/lib-home-page.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/productMods/templates/freemarker/lib/lib-home-page.ftl b/productMods/templates/freemarker/lib/lib-home-page.ftl index c333f091..3d9aef0f 100644 --- a/productMods/templates/freemarker/lib/lib-home-page.ftl +++ b/productMods/templates/freemarker/lib/lib-home-page.ftl @@ -39,7 +39,7 @@ <#if (class.uri?contains("FacultyMember")) > <#assign foundClassGroup = true /> <#if (class.individualCount > 0) > - + <#else> From 721fc7437bb4f76fe071cf4232e616120f0c59d9 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Mon, 8 Dec 2014 10:10:28 -0500 Subject: [PATCH 7/9] No Jira issue. Updated PrpertyConfig.n3 so that an EventSeries can have a webpage. --- rdf/display/everytime/PropertyConfig.n3 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3 index 0e3e5e32..65d12d98 100644 --- a/rdf/display/everytime/PropertyConfig.n3 +++ b/rdf/display/everytime/PropertyConfig.n3 @@ -1017,6 +1017,22 @@ local:webpageEventConfig a :ObjectPropertyDisplayConfig ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; :propertyGroup . +local:webpageEventSeriesContext a :ConfigContext ; + :hasConfiguration local:webpageEventSeriesConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedByRoot ; + :qualifiedBy . + +local:webpageEventSeriesConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-webpage.xml"^^xsd:string ; + :displayName "webpage" ; + vitro:displayRankAnnot 40; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageWebpagesForIndividualGenerator"^^ ; + :propertyGroup . + local:fullNameContext a :ConfigContext ; :hasConfiguration local:fullNameConfig ; :configContextFor ; From 1e42cfa09e948aea26d5e7c4c164a1df7617bee0 Mon Sep 17 00:00:00 2001 From: j2blake Date: Mon, 8 Dec 2014 10:54:26 -0500 Subject: [PATCH 8/9] VIVO-778 Refactor the connections to the TBox reasoner. Replace PelletListener with a TBoxReasonerModule in the Application. The reasoner will be accessible only through here, not as a context attribute or through the WebappDaoFactory. Split out the initialization of the TBox reasoner from SimpleReasonerSetup. Break out the filtering of TBox changes into a ConfiguredReasonerListener. Refactor the threading logic into a BasicTBoxReasonerDriver. Add a factory for creating VitroBackgroundThreads in an Executor. Isolate the actual reasoner into a TBoxReasoner implementation. In this case, PelletTBoxReasoner. Combine the consistency flag, error flag, explanation, and running status into one TBoxReasonerStatus object. --- config/applicationSetup.n3 | 31 +++++++++++-------- .../WEB-INF/resources/startup_listeners.txt | 1 + 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/config/applicationSetup.n3 b/config/applicationSetup.n3 index 8f7ccf8e..46ee736c 100644 --- a/config/applicationSetup.n3 +++ b/config/applicationSetup.n3 @@ -3,33 +3,38 @@ :application a , ; - :hasSearchEngine :searchEngineWrapper ; - :hasImageProcessor :imageProcessor ; - :hasFileStorage :fileStorage ; - :hasContentTripleSource :contentTripleSource ; - :hasConfigurationTripleSource :configurationTripleSource . + :hasSearchEngine :instrumentedSearchEngineWrapper ; + :hasImageProcessor :jaiImageProcessor ; + :hasFileStorage :ptiFileStorage ; + :hasContentTripleSource :sdbContentTripleSource ; + :hasConfigurationTripleSource :tdbConfigurationTripleSource ; + :hasTBoxReasonerModule :pelletTBoxReasonerModule . -:imageProcessor +:jaiImageProcessor a , . -:fileStorage +:ptiFileStorage a , . -:searchEngineWrapper +:instrumentedSearchEngineWrapper a , ; - :wraps :searchEngine . + :wraps :solrSearchEngine . -:searchEngine +:solrSearchEngine a , . -:contentTripleSource +:sdbContentTripleSource a , . -:configurationTripleSource +:tdbConfigurationTripleSource a , - . \ No newline at end of file + . + +:pelletTBoxReasonerModule + a , + . \ No newline at end of file diff --git a/productMods/WEB-INF/resources/startup_listeners.txt b/productMods/WEB-INF/resources/startup_listeners.txt index 9514f2bf..0e84a98b 100644 --- a/productMods/WEB-INF/resources/startup_listeners.txt +++ b/productMods/WEB-INF/resources/startup_listeners.txt @@ -37,6 +37,7 @@ edu.cornell.mannlib.vitro.webapp.servlet.setup.FileGraphSetup # Invokes process to perform updates to align with ontology changes if needed --> edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase +edu.cornell.mannlib.vitro.webapp.application.ApplicationImpl$ReasonersSetup edu.cornell.mannlib.vitro.webapp.servlet.setup.SimpleReasonerSetup # Must run after JenaDataSourceSetup From 48f37224280f51d2d604dcad075e1a0da570e927 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Mon, 8 Dec 2014 12:42:06 -0500 Subject: [PATCH 9/9] No Jira issue. Added a boolean to indicate whether an individual is an event. For the microformats. --- .../templatemodels/individual/IndividualTemplateModel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java index 8c50f025..1332876e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java +++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/IndividualTemplateModel.java @@ -37,6 +37,7 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel { private static final String CREDENTIAL_CLASS = "http://vivoweb.org/ontology/core#Credential"; private static final String DTP_CLASS = "http://vivoweb.org/ontology/core#DateTimeValuePrecision"; private static final String ORGANIZATION_CLASS = FOAF + "Organization"; + private static final String EVENT_CLASS = "http://purl.org/NET/c4dm/event.owl#Event"; private static final String BASE_VISUALIZATION_URL = UrlBuilder.getUrl(Route.VISUALIZATION_SHORT.path()); @@ -79,6 +80,10 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel { return isVClass(ORGANIZATION_CLASS); } + public boolean event() { + return isVClass(EVENT_CLASS); + } + public String coAuthorVisUrl() { String url = BASE_VISUALIZATION_URL + "/" + VisualizationFrameworkConstants.COAUTHORSHIP_VIS_SHORT_URL + "/"; return getVisUrl(url);