diff --git a/doc/install.html b/doc/install.html index c1e7dc9c..c36762fa 100644 --- a/doc/install.html +++ b/doc/install.html @@ -185,21 +185,21 @@ issuing SPARQL queries that read data, and its URI for issuing SPARQL UPDATE com diff --git a/doc/upgrade-1.6.html b/doc/upgrade-1.6.html index ebfdb24b..3b7b9b58 100644 --- a/doc/upgrade-1.6.html +++ b/doc/upgrade-1.6.html @@ -439,21 +439,21 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl

Mac:

- -

- PC: -

- + + +
  • + PC: +
  • diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl index dcb5297c..8461d540 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl @@ -1,39 +1,39 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#import "lib-datetime.ftl" as dt> - -<#if deptGrants?has_content> -
    - <#list deptGrants as firstRow> - <#assign firstDeptLabel = firstRow["deptLabel"]?upper_case /> - <#assign i18TextString = "" /> - <#if ( firstDeptLabel?index_of("THE") == 0 ) > - <#assign i18TextString = "${i18n().active_grants_for?replace('the','')}" /> - <#else> - <#assign i18TextString = "${i18n().active_grants_for}" /> - -

    ${i18TextString} ${firstRow["deptLabel"]} ${i18n().department}

    - <#break> - - - - - - - <#list deptGrants as resultRow> - - - - - -
    ${i18n().grant_name}${i18n().close_date}
    ${resultRow["activityLabel"]}${dt.formatXsdDateTimeShort(resultRow["dt"], "yearMonthDayPrecision")}
    -<#else> - ${i18n().no_active_grants} - - -
    - - -${stylesheets.add('')} - -${scripts.add('')} - +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#import "lib-datetime.ftl" as dt> + +<#if deptGrants?has_content> +
    + <#list deptGrants as firstRow> + <#assign firstDeptLabel = firstRow["deptLabel"]?upper_case /> + <#assign i18TextString = "" /> + <#if ( firstDeptLabel?index_of("THE") == 0 ) > + <#assign i18TextString = "${i18n().active_grants_for?replace('the','')}" /> + <#else> + <#assign i18TextString = "${i18n().active_grants_for}" /> + +

    ${i18TextString} ${firstRow["deptLabel"]} ${i18n().department}

    + <#break> + + + + + + + <#list deptGrants as resultRow> + + + + + +
    ${i18n().grant_name}${i18n().close_date}
    ${resultRow["grantLabel"]}${dt.formatXsdDateTimeShort(resultRow["dt"], "yearMonthDayPrecision")}
    +<#else> + ${i18n().no_active_grants} + + +
    + + +${stylesheets.add('')} + +${scripts.add('')} + diff --git a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl index 4c029385..ee613943 100644 --- a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl +++ b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl @@ -1,193 +1,193 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#import "lib-vivo-form.ftl" as lvf> -<#include "addAssociatedConceptVocabSpecificDisplay.ftl" > -<#assign existingConcepts = editConfiguration.pageData.existingConcepts/> -<#assign userDefinedConceptUrl = editConfiguration.pageData.userDefinedConceptUrl/> -<#assign sources = editConfiguration.pageData.searchServices/> -<#assign inversePredicate = editConfiguration.pageData.inversePredicate /> - -<#--If edit submission exists, then retrieve validation errors if they exist--> -<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> - <#assign submissionErrors = editSubmission.validationErrors/> - - - -

    ${i18n().manage_concepts}

    - - -<#if submissionErrors?has_content> - - - -<@lvf.unsupportedBrowser urls.base/> - -
    - - - - - - -<#if (existingConcepts?size = 0) > -

    ${i18n().no_concepts_specified}

    -<#else> -   - - -
    - - ${i18n().or} - ${i18n().return_to_profile} -
    -
    - <#assign checkedSource = false /> -

    ${i18n().external_vocabulary_services}

    - <#list sources?values?sort_by("label") as thisSource> - <#assign checkedSource = true/>checked="checked"> - -
    - - ${i18n().or}  ${i18n().create_own_concept}  - - - - - - - - -
    -

    - -

    - - -
    -
    - -   -
    -
    - - -

    - - -

    - -

    - ${i18n().or} ${i18n().return_to_profile} -

    -
    -
    - - - - - -${stylesheets.add('')} -${stylesheets.add('')} - -${stylesheets.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} - - - - +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#import "lib-vivo-form.ftl" as lvf> +<#include "addAssociatedConceptVocabSpecificDisplay.ftl" > +<#assign existingConcepts = editConfiguration.pageData.existingConcepts/> +<#assign userDefinedConceptUrl = editConfiguration.pageData.userDefinedConceptUrl/> +<#assign sources = editConfiguration.pageData.searchServices/> +<#assign inversePredicate = editConfiguration.pageData.inversePredicate /> + +<#--If edit submission exists, then retrieve validation errors if they exist--> +<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#assign submissionErrors = editSubmission.validationErrors/> + + + +

    ${i18n().manage_concepts}

    + + +<#if submissionErrors?has_content> + + + +<@lvf.unsupportedBrowser urls.base/> + +
    + + + + + + +<#if (existingConcepts?size = 0) > +

    ${i18n().no_concepts_specified}

    +<#else> +   + + +
    + + ${i18n().or} + ${i18n().return_to_profile} +
    +
    + <#assign checkedSource = false /> +

    ${i18n().external_vocabulary_services}

    + <#list sources?values?sort_by("label") as thisSource> + <#assign checkedSource = true/>checked="checked"> + +
    + + ${i18n().or}  ${i18n().create_own_concept}  + + + + + + + + +
    +

    + +

    + + +
    +
    + +   +
    +
    + + +

    + + +

    + +

    + ${i18n().or} ${i18n().return_to_profile} +

    +
    +
    + + + + + +${stylesheets.add('')} +${stylesheets.add('')} + +${stylesheets.add('')} +${scripts.add('')} +${scripts.add('')} +${scripts.add('')} +${scripts.add('')} +${scripts.add('')} + + + + diff --git a/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl b/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl deleted file mode 100644 index d3035345..00000000 --- a/productMods/templates/freemarker/edit/forms/personHasTelephoneNumber.ftl +++ /dev/null @@ -1,86 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- this is in request.subject.name --> - -<#-- leaving this edit/add mode code in for reference in case we decide we need it --> - -<#import "lib-vivo-form.ftl" as lvf> - -<#--Retrieve certain edit configuration information--> -<#if editConfiguration.objectUri?has_content> - <#assign editMode = "edit"> -<#else> - <#assign editMode = "add"> - - -<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> - -<#--Retrieve variables needed--> -<#assign telephoneNumberValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "telephoneNumber") /> - -<#--If edit submission exists, then retrieve validation errors if they exist--> -<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> - <#assign submissionErrors = editSubmission.validationErrors/> - - -<#if editMode == "edit"> - <#assign titleVerb="${i18n().edit_capitalized}"> - <#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}"> - <#assign disabledVal="disabled"> -<#else> - <#assign titleVerb="${i18n().create_capitalized}"> - <#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}"> - <#assign disabledVal=""/> - - -<#assign requiredHint = " *" /> - -

    ${titleVerb} ${i18n().telephone_number_for} ${editConfiguration.subjectName}

    - -<#--Display error messages if any--> -<#if submissionErrors?has_content> - - - -<@lvf.unsupportedBrowser urls.base /> - -
    - -
    - -

    - - -

    - - - -

    - ${i18n().or} - ${i18n().cancel_link} -

    - -

    * ${i18n().required_fields}

    - -
    - -
    - -${stylesheets.add('')} -${stylesheets.add('')} -${stylesheets.add('')} - -${scripts.add('', - '', - '', - '')} - - diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3 index ee388246..9656d172 100644 --- a/rdf/display/everytime/PropertyConfig.n3 +++ b/rdf/display/everytime/PropertyConfig.n3 @@ -476,7 +476,7 @@ local:orgFaxContext a :ConfigContext ; local:orgFaxConfig a :ObjectPropertyDisplayConfig ; :listViewConfigFile "listViewConfig-faxNumber.xml"^^xsd:string ; :displayName "fax" ; - vitro:displayRankAnnot 10; + vitro:displayRankAnnot 20; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.SubjectHasPhoneFaxNumberGenerator"^^ ; @@ -688,3 +688,18 @@ local:grantRelatesConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; :propertyGroup . + + + +local:testRemovalContext a :ConfigContext ; + :hasConfiguration local:testRemovalConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:testRemovalConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "related by" ; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:root ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:root ; + :propertyGroup . diff --git a/rdf/display/everytime/PropertyConfigSupp.n3 b/rdf/display/everytime/PropertyConfigSupp.n3 index 86a5fcbe..8f3422a6 100644 --- a/rdf/display/everytime/PropertyConfigSupp.n3 +++ b/rdf/display/everytime/PropertyConfigSupp.n3 @@ -20,3 +20,6 @@ local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ; local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ; :deleteLinkSuppressed "true"^^xsd:boolean . + +local:informationResourceInEditorshipConfig a :ObjectPropertyDisplayConfig ; + :deleteLinkSuppressed "true"^^xsd:boolean . diff --git a/rdf/display/everytime/vivoConceptDataGetters.n3 b/rdf/display/everytime/vivoConceptDataGetters.n3 index 47157443..9f004fa0 100644 --- a/rdf/display/everytime/vivoConceptDataGetters.n3 +++ b/rdf/display/everytime/vivoConceptDataGetters.n3 @@ -25,11 +25,14 @@ display:getDepartmentDataGetter PREFIX rdfs: PREFIX vivo: PREFIX afn: + PREFIX foaf: SELECT DISTINCT (str(?departmentLabel) AS ?deptLabel) ?dept WHERE { ?individualURI vivo:researchAreaOf ?person . - ?person vivo:personInPosition ?posn . - ?posn vivo:positionInOrganization ?dept . + ?person vivo:relatedBy ?posn . + ?posn a vivo:Position . + ?posn vivo:relates ?dept . + ?dept a foaf:Organization . ?dept rdfs:label ?departmentLabel OPTIONAL { ?posn vivo:dateTimeInterval ?dti OPTIONAL { ?dti vivo:end ?end . @@ -44,19 +47,20 @@ display:getDepartmentDataGetter ## detail page for dept research areas ## - + a ; - ; + ; "individual-affiliated-dept-details.ftl" ; "Affiliated Departments" ; "/affiliatedDepartments" . - + a ; """ PREFIX rdfs: PREFIX vivo: + PREFIX foaf: SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) ?person (Str(?researchAreaLabel) AS ?raLabel) @@ -64,9 +68,11 @@ display:getDepartmentDataGetter ?raURI ?orgURI WHERE { - ?orgURI vivo:organizationForPosition ?posn . + ?orgURI vivo:relatedBy ?posn . + ?posn a vivo:Position . ?orgURI rdfs:label ?orgLabel . - ?posn vivo:positionForPerson ?person . + ?posn vivo:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?prsnLabel . ?person vivo:hasResearchArea ?raURI . ?raURI rdfs:label ?researchAreaLabel diff --git a/rdf/display/everytime/vivoOrganizationDataGetters.n3 b/rdf/display/everytime/vivoOrganizationDataGetters.n3 index 7e3c301f..89466c5d 100644 --- a/rdf/display/everytime/vivoOrganizationDataGetters.n3 +++ b/rdf/display/everytime/vivoOrganizationDataGetters.n3 @@ -32,10 +32,13 @@ display:getResearchAreaDataGetter PREFIX rdfs: PREFIX vivo: PREFIX afn: + PREFIX foaf: SELECT DISTINCT (str(?researchAreaLabel) AS ?raLabel) ?ra WHERE { - ?individualURI vivo:organizationForPosition ?posn . - ?posn vivo:positionForPerson ?person . + ?individualURI vivo:relatedBy ?posn . + ?posn a vivo:Position . + ?posn vivo:relates ?person . + ?person a foaf:Person . ?person vivo:hasResearchArea ?ra . ?ra rdfs:label ?researchAreaLabel OPTIONAL { ?posn vivo:dateTimeInterval ?dti @@ -51,19 +54,20 @@ display:getResearchAreaDataGetter ## detail page for non-academic department research areas ## - + a ; - ; + ; "individual-affiliated-res-area-details.ftl" ; "Affiliated Research Areas" ; "/affiliatedResearchAreas" . - + a ; """ PREFIX rdfs: PREFIX vivo: + PREFIX foaf: SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) ?person (str(?researchAreaLabel) AS ?raLabel) @@ -71,9 +75,11 @@ display:getResearchAreaDataGetter ?raURI ?orgURI WHERE { - ?orgURI vivo:organizationForPosition ?posn . + ?orgURI vivo:relatedBy ?posn . + ?posn a vivo:Position . ?orgURI rdfs:label ?organizationLabel . - ?posn vivo:positionForPerson ?person . + ?posn vivo:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?prsnLabel . ?person vivo:hasResearchArea ?raURI . ?raURI rdfs:label ?researchAreaLabel @@ -84,19 +90,20 @@ display:getResearchAreaDataGetter ## detail page for academic department research areas ## - + a ; - ; + ; "individual-dept-res-area-details.ftl" ; "Departmental Research Areas" ; "/deptResearchAreas" . - + a ; """ PREFIX rdfs: PREFIX vivo: + PREFIX foaf: SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) ?person (Str(?researchAreaLabel) AS ?raLabel) @@ -104,9 +111,11 @@ display:getResearchAreaDataGetter ?raURI ?orgURI WHERE { - ?orgURI vivo:organizationForPosition ?posn . - ?orgURI rdfs:label ?orgLabel . - ?posn vivo:positionForPerson ?person . + ?orgURI vivo:relatedBy ?posn . + ?posn a vivo:Position . + ?orgURI rdfs:label ?organizationLabel . + ?posn vivo:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?prsnLabel . ?person vivo:hasResearchArea ?raURI . ?raURI rdfs:label ?researchAreaLabel @@ -134,14 +143,18 @@ display:getGrantsDataGetter PREFIX rdfs: PREFIX vivo: PREFIX afn: - SELECT DISTINCT ?activity + PREFIX foaf: + SELECT DISTINCT ?grant WHERE { - ?individualURI vivo:organizationForPosition ?posn . - ?posn vivo:positionForPerson ?person . - ?person ?roleProperty ?role . - ?roleProperty rdfs:subPropertyOf vivo:hasResearcherRole . - ?role vivo:roleContributesTo ?activity . - ?activity vivo:dateTimeInterval ?dti . + ?individualURI vivo:relatedBy ?posn . + ?posn a vivo:Position . + ?posn vivo:relates ?person . + ?person a foaf:Person . + ?person ?role . + ?role a vivo:ResearcherRole . + ?role vivo:relatedBy ?grant . + ?grant a vivo:Grant . + ?grant vivo:dateTimeInterval ?dti . ?dti vivo:end ?end. ?end vivo:dateTime ?dt FILTER (?dt > afn:now()) @@ -151,35 +164,39 @@ display:getGrantsDataGetter ## data getter for the grants detail page ## - + a ; - ; + ; "individual-dept-active-grants.ftl" ; "Departmental Grants" ; "/deptGrants" . - + a ; """ PREFIX rdfs: PREFIX vivo: PREFIX afn: - SELECT DISTINCT (str (?actLabel) AS ?activityLabel) ?dt (str(?departmentLabel) AS ?deptLabel) ?activity + PREFIX foaf: + SELECT DISTINCT (str (?gLabel) AS ?grantLabel) ?dt (str(?departmentLabel) AS ?deptLabel) ?grant WHERE { - ?individualURI vivo:organizationForPosition ?posn . + ?individualURI vivo:relatedBy ?posn . + ?posn a vivo:Position . ?individualURI rdfs:label ?departmentLabel . - ?posn vivo:positionForPerson ?person . - ?person ?roleProperty ?role . - ?roleProperty rdfs:subPropertyOf vivo:hasResearcherRole . - ?role vivo:roleContributesTo ?activity . - ?activity rdfs:label ?actLabel . - ?activity vivo:dateTimeInterval ?dti . + ?posn vivo:relates ?person . + ?person a foaf:Person . + ?person ?role . + ?role a vivo:ResearcherRole . + ?role vivo:relatedBy ?grant . + ?grant a vivo:Grant . + ?grant rdfs:label ?gLabel . + ?grant vivo:dateTimeInterval ?dti . ?dti vivo:end ?end. ?end vivo:dateTime ?dt FILTER (?dt > afn:now()) } - ORDER BY ?activityLabel + ORDER BY ?gLabel """ ; "deptGrants" . diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java deleted file mode 100644 index bdfb65ba..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasTelephoneNumberGenerator.java +++ /dev/null @@ -1,105 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.hp.hpl.jena.vocabulary.XSD; - -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -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.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions; -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.configuration.validators.AntiXssValidation; - -public class PersonHasTelephoneNumberGenerator extends VivoBaseGenerator implements - EditConfigurationGenerator { - private Log log = LogFactory.getLog(PersonHasTelephoneNumberGenerator.class); - - @Override - public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, - HttpSession session) throws Exception { - - EditConfigurationVTwo conf = new EditConfigurationVTwo(); - - initBasics(conf, vreq); - initPropertyParameters(vreq, session, conf); - initObjectPropForm(conf, vreq); - String phoneUri = getPhoneUri(vreq); - - conf.setTemplate("personHasTelephoneNumber.ftl"); - - conf.setVarNameForSubject("person"); - conf.setVarNameForPredicate("predicate"); - conf.setVarNameForObject("individualVcard"); - - conf.setN3Required( Arrays.asList( n3ForNewPhone ) ); - conf.setN3Optional( Arrays.asList( telephoneNumberAssertion ) ); - - conf.addNewResource("phone", DEFAULT_NS_FOR_NEW_RESOURCE); - conf.addNewResource("individualVcard", DEFAULT_NS_FOR_NEW_RESOURCE); - - conf.setLiteralsOnForm(Arrays.asList("telephoneNumber" )); - - conf.addSparqlForExistingLiteral("telephoneNumber", telephoneNumberQuery); - conf.addSparqlForAdditionalUrisInScope("individualVcard", individualVcardQuery); - - if ( conf.isUpdate() ) { - HashMap> urisInScope = new HashMap>(); - urisInScope.put("phone", Arrays.asList(new String[]{phoneUri})); - conf.addUrisInScope(urisInScope); - } - - conf.addField( new FieldVTwo(). - setName("telephoneNumber") - .setRangeDatatypeUri( XSD.xstring.toString() ). - setValidators( list("nonempty") )); - - conf.addValidator(new AntiXssValidation()); - - prepare(vreq, conf); - return conf; - } - - /* N3 assertions */ - - final static String n3ForNewPhone = - "?person ?individualVcard . \n" + - "?individualVcard a . \n" + - "?individualVcard ?person . \n" + - "?individualVcard ?phone . \n" + - "?phone a . " ; - - final static String telephoneNumberAssertion = - "?phone ?telephoneNumber ."; - - /* Queries for editing an existing entry */ - - final static String individualVcardQuery = - "SELECT ?existingIndividualVcard WHERE { \n" + - "?person ?existingIndividualVcard . \n" + - "}"; - - final static String telephoneNumberQuery = - "SELECT ?existingTelephoneNumber WHERE {\n"+ - "?phone ?existingTelephoneNumber . }"; - - private String getPhoneUri(VitroRequest vreq) { - String phoneUri = vreq.getParameter("phoneUri"); - - return phoneUri; - } -}