diff --git a/doc/install.html b/doc/install.html index c36762fa..00c033cd 100644 --- a/doc/install.html +++ b/doc/install.html @@ -60,7 +60,7 @@

VIVO inside Tomcat

When you run the build script to compile and deploy VIVO - (see Step 6, below), the files will be deployed to a + (see Step 5, below), the files will be deployed to a directory inside Tomcat. This is the actual executing code for VIVO, but you won’t need to look at it or change it. If you need to change VIVO, make the changes in the distribution directory, and run the build @@ -78,7 +78,7 @@ in the build.properties file (see Step 4, below). You must create this directory before starting VIVO, you must create the runtime.properties file in this directory - (see Step 5, below), and you + (see Step 6, below), and you must ensure that Tomcat has permission to read and write to this directory when it runs.

@@ -113,10 +113,10 @@ issuing SPARQL queries that read data, and its URI for issuing SPARQL UPDATE com Specify build properties
  • - Specify runtime properties + Compile and deploy
  • - Compile and deploy + Specify runtime properties
  • Configure Tomcat @@ -156,10 +156,9 @@ issuing SPARQL queries that read data, and its URI for issuing SPARQL UPDATE com

    diff --git a/languages/example/themes/wilma/i18n/all_es.properties b/languages/example/themes/wilma/i18n/all_es.properties index c779a684..35ac2536 100644 --- a/languages/example/themes/wilma/i18n/all_es.properties +++ b/languages/example/themes/wilma/i18n/all_es.properties @@ -194,14 +194,7 @@ hyperlink = Hiperenlace # # accounts templates ( /templates/freemarker/body/accounts ) # -congratulations = ¡Enhorabuena! -we_have_created_your_account = Hemos creado el nuevo {0} cuenta asociada a {1}. -did_not_request_text = Si no has solicitado esta nueva cuenta puede ignorar este mensaje. Esta solicitud caducará si no se hubiere pronunciado sobre durante 30 días. -click_to_create_password = Haga clic en el enlace de abajo para crear la contraseña de su cuenta usando nuestro servidor seguro. password = contraseña -if_link_failed = Si el enlace no funciona, puedes copiar y pegar el enlace directamente en la barra de direcciones de su navegador. -thanks = ¡Gracias! -paste_the_link = Pega el siguiente enlace en la barra de direcciones de su navegador para crear la contraseña de su cuenta usando nuestro servidor seguro. # # harvester templates ( /templates/freemarker/body/harvester ) @@ -356,7 +349,7 @@ selected_conference = Conferencia Seleccionado years_participation_in = Años de participación en grant_entry_for = autorizará la entrada de -select_existing_pub_or_enter_new = Por favor seleccione una subvención actual en el campo de título o ingresar uno nuevo. +select_existing_pub_or_enter_new = Por favor seleccione una publicación actual en el campo de título o ingresar uno nuevo. unable_to_handle_grant_editing = Esta forma no es capaz de manejar la edición de esta subvención, ya que se asocia con múltiples individuos subvención. grant_type = concesión de la @@ -869,4 +862,14 @@ select_credential_or_enter_name = Por favor, introduzca o seleccione un valor en type_of_credential = Tipo de Credencial credential_name = Nombre de Credencial selected_credential = Credential seleccionado -year_issued = Año de Emisión \ No newline at end of file +year_issued = Año de Emisión +year_awarded_for = año otorgado por +create_year_awarded = Crear año concede +edit_year_awarded = Editar año concede +publication_date_for = fecha de publicación de +create_publication_date = Crear fecha de publicación +edit_publication_date = Editar fecha de publicación +name_prefix = Prefijo de nombre +name_suffix = Sufijo de nombre +administering_organization_for = administración de la organización para +missing_credential = falta credencial \ No newline at end of file diff --git a/productMods/config/listViewConfig-adviseeIn.xml b/productMods/config/listViewConfig-adviseeIn.xml index b7d6e261..3a38a1f1 100644 --- a/productMods/config/listViewConfig-adviseeIn.xml +++ b/productMods/config/listViewConfig-adviseeIn.xml @@ -28,31 +28,30 @@ WHERE { ?subject ?property ?adviseeRole . ?adviseeRole core:relatedBy ?advisingRel . - ?subject core:relatedBy ?advisingRel . LET ( ?localName := afn:localname(?advisingRel) ) OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel } OPTIONAL { ?advisingRel core:relates ?advisor . ?advisor a foaf:Person . - OPTIONAL { ?advisor rdfs:label ?advisorLabel } + ?advisor rdfs:label ?advisorLabel } OPTIONAL { ?advisingRel core:degreeCandidacy ?degree . ?degree rdfs:label ?degreeLabel . - ?degree core:abbreviation ?degreeAbbr + } + OPTIONAL { ?advisingRel core:degreeCandidacy ?degree . + ?degree core:abbreviation ?degreeAbbr . } OPTIONAL { ?advisingRel vitro:mostSpecificType ?subclass . ?subclass rdfs:subClassOf core:AdvisingRelationship } - OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } + OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart } - OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } ORDER BY ?subclass DESC(?dateTimeEnd) @@ -60,11 +59,17 @@ PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> CONSTRUCT { - ?subclass rdfs:subClassOf core:AdvisingRelationship + ?advisingRel vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf core:AdvisingRelationship } WHERE { - ?subclass rdfs:subClassOf core:AdvisingRelationship + ?subject ?property ?adviseeRole . + ?adviseeRole core:relatedBy ?advisingRel . + ?advisingRel a core:AdvisingRelationship . + ?advisingRel vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf core:AdvisingRelationship } @@ -74,6 +79,7 @@ CONSTRUCT { ?subject ?property ?adviseeRole . ?adviseeRole core:relatedBy ?advisingRel . + ?advisingRel a core:AdvisingRelationship . ?advisingRel rdfs:label ?advisingRelLabel . } WHERE { { @@ -86,7 +92,6 @@ ?adviseeRole a core:AdviseeRole . ?adviseeRole core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . - ?advisingRel ?advisingRelProperty ?advisingRelValue . ?advisingRel rdfs:label ?advisingRelLabel } } @@ -105,8 +110,8 @@ ?advisingRel a core:AdvisingRelationship . ?advisingRel core:relates ?advisor . ?advisor a foaf:Person . - ?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole . ?advisor rdfs:label ?advisorLabel . + ?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole . ?advisorRole a core:AdvisorRole . ?advisingRel core:degreeCandidacy ?degree . ?degree rdfs:label ?degreeLabel . @@ -134,7 +139,13 @@ ?advisingRel a core:AdvisingRelationship . ?advisingRel core:degreeCandidacy ?degree . ?degree rdfs:label ?degreeLabel . - ?degree core:abbreviation ?degreeAbbr + } UNION { + ?subject ?property ?adviseeRole . + ?adviseeRole a core:AdviseeRole . + ?adviseeRole core:relatedBy ?advisingRel . + ?advisingRel a core:AdvisingRelationship . + ?advisingRel core:degreeCandidacy ?degree . + ?degree core:abbreviation ?degreeAbbr } } @@ -143,18 +154,16 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?adviseeRole . + ?adviseeRole a core:AdviseeRole . ?adviseeRole core:relatedBy ?advisingRel . - ?subject core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:dateTimeInterval ?dateTimeInterval . - ?advisingRel core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart } WHERE { ?subject ?property ?adviseeRole . ?adviseeRole a core:AdviseeRole . ?adviseeRole core:relatedBy ?advisingRel . - ?subject core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . @@ -166,8 +175,8 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?adviseeRole . + ?adviseeRole a core:AdviseeRole . ?adviseeRole core:relatedBy ?advisingRel . - ?subject core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . @@ -175,8 +184,8 @@ } WHERE { ?subject ?property ?adviseeRole . ?adviseeRole a core:AdviseeRole . + ?adviseeRole a core:AdviseeRole . ?adviseeRole core:relatedBy ?advisingRel . - ?subject core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . diff --git a/productMods/config/listViewConfig-advisorIn.xml b/productMods/config/listViewConfig-advisorIn.xml index 71f60a20..25146b7a 100644 --- a/productMods/config/listViewConfig-advisorIn.xml +++ b/productMods/config/listViewConfig-advisorIn.xml @@ -32,28 +32,26 @@ OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel } OPTIONAL { ?advisingRel core:relates ?advisee . ?advisee a foaf:Person . - ?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . - ?adviseeRole a core:AdviseeRole . - OPTIONAL { ?advisee rdfs:label ?adviseeLabel } + ?advisee rdfs:label ?adviseeLabel } OPTIONAL { ?advisingRel core:degreeCandidacy ?degree . - OPTIONAL { ?degree rdfs:label ?degreeLabel } - OPTIONAL { ?degree core:abbreviation ?degreeAbbr } + ?degree rdfs:label ?degreeLabel . + } + OPTIONAL { ?advisingRel core:degreeCandidacy ?degree . + ?degree core:abbreviation ?degreeAbbr } OPTIONAL { ?advisingRel vitro:mostSpecificType ?subclass . ?subclass rdfs:subClassOf core:AdvisingRelationship } - OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } + OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart } - OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } ORDER BY ?subclass DESC(?dateTimeEnd) @@ -123,7 +121,6 @@ ?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . ?adviseeRole a core:AdviseeRole . ?advisingRel core:degreeCandidacy ?degree . - ?degree a core:AcademicDegree . ?degree rdfs:label ?degreeLabel . ?degree core:abbreviation ?degreeAbbr } WHERE { @@ -132,15 +129,6 @@ ?advisorRole a core:AdvisorRole . ?advisorRole core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . - } UNION { - ?subject ?property ?advisorRole . - ?advisorRole a core:AdvisorRole . - ?advisorRole core:relatedBy ?advisingRel . - ?advisingRel a core:AdvisingRelationship . - ?advisingRel core:relates ?advisee . - ?advisee a foaf:Person . - ?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . - ?adviseeRole a core:AdviseeRole } UNION { ?subject ?property ?advisorRole . ?advisorRole a core:AdvisorRole . @@ -157,7 +145,6 @@ ?advisorRole core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:degreeCandidacy ?degree . - ?degree a core:AcademicDegree . ?degree rdfs:label ?degreeLabel . } UNION { ?subject ?property ?advisorRole . @@ -165,7 +152,6 @@ ?advisorRole core:relatedBy ?advisingRel . ?advisingRel a core:AdvisingRelationship . ?advisingRel core:degreeCandidacy ?degree . - ?degree a core:AcademicDegree . ?degree core:abbreviation ?degreeAbbr } } diff --git a/productMods/config/listViewConfig-awardOrHonor.xml b/productMods/config/listViewConfig-awardOrHonor.xml index b4f07be7..4dbb907d 100644 --- a/productMods/config/listViewConfig-awardOrHonor.xml +++ b/productMods/config/listViewConfig-awardOrHonor.xml @@ -26,27 +26,25 @@ WHERE { ?subject ?property ?awardReceipt . ?awardReceipt a core:AwardReceipt . - OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel } - OPTIONAL { ?awardReceipt core:relates ?award . + OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel } + OPTIONAL { ?awardReceipt core:relates ?award . ?award a core:Award . - ?award core:relatedBy ?awardReceipt - OPTIONAL { ?award rdfs:label ?awardLabel } - OPTIONAL { ?award core:assignedBy ?assignedBy - OPTIONAL { ?assignedBy rdfs:label ?assignedByLabel } - } - } - OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } + ?award core:relatedBy ?awardReceipt . + ?award rdfs:label ?awardLabel + } + OPTIONAL { ?awardReceipt core:assignedBy ?assignedBy . + ?assignedBy rdfs:label ?assignedByLabel + } + OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart } - OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } - OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue - OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } + OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime } } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) @@ -65,7 +63,7 @@ ?award a core:Award . ?award core:relatedBy ?awardReceipt . ?award rdfs:label ?awardLabel . - ?award core:assignedBy ?assignedBy . + ?awardReceipt core:assignedBy ?assignedBy . ?assignedBy rdfs:label ?assignedByLabel . ?awardReceipt core:dateTimeValue ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime @@ -89,9 +87,7 @@ ?subject ?property ?awardReceipt . ?awardReceipt a core:AwardReceipt . ?awardReceipt rdfs:label ?receiptLabel . - ?awardReceipt core:relates ?award . - ?award a core:Award . - ?award core:assignedBy ?assignedBy . + ?awardReceipt core:assignedBy ?assignedBy . ?assignedBy rdfs:label ?assignedByLabel } UNION { ?subject ?property ?awardReceipt . @@ -122,8 +118,8 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt a core:AwardReceipt . + ?subject ?property ?awardReceipt . + ?awardReceipt a core:AwardReceipt . ?awardReceipt core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:end ?dateTimeEndValue . ?dateTimeEndValue core:dateTime ?dateTimeEnd diff --git a/productMods/config/listViewConfig-default.xml b/productMods/config/listViewConfig-default.xml index 213bf31a..7b550b8c 100644 --- a/productMods/config/listViewConfig-default.xml +++ b/productMods/config/listViewConfig-default.xml @@ -12,6 +12,8 @@ PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT ?subclass ?object @@ -37,7 +39,11 @@ ?classGroup a vitro:ClassGroup } - OPTIONAL { ?object core:preferredTitle ?title } + OPTIONAL { ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title + } + OPTIONAL { ?object a ?subclass } @@ -75,6 +81,8 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> CONSTRUCT { ?subject ?property ?object . @@ -82,7 +90,9 @@ ?typeUri vitro:inClassGroup ?classGroup . ?classGroup a vitro:ClassGroup . ?typeUri rdfs:label ?type . - ?object core:preferredTitle ?title . + ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title } WHERE { { ?subject ?property ?object . @@ -92,7 +102,9 @@ ?classGroup a vitro:ClassGroup } UNION { ?subject ?property ?object . - ?object core:preferredTitle ?title . + ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title } } diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml index 863b44bc..97e70fca 100644 --- a/productMods/config/listViewConfig-educationalTraining.xml +++ b/productMods/config/listViewConfig-educationalTraining.xml @@ -23,10 +23,14 @@ OPTIONAL { ?edTraining vitro:mostSpecificType ?subclass . } OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . ?awardedDegree core:relates ?degree . - ?degree a core:AcademicDegree - OPTIONAL { ?degree rdfs:label ?degreeName } - OPTIONAL { ?degree core:abbreviation ?degreeAbbr } - } + ?degree a core:AcademicDegree . + ?degree rdfs:label ?degreeName + } + OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree . + ?degree a core:AcademicDegree . + ?degree core:abbreviation ?degreeAbbr + } OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?org . ?org a foaf:Organization . ?org rdfs:label ?orgName @@ -34,13 +38,13 @@ OPTIONAL { ?edTraining core:majorField ?majorField } OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool } OPTIONAL { ?edTraining core:supplementalInformation ?info } - OPTIONAL { ?edTraining core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?edTraining core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?edTraining core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) diff --git a/productMods/config/listViewConfig-grantAdministeredBy.xml b/productMods/config/listViewConfig-grantAdministeredBy.xml new file mode 100644 index 00000000..d9a6c58d --- /dev/null +++ b/productMods/config/listViewConfig-grantAdministeredBy.xml @@ -0,0 +1,57 @@ + + + + + + + + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + + SELECT DISTINCT ?administratorRole + ?organization + ?organizationLabel + + WHERE { + ?subject ?property ?administratorRole . + ?administratorRole a core:AdministratorRole . + OPTIONAL { ?administratorRole obo:RO_0000052 ?organization . + ?organization a foaf:Organization . + ?organization obo:RO_0000053 ?administratorRole . + ?organization rdfs:label ?organizationLabel . + } + } ORDER BY ?organizationLabel + + + + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + + CONSTRUCT { + ?subject ?property ?administratorRole . + ?administratorRole a core:AdministratorRole . + ?administratorRole obo:RO_0000052 ?organization . + ?organization a foaf:Organization . + ?organization obo:RO_0000053 ?administratorRole . + ?organization rdfs:label ?organizationLabel . + } WHERE { + { + ?subject ?property ?administratorRole . + ?administratorRole a core:AdministratorRole . + } UNION { + ?subject ?property ?administratorRole . + ?administratorRole a core:AdministratorRole . + ?administratorRole obo:RO_0000052 ?organization . + ?organization a foaf:Organization . + ?organization obo:RO_0000053 ?administratorRole . + ?organization rdfs:label ?organizationLabel . + } + } + + + + diff --git a/productMods/config/listViewConfig-hasClinicalActivity.xml b/productMods/config/listViewConfig-hasClinicalActivity.xml new file mode 100644 index 00000000..4ae2e97a --- /dev/null +++ b/productMods/config/listViewConfig-hasClinicalActivity.xml @@ -0,0 +1,159 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + # send the property to the template, since this view supports multiple role properties + ?property + ?role + ?roleLabel + ?activity ?activityName + ?activityLabel + ?dateTimeStart ?dateTimeEnd + ?hideThis + ?objectType + WHERE { + ?subject ?property ?role . + ?role a core:ClinicalRole . + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName + } WHERE { + { + ?subject ?property ?role . + ?role a core:ClinicalRole . + } UNION { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:relates ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a core:ClinicalRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-hasCoPrincipalInvestigatorRole.xml b/productMods/config/listViewConfig-hasCoPrincipalInvestigatorRole.xml new file mode 100644 index 00000000..fa6e2804 --- /dev/null +++ b/productMods/config/listViewConfig-hasCoPrincipalInvestigatorRole.xml @@ -0,0 +1,188 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT + ?role + ?activity ?activityName + ?activityLabel + ?awardedBy + ?adminedBy + ?awardedByLabel + ?adminedByLabel + ?dateTimeStartRole ?dateTimeEndRole + ?dateTimeStartGrant ?dateTimeEndGrant + ?hideThis + WHERE { + + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel . + LET (?activityName := afn:localname(?activity)) + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + OPTIONAL { ?role core:hideFromDisplay ?hideThis } + } ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityLabel . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } WHERE { + { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + } UNION { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel + } UNION { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } UNION { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } WHERE { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } WHERE { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } WHERE { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } WHERE { + ?subject ?property ?role . + ?role a core:CoPrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + + + + diff --git a/productMods/config/listViewConfig-hasEditorRole.xml b/productMods/config/listViewConfig-hasEditorRole.xml index 0d2b7854..4e868cf7 100644 --- a/productMods/config/listViewConfig-hasEditorRole.xml +++ b/productMods/config/listViewConfig-hasEditorRole.xml @@ -22,18 +22,19 @@ ?subject ?property ?role OPTIONAL { ?role core:roleContributesTo ?activity . - ?activity vitro:mostSpecificType ?subclass - OPTIONAL { ?activity rdfs:label ?activityName } - OPTIONAL { ?subclass rdfs:label ?subclassLabel } - } - - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityName diff --git a/productMods/config/listViewConfig-hasInvestigatorRole.xml b/productMods/config/listViewConfig-hasInvestigatorRole.xml index 98344214..0e494ac9 100644 --- a/productMods/config/listViewConfig-hasInvestigatorRole.xml +++ b/productMods/config/listViewConfig-hasInvestigatorRole.xml @@ -24,144 +24,87 @@ WHERE { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role vitro:mostSpecificType ?subclass - OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel . LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - } - OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } } - OPTIONAL { ?activity core:grantAwardedBy ?awardedBy . + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:grantAwardedBy ?awardedBy . ?awardedBy rdfs:label ?awardedByLabel } - OPTIONAL { ?activity core:administeredBy ?adminedBy . + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:administeredBy ?adminedBy . ?adminedBy rdfs:label ?adminedByLabel } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole - OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . - ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole - } - OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . - ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole - } - } - OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant - OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . - ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant - } - OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . - ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant - } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant } OPTIONAL { ?role core:hideFromDisplay ?hideThis } - FILTER ( bound(?activity) && ?subclass = ?objectType) + FILTER ( ?subclass = core:InvestigatorRole) } ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . - ?activity rdfs:label ?activityLabel - } WHERE { - { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity - } UNION - { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . - ?activity rdfs:label ?activityLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . - ?activity rdfs:label ?activityLabel - } WHERE { - { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity - } UNION - { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . - ?activity rdfs:label ?activityLabel - } - } - - + PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> CONSTRUCT { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . ?role ?roleProperty ?roleValue . - ?activity rdfs:label ?activityName . + ?activity rdfs:label ?activityLabel . ?activity core:grantAwardedBy ?awardedBy . ?awardedBy rdfs:label ?awardedByLabel . ?activity core:administeredBy ?adminedBy . ?adminedBy rdfs:label ?adminedByLabel } WHERE { { - ?subject ?property ?role + ?subject ?property ?role . + ?role a core:InvestigatorRole . } UNION { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role ?roleProperty ?roleValue } UNION { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . - ?activity rdfs:label ?activityName + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel } UNION { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . - ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . - ?activity core:grantAwardedBy ?awardedBy - } UNION { - ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . ?activity core:grantAwardedBy ?awardedBy . ?awardedBy rdfs:label ?awardedByLabel } UNION { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . - ?activity core:administeredBy ?adminedBy - } UNION { - ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . ?activity core:administeredBy ?adminedBy . ?adminedBy rdfs:label ?adminedByLabel } @@ -172,13 +115,13 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role core:dateTimeInterval ?dateTimeIntervalRole . ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole } WHERE { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role core:dateTimeInterval ?dateTimeIntervalRole . ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole @@ -189,13 +132,13 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role core:dateTimeInterval ?dateTimeIntervalRole . ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole } WHERE { ?subject ?property ?role . - ?role a ?objectType . + ?role a core:InvestigatorRole . ?role core:dateTimeInterval ?dateTimeIntervalRole . ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole @@ -205,16 +148,18 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant } WHERE { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant } @@ -224,16 +169,18 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant } WHERE { ?subject ?property ?role . - ?role a ?objectType . - ?role <http://vivoweb.org/ontology/core#relatedBy> ?grant . - ?grant core:dateTimeInterval ?dateTimeIntervalGrant . + ?role a core:InvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant } diff --git a/productMods/config/listViewConfig-hasPresenterRole.xml b/productMods/config/listViewConfig-hasPresenterRole.xml index a6c58288..6b799937 100644 --- a/productMods/config/listViewConfig-hasPresenterRole.xml +++ b/productMods/config/listViewConfig-hasPresenterRole.xml @@ -30,68 +30,50 @@ OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation rdfs:label ?presentationLabel . LET (?presentationName := afn:localname(?presentation)) - - OPTIONAL { ?presentation rdfs:label ?presentationLabel } - - OPTIONAL { ?conference a bibo:Conference . - OPTIONAL { ?conference rdfs:label ?conferenceLabel } - - { - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference - } UNION { - ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation - } - } - OPTIONAL { - { - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference - } UNION { - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . - ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop - } - OPTIONAL { ?conference rdfs:label ?conferenceLabel } - } - - - OPTIONAL { ?series a vivo:EventSeries . - OPTIONAL { ?series rdfs:label ?seriesLabel } - - { - ?presentation vivo:inEventWithin ?series - } UNION { - ?series vivo:seriesForEvent ?presentation - } - } - OPTIONAL { - { - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop vivo:inEventSeries ?series - } UNION { - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . - ?series vivo:seriesForEvent ?workshop - } - OPTIONAL { ?series rdfs:label ?seriesLabel } - } - - - ?presentation vitro:mostSpecificType ?subclass . - - { - ?subclass rdfs:subClassOf vivo:Presentation - } UNION { - ?subclass owl:equivalentClass vivo:Presentation - } - - - } - - OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue . - ?dateTimeStartValue vivo:dateTime ?dateTime - } + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference a bibo:Conference . + ?conference rdfs:label ?conferenceLabel + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . + ?conference rdfs:label ?conferenceLabel + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation vivo:inEventWithin ?series . + ?series vivo:seriesForEvent ?presentation . + ?series rdfs:label ?seriesLabel + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?workshop vivo:inEventSeries ?series . + ?series vivo:seriesForEvent ?workshop . + ?series rdfs:label ?seriesLabel + } + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation vitro:mostSpecificType ?subclass . + } + + + OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval vivo:start ?dateTimeStartValue . + ?dateTimeStartValue vivo:dateTime ?dateTime } @@ -101,44 +83,18 @@ } ORDER BY ?subclass DESC(?dateTime) ?presentationLabel ?presentationName - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf vivo:Presentation . - ?subclass owl:equivalentClass vivo:Presentation . - } WHERE { - { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf vivo:Presentation - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - ?subclass owl:equivalentClass vivo:Presentation - } - } - - PREFIX vivo: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> CONSTRUCT { ?subject ?property ?role . ?role a vivo:PresenterRole . - ?role ?roleProperty ?roleValue . - ?presentation rdfs:label ?presentationLabel + ?role rdfs:label ?roleLabel . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation rdfs:label ?presentationLabel . + ?presentation vitro:mostSpecificType ?subclass . } WHERE { { ?subject ?property ?role . @@ -146,12 +102,19 @@ } UNION { ?subject ?property ?role . ?role a vivo:PresenterRole . - ?role ?roleProperty ?roleValue + ?role rdfs:label ?roleLabel . } UNION { ?subject ?property ?role . ?role a vivo:PresenterRole . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . ?presentation rdfs:label ?presentationLabel + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation vitro:mostSpecificType ?subclass . } } @@ -164,37 +127,25 @@ CONSTRUCT { ?subject ?property ?role . ?role a vivo:PresenterRole . - ?conference a bibo:Conference . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference a bibo:Conference . ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . ?conference rdfs:label ?conferenceLabel } WHERE { { ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference + ?role a vivo:PresenterRole . } UNION { ?subject ?property ?role . ?role a vivo:PresenterRole . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . + ?presentation a vivo:Presentation . ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . - ?conference rdfs:label ?conferenceLabel - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . - ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?conference a bibo:Conference . ?conference rdfs:label ?conferenceLabel } } @@ -208,43 +159,32 @@ CONSTRUCT { ?subject ?property ?role . ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?workshop a bibo:Workshop . ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . ?conference a bibo:Conference . - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . ?conference rdfs:label ?conferenceLabel } WHERE { { ?subject ?property ?role . ?role a vivo:PresenterRole . + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . + ?presentation a vivo:Presentation . ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . ?conference a bibo:Conference . - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . - ?conference rdfs:label ?conferenceLabel - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . - ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?conference a bibo:Conference . - ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . - ?conference rdfs:label ?conferenceLabel + ?workshop a bibo:Workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000050> ?conference . + ?conference <http://purl.obolibrary.org/obo/BFO_0000051> ?workshop . + ?conference a bibo:Conference . + ?conference rdfs:label ?conferenceLabel } } @@ -257,6 +197,8 @@ CONSTRUCT { ?subject ?property ?role . ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . ?series a vivo:EventSeries . ?presentation vivo:inEventSeries ?series . ?series vivo:seriesForEvent ?presentation . @@ -266,27 +208,13 @@ { ?subject ?property ?role . ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . - ?presentation vivo:inEventSeries ?series } UNION { ?subject ?property ?role . ?role a vivo:PresenterRole . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . ?series a vivo:EventSeries . ?presentation vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?presentation - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . ?series vivo:seriesForEvent ?presentation . ?series rdfs:label ?seriesLabel } @@ -301,42 +229,30 @@ CONSTRUCT { ?subject ?property ?role . ?role a vivo:PresenterRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . + ?presentation a vivo:Presentation . + ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . + ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?workshop a bibo:Workshop . ?workshop vivo:inEventSeries ?series . ?series vivo:seriesForEvent ?workshop . ?series a vivo:EventSeries . - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . ?series rdfs:label ?seriesLabel } WHERE { { ?subject ?property ?role . ?role a vivo:PresenterRole . + } UNION { + ?subject ?property ?role . + ?role a vivo:PresenterRole . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . + ?presentation a vivo:Presentation . ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop vivo:inEventSeries ?series - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . - ?presentation <http://purl.obolibrary.org/obo/BFO_0000050> ?workshop . - ?workshop vivo:inEventSeries ?series . - ?series rdfs:label ?seriesLabel - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?workshop . - ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation - } UNION { - ?subject ?property ?role . - ?role a vivo:PresenterRole . - ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation . - ?series a vivo:EventSeries . - ?series vivo:seriesForEvent ?workshop . ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?presentation . + ?workshop a bibo:Workshop . + ?workshop vivo:inEventSeries ?series . + ?series vivo:seriesForEvent ?workshop . + ?series a vivo:EventSeries . ?series rdfs:label ?seriesLabel } } diff --git a/productMods/config/listViewConfig-hasPrincipalInvestigatorRole.xml b/productMods/config/listViewConfig-hasPrincipalInvestigatorRole.xml new file mode 100644 index 00000000..023a1765 --- /dev/null +++ b/productMods/config/listViewConfig-hasPrincipalInvestigatorRole.xml @@ -0,0 +1,188 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT + ?role + ?activity ?activityName + ?activityLabel + ?awardedBy + ?adminedBy + ?awardedByLabel + ?adminedByLabel + ?dateTimeStartRole ?dateTimeEndRole + ?dateTimeStartGrant ?dateTimeEndGrant + ?hideThis + WHERE { + + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel . + LET (?activityName := afn:localname(?activity)) + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + OPTIONAL { ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + OPTIONAL { ?role core:hideFromDisplay ?hideThis } + } ORDER BY DESC(?dateTimeEndRole) DESC(?dateTimeStartRole) DESC(?dateTimeEndGrant) DESC(?dateTimeStartGrant) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityLabel . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } WHERE { + { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + } UNION { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity rdfs:label ?activityLabel + } UNION { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:grantAwardedBy ?awardedBy . + ?awardedBy rdfs:label ?awardedByLabel + } UNION { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:administeredBy ?adminedBy . + ?adminedBy rdfs:label ?adminedByLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } WHERE { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:start ?dateTimeStartValueRole . + ?dateTimeStartValueRole core:dateTime ?dateTimeStartRole + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } WHERE { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role core:dateTimeInterval ?dateTimeIntervalRole . + ?dateTimeIntervalRole core:end ?dateTimeEndValueRole . + ?dateTimeEndValueRole core:dateTime ?dateTimeEndRole + } + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } WHERE { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant . + ?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } WHERE { + ?subject ?property ?role . + ?role a core:PrincipalInvestigatorRole . + ?role <http://vivoweb.org/ontology/core#relatedBy> ?activity . + ?activity a core:Grant . + ?activity core:dateTimeInterval ?dateTimeIntervalGrant . + ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant . + ?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant + } + + + + diff --git a/productMods/config/listViewConfig-hasReviewerRole.xml b/productMods/config/listViewConfig-hasReviewerRole.xml index e65fcada..b812a5b2 100644 --- a/productMods/config/listViewConfig-hasReviewerRole.xml +++ b/productMods/config/listViewConfig-hasReviewerRole.xml @@ -22,18 +22,20 @@ ?subject ?property ?role OPTIONAL { ?role core:roleContributesTo ?activity . - ?activity vitro:mostSpecificType ?subclass - OPTIONAL { ?activity rdfs:label ?activityName } - OPTIONAL { ?subclass rdfs:label ?subclassLabel } - } + ?activity rdfs:label ?activityName . + } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?subclassLabel + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityName @@ -60,20 +62,11 @@ ?subject ?property ?role . ?role a core:ReviewerRole . ?role vitro:mostSpecificType ?roleSubclass - } UNION { - ?subject ?property ?role . - ?role a core:ReviewerRole . - ?role core:roleContributesTo ?activity } UNION { ?subject ?property ?role . ?role a core:ReviewerRole . ?role core:roleContributesTo ?activity . ?activity rdfs:label ?activityName . - } UNION { - ?subject ?property ?role . - ?role a core:ReviewerRole . - ?role core:roleContributesTo ?activity . - ?activity vitro:mostSpecificType ?subclass } UNION { ?subject ?property ?role . ?role a core:ReviewerRole . diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index e9a631fa..46a53d9f 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -23,52 +23,37 @@ WHERE { ?subject ?property ?role . ?role a ?objectType . - ?role vitro:mostSpecificType ?roleSubclass - OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass } - OPTIONAL { ?role core:relates ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role core:relates ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass } - OPTIONAL { ?role core:roleContributesTo ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } - - - ?activity vitro:mostSpecificType ?subclass - - } - - OPTIONAL { ?role core:relatedBy ?activity . - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass } OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { ?role core:hideFromDisplay ?hideThis } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } - FILTER ( bound(?activity) && ?objectType = ?roleSubclass ) } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName @@ -88,22 +73,6 @@ } - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - CONSTRUCT { - ?subject ?property ?role . - ?role core:relatedBy ?activity . - ?activity vitro:mostSpecificType ?subclass . - } WHERE { - ?subject ?property ?role . - ?role core:relatedBy ?activity . - ?activity vitro:mostSpecificType ?subclass - } - - PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -145,26 +114,27 @@ ?activity rdfs:label ?activityName } WHERE { { - ?subject ?property ?role + ?subject ?property ?role . + ?role a ?objectType . } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role ?roleProperty ?roleValue } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role core:relates ?activity . ?activity rdfs:label ?activityName } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . ?activity rdfs:label ?activityName } UNION { ?subject ?property ?role . + ?role a ?objectType . ?role core:roleContributesTo ?activity . ?activity rdfs:label ?activityName - } UNION { - ?subject ?property ?role . - ?role core:relatedBy ?activity . - ?activity rdfs:label ?activityName } } diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index 343609b0..d02b328a 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -18,30 +18,22 @@ ?subject ?property ?authorship . OPTIONAL { ?authorship core:rank ?rank } OPTIONAL { ?authorship core:relates ?person . - ?person a foaf:Person . - ?person rdfs:label ?personName - - OPTIONAL { ?person vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf foaf:Person - } - + ?person a foaf:Person . + ?person rdfs:label ?personName + + OPTIONAL { ?authorship core:relates ?person . + ?person a foaf:Person . + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person + } + } FILTER ( bound(?person) ) } ORDER BY ?subclass ?rank ?personName - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - CONSTRUCT { - ?subclass rdfs:subClassOf foaf:Person - } WHERE { - ?subclass rdfs:subClassOf foaf:Person - } - - + PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -54,7 +46,8 @@ ?authorship core:relates ?person . ?person a foaf:Person . ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person } WHERE { { ?subject ?property ?authorship . @@ -75,7 +68,8 @@ ?authorship core:relates ?person . ?person a foaf:Person . ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person } } diff --git a/productMods/config/listViewConfig-informationResourceInEditorship.xml b/productMods/config/listViewConfig-informationResourceInEditorship.xml index 7bd6b34f..e5fc3a01 100644 --- a/productMods/config/listViewConfig-informationResourceInEditorship.xml +++ b/productMods/config/listViewConfig-informationResourceInEditorship.xml @@ -18,30 +18,22 @@ ?subject ?property ?editorship . OPTIONAL { ?editorship core:rank ?rank } OPTIONAL { ?editorship core:relates ?person . - ?person a foaf:Person . - ?person rdfs:label ?personName - - OPTIONAL { ?person vitro:mostSpecificType ?subclass . - ?subclass rdfs:subClassOf foaf:Person - } - - } + ?person a foaf:Person . + ?person rdfs:label ?personName + } + + OPTIONAL { ?editorship core:relates ?person . + ?person a foaf:Person . + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person + } + FILTER ( bound(?person) ) } ORDER BY ?subclass ?rank ?personName - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - CONSTRUCT { - ?subclass rdfs:subClassOf foaf:Person - } WHERE { - ?subclass rdfs:subClassOf foaf:Person - } - - PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -54,7 +46,8 @@ ?editorship core:relates ?person . ?person a foaf:Person . ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person } WHERE { { ?subject ?property ?editorship . @@ -75,7 +68,8 @@ ?editorship core:relates ?person . ?person a foaf:Person . ?person rdfs:label ?personName . - ?person vitro:mostSpecificType ?subclass + ?person vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf foaf:Person } } diff --git a/productMods/config/listViewConfig-issuedCredential.xml b/productMods/config/listViewConfig-issuedCredential.xml index a59a9fd1..c5a5d54f 100644 --- a/productMods/config/listViewConfig-issuedCredential.xml +++ b/productMods/config/listViewConfig-issuedCredential.xml @@ -27,27 +27,25 @@ ?subject ?property ?issuedCredential . ?issuedCredential a core:IssuedCredential . LET (?issuedCredentialLocal := afn:localname(?issuedCredential)) - OPTIONAL { ?issuedCredential rdfs:label ?issuedCredentialLabel } + OPTIONAL {?issuedCredential rdfs:label ?issuedCredentialLabel } OPTIONAL { ?issuedCredential core:relates ?credential . ?credential a core:Credential . + ?credential core:relatedBy ?issuedCredential . + ?credential rdfs:label ?credentialLabel . LET (?credentialLocal := afn:localname(?credential)) - ?credential core:relatedBy ?issuedCredential - OPTIONAL { ?credential rdfs:label ?credentialLabel } - } - OPTIONAL { ?issuedCredential core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - } - OPTIONAL { ?issuedCredential core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - OPTIONAL { ?issuedCredential core:dateTimeValue ?dateTimeValue - OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } - } - } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) + } + OPTIONAL { ?issuedCredential core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?issuedCredential core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + OPTIONAL { ?issuedCredential core:dateIssued ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } + } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) @@ -136,12 +134,12 @@ CONSTRUCT { ?subject ?property ?issuedCredential . ?issuedCredential a core:IssuedCredential . - ?issuedCredential core:dateTimeValue ?dateTimeValue . + ?issuedCredential core:dateIssued ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime } WHERE { ?subject ?property ?issuedCredential . ?issuedCredential a core:IssuedCredential . - ?issuedCredential core:dateTimeValue ?dateTimeValue . + ?issuedCredential core:dateIssued ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime } diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml index a49f0889..d76b0976 100644 --- a/productMods/config/listViewConfig-organizationForPosition.xml +++ b/productMods/config/listViewConfig-organizationForPosition.xml @@ -29,16 +29,15 @@ OPTIONAL { ?position rdfs:label ?positionTitle } OPTIONAL { ?position core:hideFromDisplay ?hideThis } - OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } # Get current positions only: end date is either null or not in the past - } - # NOT EXISTS { ?position core:hideFromDisplay ?hideThis } FILTER ( !bound(?dateTimeEnd) || afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) diff --git a/productMods/config/listViewConfig-personInPosition.xml b/productMods/config/listViewConfig-personInPosition.xml index 6922110b..6438f459 100644 --- a/productMods/config/listViewConfig-personInPosition.xml +++ b/productMods/config/listViewConfig-personInPosition.xml @@ -19,27 +19,33 @@ ?org ?orgName ?middleOrg ?middleOrgName ?outerOrg ?outerOrgName - ?dateTimeStart ?dateTimeEnd WHERE { - ?subject ?property ?position + ?dateTimeStart ?dateTimeEnd + WHERE { + ?subject ?property ?position . OPTIONAL { ?position core:relates ?org . ?org rdfs:label ?orgName - OPTIONAL { ?org obo:BFO_0000050 ?middleOrg . - ?middleOrg rdfs:label ?middleOrgName - OPTIONAL { ?middleOrg obo:BFO_0000050 ?outerOrg . - ?outerOrg rdfs:label ?outerOrgName - } - } + } + OPTIONAL { ?position core:relates ?org . + ?org rdfs:label ?orgName . + ?org obo:BFO_0000050 ?middleOrg . + ?middleOrg rdfs:label ?middleOrgName + } + OPTIONAL { ?position core:relates ?org . + ?org rdfs:label ?orgName . + ?org obo:BFO_0000050 ?middleOrg . + ?middleOrg obo:BFO_0000050 ?outerOrg . + ?outerOrg rdfs:label ?outerOrgName } OPTIONAL { ?position rdfs:label ?positionTitle } OPTIONAL { ?position core:hrJobTitle ?hrJobTitle } OPTIONAL { ?position core:rank ?rank } - OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } OPTIONAL { ?position vitro:mostSpecificType ?subclass . @@ -75,7 +81,6 @@ PREFIX obo: <http://purl.obolibrary.org/obo/> CONSTRUCT { ?subject ?property ?position . - ?position a core:Position . ?position ?positionProperty ?positionValue . ?org rdfs:label ?orgName . ?org obo:BFO_0000050 ?middleOrg . @@ -86,14 +91,7 @@ { ?subject ?property ?position . ?position a core:Position . - } UNION { - ?subject ?property ?position . - ?position a core:Position . ?position ?positionProperty ?positionValue - } UNION { - ?subject ?property ?position . - ?position a core:Position . - ?position core:rank ?rank } UNION { ?subject ?property ?position . ?position a core:Position . @@ -105,12 +103,6 @@ ?position a core:Position . ?position core:relates ?org . ?org a foaf:Organization . - ?org obo:BFO_0000050 ?middleOrg - } UNION { - ?subject ?property ?position . - ?position a core:Position . - ?position core:relates ?org . - ?org a foaf:Organization . ?org obo:BFO_0000050 ?middleOrg . ?middleOrg rdfs:label ?middleOrgName } UNION { @@ -119,13 +111,6 @@ ?position core:relates ?org . ?org a foaf:Organization . ?org obo:BFO_0000050 ?middleOrg . - ?middleOrg obo:BFO_0000050 ?outerOrg - } UNION { - ?subject ?property ?position . - ?position a core:Position . - ?position core:positionInOrganization ?org . - ?org a foaf:Organization . - ?org obo:BFO_0000050 ?middleOrg . ?middleOrg obo:BFO_0000050 ?outerOrg . ?outerOrg rdfs:label ?outerOrgName } @@ -136,28 +121,22 @@ PREFIX core: <http://vivoweb.org/ontology/core#> CONSTRUCT { ?subject ?property ?position . - ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd } WHERE { ?subject ?property ?position . ?position a core:Position . ?position core:dateTimeInterval ?dateTimeInterval . ?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeStartValue core:dateTime ?dateTimeStart . - ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd } - + diff --git a/productMods/config/listViewConfig-preferredTitle.xml b/productMods/config/listViewConfig-preferredTitle.xml index c592fbb9..fc26114c 100644 --- a/productMods/config/listViewConfig-preferredTitle.xml +++ b/productMods/config/listViewConfig-preferredTitle.xml @@ -12,8 +12,8 @@ ?preferredTitle WHERE { ?subject ?property ?vcard . - ?vcard vcard:hasTitle ?title - OPTIONAL { ?title vcard:title ?preferredTitle } + ?vcard vcard:hasTitle ?title . + ?title vcard:title ?preferredTitle } diff --git a/productMods/config/listViewConfig-relatedRole.xml b/productMods/config/listViewConfig-relatedRole.xml index 86460c02..175973b6 100644 --- a/productMods/config/listViewConfig-relatedRole.xml +++ b/productMods/config/listViewConfig-relatedRole.xml @@ -30,23 +30,27 @@ http://vivoweb.org/ontology/core#realizedRole and http://vivoweb.org/ontology/co # We need ?subclass in the uncollated query to get the roleTypeLabel # for roles that have no label. - OPTIONAL { ?role vitro:mostSpecificType ?subclass . - OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } - OPTIONAL { ?role <http://purl.obolibrary.org/obo/RO_0000052> ?indivInRole - OPTIONAL { ?indivInRole rdfs:label ?indivLabel } - } - OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000055> ?indivInRole - OPTIONAL { ?indivInRole rdfs:label ?indivLabel } - } + OPTIONAL { ?role vitro:mostSpecificType ?subclass . } + OPTIONAL { ?role vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?roleTypeLabel + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/RO_0000052> ?indivInRole } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/RO_0000052> ?indivInRole . + ?indivInRole rdfs:label ?indivLabel + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000055> ?indivInRole . + } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000055> ?indivInRole . + ?indivInRole rdfs:label ?indivLabel } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } FILTER ( bound(?indivInRole) ) diff --git a/productMods/config/listViewConfig-researchActivities.xml b/productMods/config/listViewConfig-researchActivities.xml new file mode 100644 index 00000000..1e401b95 --- /dev/null +++ b/productMods/config/listViewConfig-researchActivities.xml @@ -0,0 +1,157 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + # send the property to the template, since this view supports multiple role properties + ?property + ?role + ?roleLabel + ?activity ?activityName + ?activityLabel + ?dateTimeStart ?dateTimeEnd + ?hideThis + ?objectType + WHERE { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role vitro:mostSpecificType ?roleSubclass + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role core:relatedBy ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:hideFromDisplay ?hideThis } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + FILTER ( ?roleSubclass = core:ResearcherRole) + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:relatedBy ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:relatedBy ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName + } WHERE { + { + ?subject ?property ?role . + ?role a core:ResearcherRole . + } UNION { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:relatedBy ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a core:ResearcherRole . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-researchAreaOf.xml b/productMods/config/listViewConfig-researchAreaOf.xml index b7eaec9a..b40b84d7 100644 --- a/productMods/config/listViewConfig-researchAreaOf.xml +++ b/productMods/config/listViewConfig-researchAreaOf.xml @@ -12,67 +12,78 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT DISTINCT ?person ?personName ?posnLabel + ?org ?orgLabel - ?type - ?personType ?title WHERE { ?subject ?property ?person . - ?person core:personInPosition ?position . - OPTIONAL { ?person rdfs:label ?personName } - OPTIONAL { ?person core:preferredTitle ?title } - OPTIONAL { ?person vitro:mostSpecificType ?personType . - ?personType rdfs:subClassOf foaf:Person + OPTIONAL { ?person core:relatedBy ?position . + ?position a core:Position } - OPTIONAL { ?position rdfs:label ?posnLabel } - OPTIONAL { ?position core:positionInOrganization ?org . + OPTIONAL { ?person core:relatedBy ?position . + ?position a core:Position . + ?position rdfs:label ?posnLabel + } + OPTIONAL { ?person rdfs:label ?personName } + OPTIONAL { ?person obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title + } + OPTIONAL { ?person core:relatedBy ?position . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org rdfs:label ?orgLabel } - OPTIONAL { ?position core:hrJobTitle ?hrJobTitle } - OPTIONAL { ?position core:rank ?rank } } - ORDER BY ?personName ?type + ORDER BY ?personName PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?subject ?property ?person . - ?person core:personInPosition ?position . - ?position rdfs:label ?positionLabel . - ?position core:positionInOrganization ?org . + ?person core:relatedBy ?position . + ?position a core:Position . + ?position rdfs:label ?posnLabel . + ?position core:relates ?org . + ?org a foaf:Organization . ?org rdfs:label ?orgName . - ?position core:hrJobTitle ?hrJobTitle } WHERE { { ?subject ?property ?person } UNION { ?subject ?property ?person . - ?person core:personInPosition ?position + ?person core:relatedBy ?position . + ?position a core:Position . } UNION { ?subject ?property ?person . - ?person core:personInPosition ?position . - ?position rdfs:label ?positionLabel + ?person core:relatedBy ?position . + ?position a core:Position . + ?position rdfs:label ?posnLabel } UNION { ?subject ?property ?person . - ?person core:personInPosition ?position . - ?position core:positionInOrganization ?org + ?person core:relatedBy ?position . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . } UNION { ?subject ?property ?person . - ?person core:personInPosition ?position . - ?position core:positionInOrganization ?org . + ?person core:relatedBy ?position . + ?position a core:Position . + ?position core:relates ?org . + ?org a foaf:Organization . ?org rdfs:label ?orgName - } UNION { - ?subject ?property ?person . - ?person core:personInPosition ?position . - ?position core:hrJobTitle ?hrJobTitle } } @@ -82,26 +93,26 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> CONSTRUCT { ?subject ?property ?person . - ?person rdfs:label ?label . - ?person core:preferredTitle ?title . - ?person vitro:mostSpecificType ?personType . - ?personType rdfs:subClassOf foaf:Person + ?person rdfs:label ?personName . + ?person obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title } WHERE { { ?subject ?property ?person } UNION { ?subject ?property ?person . - ?person rdfs:label ?label - } UNION { + ?person rdfs:label ?personName + } UNION { ?subject ?property ?person . - ?person core:preferredTitle ?title - } UNION { - ?subject ?property ?person . - ?person vitro:mostSpecificType ?personType . - ?personType rdfs:subClassOf foaf:Person + ?person obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title } } diff --git a/productMods/config/listViewConfig-roleContributesTo.xml b/productMods/config/listViewConfig-roleContributesTo.xml new file mode 100644 index 00000000..6cc74045 --- /dev/null +++ b/productMods/config/listViewConfig-roleContributesTo.xml @@ -0,0 +1,133 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + # send the property to the template, since this view supports multiple role properties + ?property + ?role + ?roleLabel + ?activity ?activityName + ?activityLabel + ?dateTimeStart ?dateTimeEnd + ?hideThis + ?objectType + WHERE { + ?subject ?property ?role . + ?role a ?objectType . + + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:roleContributesTo ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:relates ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-roleRealizedIn.xml b/productMods/config/listViewConfig-roleRealizedIn.xml new file mode 100644 index 00000000..a57e828a --- /dev/null +++ b/productMods/config/listViewConfig-roleRealizedIn.xml @@ -0,0 +1,133 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + SELECT DISTINCT ?subclass + # send the property to the template, since this view supports multiple role properties + ?property + ?role + ?roleLabel + ?activity ?activityName + ?activityLabel + ?dateTimeStart ?dateTimeEnd + ?hideThis + ?objectType + WHERE { + ?subject ?property ?role . + ?role a ?objectType . + + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel + + + ?activity vitro:mostSpecificType ?subclass + + } + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass . + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue . + ?activity rdfs:label ?activityName + } WHERE { + { + ?subject ?property ?role . + ?role a ?objectType . + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:relates ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityName + } UNION { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role a ?objectType . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/templates/freemarker/body/accounts/userAccounts-acctCreatedEmail.ftl b/productMods/templates/freemarker/body/accounts/userAccounts-acctCreatedEmail.ftl deleted file mode 100644 index 25226e78..00000000 --- a/productMods/templates/freemarker/body/accounts/userAccounts-acctCreatedEmail.ftl +++ /dev/null @@ -1,64 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- Confirmation that an account has been created. --> - -<#assign subject = "${i18n().account_created_subject(siteName)}" /> - -<#assign html> - - - ${subject} - - -

    - ${userAccount.firstName} ${userAccount.lastName} -

    - -

    - ${i18n().congratulations} -

    - -

    - ${i18n().we_have_created_your_account(siteName,userAccount.emailAddress)} -

    - -

    - ${i18n().did_not_request_text} -

    - -

    - ${i18n().click_to_create_password} -

    - -

    - ${passwordLink} -

    - -

    - ${i18n().if_link_failed} -

    - -

    - ${i18n().thanks} -

    - - - - -<#assign text> -${userAccount.firstName} ${userAccount.lastName} - -${i18n().congratulations} - -${i18n().we_have_created_your_account(siteName,userAccount.emailAddress)} - -${i18n().did_not_request_text} - -${i18n().paste_the_link} - -${passwordLink} - -${i18n().thanks} - - -<@email subject=subject html=html text=text /> \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-grantAdministeredBy.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-grantAdministeredBy.ftl new file mode 100644 index 00000000..08cd3d98 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-grantAdministeredBy.ftl @@ -0,0 +1,26 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. + --> +<#import "lib-sequence.ftl" as s> +<#import "lib-datetime.ftl" as dt> +<@showAdministrator statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the + next statement --> +<#macro showAdministrator statement> + + <#local linkedIndividual> + <#if statement.organization??> + ${statement.organizationLabel!""} + <#else> + ${i18n().missing_organization} + + + + ${linkedIndividual!} + + diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl index 0c19e9b4..bfc1e92d 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl @@ -16,7 +16,7 @@ <#macro showRole statement> <#local linkedIndividual> <#if statement.presentation??> - ${statement.presentationLabel!statement.presentationName} + ${statement.presentationLabel!statement.presentationName!""} <#else> <#-- This shouldn't happen, but we must provide for it --> ${i18n().missing_presentation} diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-issuedCredential.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-issuedCredential.ftl index 1b12358a..0f3c9398 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-issuedCredential.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-issuedCredential.ftl @@ -17,7 +17,7 @@ <#if statement.credential??> ${statement.credentialLabel!statement.issuedCredentialLabel!statement.credentialLocal!} <#else> - ${statement.issuedCredentialLabel!"missing credential"} + ${statement.issuedCredentialLabel!"${i18n().missing_credential}"} diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl index f5a45eec..5b18d090 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-mailingAddress.ftl @@ -13,9 +13,17 @@ <#macro showAddress statement> <#if statement.street?has_content> -

    - ${statement.street} -

    + <#if statement.street?contains(";") > + <#list statement.street?split("; ") as lines> +

    + ${lines} +

    + + <#else> +

    + ${statement.street} +

    + <#if ( statement.country?has_content && (statement.country == "US" || statement.country?contains("United States") || statement.country?contains("U.S.") || statement.country?contains("U.S.A.") || statement.country?contains("USA")))> @@ -23,7 +31,7 @@ <#local cityStateZip><@s.join [ cityState!, statement.postalCode!], " " /> <#if cityStateZip?has_content>

    ${cityStateZip}

    -

    ${statement.country!}

    +

    ${statement.country!}

    <#else> <#if statement.locality?has_content> @@ -42,7 +50,7 @@

    <#if statement.country?has_content> -

    +

    ${statement.country}

    diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl index 2dbf53ed..9e589c10 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl @@ -13,13 +13,18 @@ next statement --> <#macro showResearchers statement> <#local linkedIndividual> - ${statement.personName} + ${statement.personName!} <#if statement.title?has_content > <#local posnTitle = statement.title> - <#else> - <#local posnTitle = statement.posnLabel!statement.personType> + <#elseif statement.posnLabel?has_content> + <#local posnTitle = statement.posnLabel> + + <#if statement.org??> + <#local orgString> + ${statement.orgLabel!""} + - <@s.join [ linkedIndividual, posnTitle, statement.orgLabel!"" ] /> ${statement.type!} + <@s.join [ linkedIndividual, posnTitle!, orgString! ] /> diff --git a/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl b/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl index 3956993c..23a3f0ea 100644 --- a/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addFullNameToPerson.ftl @@ -65,13 +65,13 @@

    - +

    - +

    diff --git a/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl index 3520f23a..1fe602ef 100644 --- a/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl @@ -4,6 +4,7 @@ <#-- Template for adding a grant role, such as principal investigator, to a foaf:Persons --> <#--Retrieve certain edit configuration information--> <#assign editMode = editConfiguration.pageData.editMode /> +<#assign rangeUri = editConfiguration.pageData.rangeUri /> <#assign literalValues = editConfiguration.existingLiteralValues /> <#assign uriValues = editConfiguration.existingUriValues /> <#assign htmlForElements = editConfiguration.pageData.htmlForElements /> @@ -34,9 +35,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o <#assign formHeading = "${i18n().investigator_entry_for}"/> <#assign submitButtonLabel = "${i18n().investigator_capitalized}" /> -<#if editConfiguration.predicateUri?ends_with("hasPrincipalInvestigatorRole") > +<#if rangeUri?contains("#PrincipalInvestigatorRole") > <#assign formHeading = "${i18n().principal_investigator_entry_for}"/> -<#elseif editConfiguration.predicateUri?ends_with("hasCo-PrincipalInvestigatorRole") > +<#elseif rangeUri?contains("#CoPrincipalInvestigatorRole") > <#assign formHeading = "${i18n().co_principal_investigator_entry_for}"/> diff --git a/productMods/templates/freemarker/edit/forms/dateTimeValueForm.ftl b/productMods/templates/freemarker/edit/forms/dateTimeValueForm.ftl new file mode 100644 index 00000000..48439917 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/dateTimeValueForm.ftl @@ -0,0 +1,58 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Template for adding/editing time values --> + +<#--Retrieve certain edit configuration information--> +<#assign editMode = editConfiguration.pageData.editMode /> +<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> +<#assign domainUri = editConfiguration.pageData.domainUri!"" /> + +<#if editMode == "edit"> + <#assign titleVerb="${i18n().edit_capitalized}"> + <#assign disabledVal="disabled"> + <#assign submitButtonText="${i18n().edit_date_time_value}"> +<#else> + <#assign titleVerb="${i18n().create_capitalized}"> + <#assign submitButtonText="${i18n().create_date_time_value}"> + <#assign disabledVal=""/> + +<#if domainUri?contains("IAO_0000030")> + <#assign titleObject="${i18n().publication_date_for}"> + <#if editMode == "edit"> + <#assign submitButtonText="${i18n().edit_publication_date}"> + <#else> + <#assign submitButtonText="${i18n().create_publication_date}"> + +<#elseif domainUri?contains("AwardReceipt")> + <#assign titleObject="${i18n().year_awarded_for}"> + <#if editMode == "edit"> + <#assign submitButtonText="${i18n().edit_year_awarded}"> + <#else> + <#assign submitButtonText="${i18n().create_year_awarded}"> + +<#else> + <#assign titleObject="${i18n().date_time_value_for}"> + + +

    ${titleVerb} ${titleObject} ${editConfiguration.subjectName}

    + + +<#--Need to draw edit elements for dates here--> + <#if htmlForElements?keys?seq_contains("dateTimeField")> + ${htmlForElements["dateTimeField"]} + + +

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

    +
    +${stylesheets.add('', + '')} + +${scripts.add('', + '')} \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/grantAdministeredBy.ftl b/productMods/templates/freemarker/edit/forms/grantAdministeredBy.ftl new file mode 100644 index 00000000..dfba927f --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/grantAdministeredBy.ftl @@ -0,0 +1,136 @@ +<#-- $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"> + + +<#--The blank sentinel indicates what value should be put in a URI when no autocomplete result has been selected. +If the blank value is non-null or non-empty, n3 editing for an existing object will remove the original relationship +if nothing is selected for that object--> +<#assign blankSentinel = "" /> +<#if editConfigurationConstants?has_content && editConfigurationConstants?keys?seq_contains("BLANK_SENTINEL")> + <#assign blankSentinel = editConfigurationConstants["BLANK_SENTINEL"] /> + + +<#--This flag is for clearing the label field on submission for an existing object being selected from autocomplete. +Set this flag on the input acUriReceiver where you would like this behavior to occur. --> +<#assign flagClearLabelForExisting = "flagClearLabelForExisting" /> + +<#assign htmlForElements = editConfiguration.pageData.htmlForElements /> + +<#--Retrieve variables needed--> +<#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrganization") /> +<#assign orgLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "orgLabel") /> +<#assign orgLabelDisplayValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "orgLabelDisplay") /> + +<#--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="${i18n().save_changes}"> + <#assign disabledVal="disabled"> +<#else> +<#assign titleVerb="${i18n().create_capitalized}"> +<#assign submitButtonText="${i18n().create_entry}"> + <#assign disabledVal=""/> + + +<#assign requiredHint = " *" /> + +

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

    + +<#--Display error messages if any--> +<#if submissionErrors?has_content> + <#if orgLabelDisplayValue?has_content > + <#assign orgLabelValue = orgLabelDisplayValue /> + + + + + +<@lvf.unsupportedBrowser urls.base /> + +
    + +
    +

    + + + +

    + +
    +

    + + + (${i18n().verify_match_capitalized} ${i18n().or} + ${i18n().change_selection}) +

    + +
    + <#assign htmlForElements = editConfiguration.pageData.htmlForElements /> + + + +

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

    + +

    * ${i18n().required_fields}

    + + +
    + + + + + +${stylesheets.add('')} +${stylesheets.add('')} +${stylesheets.add('')} + +${scripts.add('', + '', + '', + '', + '', + '')} + + + diff --git a/productMods/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js b/productMods/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js index 1ec2ab53..acf69156 100644 --- a/productMods/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js +++ b/productMods/templates/freemarker/edit/forms/js/adviseeRelationshipUtils.js @@ -25,6 +25,7 @@ var adviseeRelUtils = { this.form = $('#personHasAdvisingRelationship'); this.adRelshiplabel = $('#advisingRelLabel'); this.advisor = $('#advisor'); + this.fauxLabel = $('#maskLabelBuilding'); this.subjArea = $('#SubjectArea'); this.firstName = $('#firstName'); this.lastName = $('#lastName'); @@ -56,8 +57,6 @@ var adviseeRelUtils = { this.form.submit(function() { adviseeRelUtils.resolveAdvisorNames(); adviseeRelUtils.buildAdvisingRelLabel(); - alert(this.adRelshiplabel.val()); - return false; }); }, @@ -80,6 +79,12 @@ var adviseeRelUtils = { if (firstName) { name += ', ' + firstName; } + + // we don't want the user to see the label getting built, so hide the acSelector + // field and display a bogus field that just has the last name in it. + this.fauxLabel.val(lastName); + this.advisee.hide(); + this.fauxLabel.show(); this.advisor.val(name); this.lastName.val(lastName); } @@ -91,7 +96,6 @@ var adviseeRelUtils = { }, buildAdvisingRelLabel: function() { - alert("here"); if ( this.advisor.val() != "" ) { this.adRelshiplabel.val(this.advisor.val() + " " + adviseeRelUtils.advisingString + " " + this.subjName); } diff --git a/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js b/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js new file mode 100644 index 00000000..d2104330 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/js/mailingAddressUtils.js @@ -0,0 +1,51 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + + +var mailingAddressUtils = { + + onLoad: function(editMode) { + this.initObjectReferences(); + this.bindEventListeners(); + + if ( editMode != "add" ) { + this.setStreetAddressDisplayFields(); + } + }, + + initObjectReferences: function() { + + this.form = $('#personHasMailingAddress'); + this.street1 = $('#streetAddressOne'); + this.street2 = $('#streetAddressTwo'); + this.streetAddress = $('#streetAddress'); + + }, + + bindEventListeners: function() { + this.idCache = {}; + + this.form.submit(function() { + mailingAddressUtils.setStreetAddressField(); + }); + + }, + + // the vcard only has one address field, so combine the two + // displayed addresses into the hidden field which gets asserted in the N3 + setStreetAddressField: function() { + var tempString = this.street1.val() + "; " + this.street2.val(); + this.streetAddress.val(tempString); + }, + + // in edit mode, take the asserted streetAddress value and parse it into + // the two displayed address fields + setStreetAddressDisplayFields: function() { + var tempString = this.streetAddress.val(); + var lineOne = tempString.substring(0,tempString.lastIndexOf(";")); + var lineTwo = tempString.substring(tempString.lastIndexOf(";") + 2); + + this.street1.val(lineOne); + this.street2.val(lineTwo); + } + +} \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl b/productMods/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl index 1a281d84..d7fe9520 100644 --- a/productMods/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl +++ b/productMods/templates/freemarker/edit/forms/personHasAdviseeRelationship.ftl @@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o

    +
    diff --git a/productMods/templates/freemarker/edit/forms/personHasIssuedCredential.ftl b/productMods/templates/freemarker/edit/forms/personHasIssuedCredential.ftl index d542fd2d..b921ebcf 100644 --- a/productMods/templates/freemarker/edit/forms/personHasIssuedCredential.ftl +++ b/productMods/templates/freemarker/edit/forms/personHasIssuedCredential.ftl @@ -53,7 +53,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o <#assign requiredHint = " *" /> <#assign yearHint = "(${i18n().year_hint_format})" /> -

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

    +

    ${titleVerb} ${i18n().credentials} ${i18n().for} ${editConfiguration.subjectName}

    <#--Display error messages if any--> <#if submissionErrors?has_content> diff --git a/productMods/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl b/productMods/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl index 99236069..e44041ea 100644 --- a/productMods/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl +++ b/productMods/templates/freemarker/edit/forms/subjectHasMailingAddress.ftl @@ -68,13 +68,19 @@
    -
    +

    - - + +

    +

    + + + +

    +

    @@ -107,6 +113,12 @@

    + + ${stylesheets.add('')} ${stylesheets.add('')} @@ -114,6 +126,7 @@ ${stylesheets.add('', '', + '', '', '')} diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3 index 992008f4..f92b8f4e 100644 --- a/rdf/display/everytime/PropertyConfig.n3 +++ b/rdf/display/everytime/PropertyConfig.n3 @@ -27,6 +27,7 @@ local:personInPositionConfig a :ObjectPropertyDisplayConfig ; :propertyGroup ; vitro:displayRankAnnot 40; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasPositionHistoryGenerator"^^xsd:string . local:organizationForPositionContext a :ConfigContext ; @@ -41,6 +42,7 @@ local:organizationForPositionConfig a :ObjectPropertyDisplayConfig ; :propertyGroup ; vitro:displayRankAnnot 15; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.OrganizationHasPositionHistoryGenerator"^^xsd:string . local:authorInAuthorshipContext a :ConfigContext ; @@ -67,7 +69,7 @@ local:hasServiceProviderRoleContext a :ConfigContext ; :qualifiedBy . local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ; :displayName "service to the profession" ; vitro:displayRankAnnot 20; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -82,7 +84,7 @@ local:hasClinicalRoleContext a :ConfigContext ; :qualifiedBy . local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-hasClinicalActivity.xml"^^xsd:string ; :displayName "clinical activities" ; vitro:displayRankAnnot 70; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -97,7 +99,7 @@ local:hasLeaderRoleContext a :ConfigContext ; :qualifiedBy . local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ; :displayName "head of" ; vitro:displayRankAnnot 30; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -112,7 +114,7 @@ local:hasMemberRoleContext a :ConfigContext ; :qualifiedBy . local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ; :displayName "member of" ; vitro:displayRankAnnot 50; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -127,7 +129,7 @@ local:hasTeacherRoleContext a :ConfigContext ; :qualifiedBy . local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleRealizedIn.xml"^^xsd:string ; :displayName "teaching activities" ; vitro:displayRankAnnot 20; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -172,7 +174,7 @@ local:hasOrganizerRoleContext a :ConfigContext ; :qualifiedBy . local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleRealizedIn.xml"^^xsd:string ; :displayName "organizer of" ; vitro:displayRankAnnot 4; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -187,7 +189,7 @@ local:hasOutreachProviderRoleContext a :ConfigContext ; :qualifiedBy . local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-roleContributesTo.xml"^^xsd:string ; :displayName "outreach and community service" ; vitro:displayRankAnnot 50; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -217,7 +219,7 @@ local:hasResearcherRoleContext a :ConfigContext ; :qualifiedBy . local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-researchActivities.xml"^^xsd:string ; :displayName "research activities" ; vitro:displayRankAnnot 15; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -247,7 +249,7 @@ local:hasPrincipalInvestigatorRoleContext a :ConfigContext ; :qualifiedBy . local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-hasPrincipalInvestigatorRole.xml"^^xsd:string ; :displayName "principal investigator on" ; vitro:displayRankAnnot 20; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -262,7 +264,7 @@ local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ; :qualifiedBy . local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ; - :listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ; + :listViewConfigFile "listViewConfig-hasCoPrincipalInvestigatorRole.xml"^^xsd:string ; :displayName "co-principal investigator on" ; vitro:displayRankAnnot 25; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; @@ -409,6 +411,21 @@ local:issuedCredentialConfig a :ObjectPropertyDisplayConfig ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasIssuedCredentialGenerator"^^ ; :propertyGroup . +local:grantAdministeredByContext a :ConfigContext ; + :hasConfiguration local:grantAdministeredByConfig ; + :configContextFor vivo:relates ; + :qualifiedByDomain vivo:Grant ; + :qualifiedBy vivo:AdministratorRole . + +local:grantAdministeredByConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-grantAdministeredBy.xml"^^xsd:string ; + :displayName "grant administered by" ; + vitro:displayRankAnnot 1; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.GrantAdministeredByGenerator"^^ ; + :propertyGroup . + ### vcard properties ### local:mailingAddressContext a :ConfigContext ; @@ -647,6 +664,104 @@ local:inEventSeriesConfig a :ObjectPropertyDisplayConfig ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; :propertyGroup . +local:eventLocationContext a :ConfigContext ; + :hasConfiguration local:eventLocationConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy vivo:GeographicLocation . + +local:eventLocationConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "has geographic location" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:courseOfferedByContext a :ConfigContext ; + :hasConfiguration local:courseOfferedByConfig ; + :configContextFor vivo:offeredBy ; + :qualifiedByDomain vivo:Course ; + :qualifiedBy . + +local:courseOfferedByConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "offered by" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:orgOffersCourseContext a :ConfigContext ; + :hasConfiguration local:orgOffersCourseConfig ; + :configContextFor vivo:offers ; + :qualifiedByDomain ; + :qualifiedBy vivo:Course . + +local:orgOffersCourseConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "offers course" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:collegeOffersDegreeContext a :ConfigContext ; + :hasConfiguration local:collegeOffersDegreeConfig ; + :configContextFor vivo:offers ; + :qualifiedByDomain vivo:College ; + :qualifiedBy vivo:AcademicDegree . + +local:collegeOffersDegreeConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "offers degree" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:deptOffersDegreeContext a :ConfigContext ; + :hasConfiguration local:debtOffersDegreeConfig ; + :configContextFor vivo:offers ; + :qualifiedByDomain vivo:AcademicDepartment ; + :qualifiedBy vivo:AcademicDegree . + +local:deptOffersDegreeConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "offers degree" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:uniOffersDegreeContext a :ConfigContext ; + :hasConfiguration local:uniOffersDegreeConfig ; + :configContextFor vivo:offers ; + :qualifiedByDomain vivo:University ; + :qualifiedBy vivo:AcademicDegree . + +local:uniOffersDegreeConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "offers degree" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:grantAwardedByContext a :ConfigContext ; + :hasConfiguration local:grantAwardedByConfig ; + :configContextFor vivo:assignedBy ; + :qualifiedByDomain vivo:Grant ; + :qualifiedBy . + +local:grantAwardedByConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-default.xml"^^xsd:string ; + :displayName "grant awarded by" ; + vitro:displayRankAnnot 2; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + local:awardOrHonorReceiptsContext a :ConfigContext ; :hasConfiguration local:awardOrHonorReceiptsConfig ; :configContextFor ; @@ -720,5 +835,32 @@ local:grantRelatesConfig a :ObjectPropertyDisplayConfig ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; :propertyGroup . +### faux properties for dateTimeValue ### +local:publicationDateContext a :ConfigContext ; + :hasConfiguration local:publicationDateConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . +local:publicationDateConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-dateTimeValue.xml"^^xsd:string ; + :displayName "publication date" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . + +local:yearAwardedContext a :ConfigContext ; + :hasConfiguration local:yearAwardedConfig ; + :configContextFor ; + :qualifiedByDomain ; + :qualifiedBy . + +local:yearAwardedConfig a :ObjectPropertyDisplayConfig ; + :listViewConfigFile "listViewConfig-dateTimeValue.xml"^^xsd:string ; + :displayName "year awarded" ; + vitro:displayRankAnnot 10; + vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; + vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; + :propertyGroup . diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/individuallist/IndividualJsonWrapper.java b/src/edu/cornell/mannlib/vitro/webapp/controller/individuallist/IndividualJsonWrapper.java new file mode 100644 index 00000000..3c5a629c --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/individuallist/IndividualJsonWrapper.java @@ -0,0 +1,87 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.controller.individuallist; + +import java.util.Collection; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.json.JSONException; +import org.json.JSONObject; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; + +import edu.cornell.mannlib.vitro.webapp.beans.Individual; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; +import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyStatementDao; +import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; + +/** + * Wrap an Individual in a JSON object for display by the script. + * + * This overrides the Vitro version so we can have more info in the display. + */ +public class IndividualJsonWrapper { + private static final Log log = LogFactory + .getLog(IndividualJsonWrapper.class); + + private static String VCARD_DATA_QUERY = "" + + "PREFIX obo: \n" + + "PREFIX vcard: \n" + + "SELECT DISTINCT ?title \n" + "WHERE { \n" + + " ?subject obo:ARG_2000028 ?vIndividual . \n" + + " ?vIndividual vcard:hasTitle ?vTitle . \n" + + " ?vTitle vcard:title ?title . \n" + "} "; + + static JSONObject packageIndividualAsJson(VitroRequest vreq, Individual ind) + throws JSONException { + // need an unfiltered dao to get firstnames and lastnames + WebappDaoFactory fullWdf = vreq.getUnfilteredWebappDaoFactory(); + + JSONObject jo = new JSONObject(); + jo.put("URI", ind.getURI()); + jo.put("label", ind.getRdfsLabel()); + jo.put("name", ind.getName()); + jo.put("thumbUrl", ind.getThumbUrl()); + jo.put("imageUrl", ind.getImageUrl()); + jo.put("profileUrl", UrlBuilder.getIndividualProfileUrl(ind, vreq)); + jo.put("mostSpecificTypes", getMostSpecificTypes(ind, fullWdf)); + jo.put("preferredTitle", findPreferredTitle(vreq, ind)); + return jo; + } + + private static String findPreferredTitle(VitroRequest vreq, Individual ind) { + String queryStr = QueryUtils.subUriForQueryVar(VCARD_DATA_QUERY, + "subject", ind.getURI()); + log.debug("queryStr = " + queryStr); + String value = ""; + try { + ResultSet results = QueryUtils.getQueryResults(queryStr, vreq); + while (results.hasNext()) { + QuerySolution soln = results.nextSolution(); + String t = QueryUtils.nodeToString(soln.get("title")); + if (StringUtils.isNotBlank(t)) { + value = t; + } + } + } catch (Exception e) { + log.error(e, e); + } + return value; + } + + public static Collection getMostSpecificTypes( + Individual individual, WebappDaoFactory wdf) { + ObjectPropertyStatementDao opsDao = wdf.getObjectPropertyStatementDao(); + Map mostSpecificTypes = opsDao + .getMostSpecificTypesInClassgroupsForIndividual(individual + .getURI()); + return mostSpecificTypes.values(); + } + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java index 47d4d76c..8a8bfc08 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java @@ -729,6 +729,7 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { HashMap formSpecificData = new HashMap(); formSpecificData.put("editMode", getEditMode(vreq).name().toLowerCase()); + formSpecificData.put("rangeUri", getRangeUri(vreq)); //In this case, passing back a sparql query formSpecificData.put("sparqlForAcFilter", getSparqlForAcFilter(vreq)); //Put in the fact that we require field @@ -747,8 +748,10 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator return query; } - - - + private String getRangeUri(VitroRequest vreq) { + String rangeUri = vreq.getParameter("rangeUri"); + + return rangeUri; + } } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java index 60fdad4a..ba109983 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java @@ -1,52 +1,80 @@ -/* $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 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.FieldOptions; - -public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private static String template = "addOutreachProviderRoleToPerson.ftl"; - private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization"; - - @Override - String getTemplate() { - return template; - } - - @Override - String getRoleType() { - return "http://vivoweb.org/ontology/core#OutreachProviderRole"; - } - - //Outreach Provider role involves hard-coded options for the "right side" of the role or activity - @Override - FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { - return new - ChildVClassesOptions(OPTION_CLASS_URI) - .setDefaultOptionLabel("Select type"); - } - - @Override - boolean isShowRoleLabelField(){return true;} - - /* - * Use the methods below to change the date/time precision in the - * custom form associated with this generator. When not used, the - * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, - * MINUTE, TIME and NONE. - */ -/* - public String getStartDatePrecision() { - String precision = VitroVocabulary.Precision.MONTH.uri(); - return precision; - } - - public String getEndDatePrecision() { - String precision = VitroVocabulary.Precision.DAY.uri(); - return precision; - } -*/ -} +/* $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 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; + +public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { + + private static String template = "addOutreachProviderRoleToPerson.ftl"; + private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization"; + + @Override + String getTemplate() { + return template; + } + + @Override + String getRoleType() { + return "http://vivoweb.org/ontology/core#OutreachProviderRole"; + } + + //Outreach Provider role involves hard-coded options for the "right side" of the role or activity + @Override + FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { + return new ConstantFieldOptions( + "","Select type", + "http://vivoweb.org/ontology/core#Association","Association", + "http://vivoweb.org/ontology/core#Center","Center", + "http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization", + "http://vivoweb.org/ontology/core#College","College", + "http://vivoweb.org/ontology/core#Committee","Committee", + "http://vivoweb.org/ontology/core#Consortium","Consortium", + "http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory", + "http://vivoweb.org/ontology/core#Department","Department", + "http://vivoweb.org/ontology/core#Division","Division", + "http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit", + "http://vivoweb.org/ontology/core#Foundation","Foundation", + "http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization", + "http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency", + "http://vivoweb.org/ontology/core#Hospital","Hospital", + "http://vivoweb.org/ontology/core#Institute","Institute", + "http://vivoweb.org/ontology/core#Laboratory","Laboratory", + "http://vivoweb.org/ontology/core#Library","Library", + "http://vivoweb.org/ontology/core#Museum","Museum", + "http://xmlns.com/foaf/0.1/Organization","Organization", + "http://vivoweb.org/ontology/core#PrivateCompany","Private Company", + "http://vivoweb.org/ontology/core#Program","Program", + "http://vivoweb.org/ontology/core#Publisher","Publisher", + "http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization", + "http://vivoweb.org/ontology/core#Team","Team", + "http://vivoweb.org/ontology/core#School","School", + "http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab", + "http://vivoweb.org/ontology/core#StudentOrganization","Student Organization", + "http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office", + "http://vivoweb.org/ontology/core#University","University"); + } + + @Override + boolean isShowRoleLabelField(){return true;} + + /* + * Use the methods below to change the date/time precision in the + * custom form associated with this generator. When not used, the + * precision will be YEAR. The other precisons are MONTH, DAY, HOUR, + * MINUTE, TIME and NONE. + */ +/* + public String getStartDatePrecision() { + String precision = VitroVocabulary.Precision.MONTH.uri(); + return precision; + } + + public String getEndDatePrecision() { + String precision = VitroVocabulary.Precision.DAY.uri(); + return precision; + } +*/ +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/GrantAdministeredByGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/GrantAdministeredByGenerator.java new file mode 100644 index 00000000..8fea8fd4 --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/GrantAdministeredByGenerator.java @@ -0,0 +1,123 @@ +/* $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.Arrays; +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpSession; + +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.AutocompleteRequiredInputValidator; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; +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.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.IndividualsViaVClassOptions; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +public class GrantAdministeredByGenerator extends VivoBaseGenerator implements + EditConfigurationGenerator { + + public GrantAdministeredByGenerator() {} + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, + HttpSession session) throws Exception { + + EditConfigurationVTwo conf = new EditConfigurationVTwo(); + + initBasics(conf, vreq); + initPropertyParameters(vreq, session, conf); + initObjectPropForm(conf, vreq); + + conf.setTemplate("grantAdministeredBy.ftl"); + + conf.setVarNameForSubject("grant"); + conf.setVarNameForPredicate("predicate"); + conf.setVarNameForObject("adminRole"); + + conf.setN3Required( Arrays.asList( n3ForNewAdminRole) ); + conf.setN3Optional( Arrays.asList( n3ForNewAdminOrganization, + n3ForExistingAdminOrganization ) ); + + conf.addNewResource("newOrganization", DEFAULT_NS_FOR_NEW_RESOURCE); + conf.addNewResource("adminRole", DEFAULT_NS_FOR_NEW_RESOURCE); + + conf.setUrisOnform(Arrays.asList("existingOrganization")); + conf.setLiteralsOnForm(Arrays.asList("orgLabel", "orgLabelDisplay" )); + + conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery); + conf.addSparqlForExistingUris("existingOrganization", existingOrganizationQuery); + + + conf.addField( new FieldVTwo(). // options will be added in browser by auto complete JS + setName("existingOrganization") + ); + + conf.addField( new FieldVTwo(). + setName("orgLabel"). + setRangeDatatypeUri(XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString()) ) + ); + + conf.addField( new FieldVTwo(). + setName("orgLabelDisplay"). + setRangeDatatypeUri(XSD.xstring.toString() ). + setValidators( list("datatype:" + XSD.xstring.toString())) + ); + + conf.addValidator(new AntiXssValidation()); + conf.addValidator(new AutocompleteRequiredInputValidator("existingOrganization", "orgLabel")); + +// addFormSpecificData(conf, vreq); + prepare(vreq, conf); + return conf; + } + + /* N3 assertions */ + + final static String n3ForNewAdminRole = + "@prefix vivo: <" + vivoCore + "> . \n\n" + + "?grant vivo:relates ?adminRole . \n" + + "?adminRole a vivo:AdministratorRole . \n" + + "?adminRole vivo:relatedBy ?grant . " ; + + final static String n3ForNewAdminOrganization = + "@prefix vivo: <" + vivoCore + "> . \n\n" + + "?adminRole ?newOrganization . \n" + + "?newOrganization a . \n" + + "?newOrganization ?adminRole . \n" + + "?newOrganization <"+ label + "> ?orgLabel ."; + + final static String n3ForExistingAdminOrganization = + "@prefix vivo: <" + vivoCore + "> . \n\n" + + "?adminRole ?existingOrganization . \n" + + "?existingOrganization a . \n" + + "?existingOrganization ?adminRole . " ; + + /* Queries for editing an existing entry */ + + final static String existingOrganizationQuery = + "PREFIX vivo: \n" + + "SELECT ?existingOrganization WHERE { \n" + + " ?adminRole ?existingOrganization . \n" + + " ?existingOrganization a . \n" + + "}"; + + final static String orgLabelQuery = + "PREFIX vivo: \n" + + "SELECT ?existingOrganizationLabel WHERE { \n" + + " ?adminRole ?existingOrganization . \n" + + " ?existingOrganization a . \n" + + " ?existingOrganization <" + label + "> ?existingOrganizationLabel . \n" + + "}"; + +} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java index 001a426b..bb8a72d4 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageLabelsForPersonGenerator.java @@ -1,6 +1,8 @@ /* $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 static edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants.SOME_LITERAL; + import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Arrays; @@ -335,7 +337,7 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat Individual individual = EditConfigurationUtils.getIndividual(vreq, config.getSubjectUri()); AddDataPropertyStatement adps = new AddDataPropertyStatement( vreq.getJenaOntModel(), individual.getURI(), - RequestActionConstants.SOME_URI); + RequestActionConstants.SOME_URI, SOME_LITERAL); AddObjectPropertyStatement aops = new AddObjectPropertyStatement( vreq.getJenaOntModel(), individual.getURI(), diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdviseeRelationshipGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdviseeRelationshipGenerator.java index e3690e90..22fa72fa 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdviseeRelationshipGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdviseeRelationshipGenerator.java @@ -93,7 +93,7 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery); conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery); - conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery); + conf.addSparqlForExistingUris("advisingRelationship", existingAdvisingRelQuery); conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery); conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery); conf.addSparqlForExistingUris("existingAdvisor", advisorQuery); @@ -249,22 +249,22 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp "?vcardName vcard:familyName ?lastName ."; final static String degreeAssertion = - "?advisingRelationship ?degree . \n" + - "?degree ?advisingRelationship . "; + "?advisingRelationship ?degree . \n" + + " "; //This is for an existing subject area //Where we only need the existing subject area label final static String n3ForExistingSubjAreaAssertion = - "?advisingRelationship ?existingSubjArea . \n" + - "?existingSubjArea ?advisingRelationship . "; + "?advisingRelationship ?existingSubjArea . \n" + + "?existingSubjArea ?advisingRelationship . "; //For new subject area, we include all new information //new subject area should always be a new resource //and the following should only get evaluated //when there is something in the label final static String n3ForNewSubjAreaAssertion = - "?advisingRelationship ?newSubjArea . \n" + - "?newSubjArea ?advisingRelationship . \n" + + "?advisingRelationship ?newSubjArea . \n" + + "?newSubjArea ?advisingRelationship . \n" + "?newSubjArea <"+ label + "> ?subjAreaLabel . \n" + "?newSubjArea a <" + subjAreaClass + "> . "; @@ -286,70 +286,90 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp /* Queries for editing an existing entry */ + final static String existingAdvisingRelQuery = + "SELECT ?advisingRelationship WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + "}"; + final static String advisingRelTypeQuery = "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + - "SELECT ?advisingRelType WHERE { \n" + - " ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" + - "}"; - - final static String advisorQuery = - "SELECT ?existingAdvisor WHERE { \n" + - " ?advisingRelationship ?existingAdvisor . \n" + - " ?existingAdvisor a <" + advisorClass + "> . \n" + - " FILTER (?person != ?existingAdvisor) . \n" + - "}"; - - final static String existingAdviseeRoleQuery = - "SELECT ?adviseeRole WHERE { \n" + - "?advisingRelationship ?adviseeRole . \n" + - "?adviseeRole a <" + adviseeRoleClass + "> . \n" + - "}"; - - final static String existingAdvisorRoleQuery = - "SELECT ?advisorRole WHERE { \n" + - " ?advisingRelationship ?advisorRole . \n" + - " ?advisorRole a <" + advisorRoleClass + "> . \n" + - "}"; - - final static String advisorLabelQuery = - "SELECT ?existingAdvisorLabel WHERE { \n" + - " ?advisingRelationship ?existingAdvisor . \n" + - " ?existingAdvisor a <" + advisorClass + "> . \n" + - " ?existingAdvisor <" + label + "> ?existingAdvisorLabel . \n" + - " FILTER (?person != ?existingAdvisor) . \n" + - "}"; - - final static String subjAreaQuery = - "SELECT ?existingSubjArea WHERE { \n" + - " ?advisingRelationship ?existingSubjArea . \n" + - " ?existingSubjArea a . \n" + - " ?existingSubjArea ?type \n" + - " FILTER (?type != ) . \n" + - "}"; - - final static String subjAreaLabelQuery = - "SELECT ?existingSubjAreaLabel WHERE { \n" + - " ?advisingRelationship ?existingSubjArea . \n" + - " ?existingSubjArea a . \n" + - " ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" + - " ?existingSubjArea ?type \n" + - " FILTER (?type != ) . \n" + + "SELECT ?advisingRelType WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" + "}"; final static String advisingRelLabelQuery = "SELECT ?existingAdvisingRelLabel WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" + "}"; + final static String advisorQuery = + "SELECT ?existingAdvisor WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingAdvisor . \n" + + " ?existingAdvisor ?advisingRelationship . \n" + + " ?existingAdvisor a <" + advisorClass + "> . \n" + + " ?existingAdvisor ?existingAdvisorRole . \n" + + " ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" + + "}"; + + final static String advisorLabelQuery = + "SELECT ?existingAdvisorLabel WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingAdvisor . \n" + + " ?existingAdvisor ?advisingRelationship . \n" + + " ?existingAdvisor a <" + advisorClass + "> . \n" + + " ?existingAdvisor <" + label + "> ?existingAdvisorLabel . \n" + + " ?existingAdvisor ?existingAdvisorRole . \n" + + " ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" + + "}"; + + final static String existingAdvisorRoleQuery = + "SELECT ?existingAdvisorRole WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingAdvisorRole . \n" + + " ?existingAdvisorRole ?advisingRelationship . \n" + + " ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" + + "}"; + + final static String subjAreaQuery = + "SELECT ?existingSubjArea WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingSubjArea . \n" + + " ?existingSubjArea a . \n" + + " ?existingSubjArea ?type \n" + + "}"; + + final static String subjAreaLabelQuery = + "SELECT ?existingSubjAreaLabel WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingSubjArea . \n" + + " ?existingSubjArea a . \n" + + " ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" + + " ?existingSubjArea ?type \n" + + "}"; + final static String degreeQuery = "SELECT ?existingDegree WHERE {\n"+ - " ?advisingRelationship ?existingDegree . \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + + " ?advisingRelationship ?existingDegree . \n" + " ?existingDegree a <" + degreeClass + "> . \n" + "}"; - final static String existingStartDateQuery = "SELECT ?existingDateStart WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + @@ -358,6 +378,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp final static String existingEndDateQuery = "SELECT ?existingEndDate WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n " + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + @@ -366,11 +388,15 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp final static String existingIntervalNodeQuery = "SELECT ?existingIntervalNode WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?existingIntervalNode . \n" + " ?existingIntervalNode a <" + intervalType + "> . }"; final static String existingStartNodeQuery = "SELECT ?existingStartNode WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" + @@ -378,6 +404,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp final static String existingEndNodeQuery = "SELECT ?existingEndNode WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" + @@ -385,6 +413,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp final static String existingStartPrecisionQuery = "SELECT ?existingStartPrecision WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + @@ -393,6 +423,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp final static String existingEndPrecisionQuery = "SELECT ?existingEndPrecision WHERE { \n" + + " ?adviseeRole ?advisingRelationship . \n" + + " ?advisingRelationship ?adviseeRole . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java index 68d02e4e..8ab694a7 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java @@ -263,8 +263,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp //when there is something in the label final static String n3ForNewSubjAreaAssertion = - "?advisingRelationship ?newSubjArea . \n" + - "?newSubjArea ?advisingRelationship . \n" + + "?advisingRelationship ?newSubjArea . \n" + + "?newSubjArea ?advisingRelationship . \n" + "?newSubjArea <"+ label + "> ?subjAreaLabel . \n" + "?newSubjArea a <" + subjAreaClass + "> . "; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java index af2abc33..eec388d3 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java @@ -262,9 +262,8 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements final static String existingOrgQuery = "SELECT ?existingOrg WHERE { \n" + - " ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" + - " ?existingAward a <" + awardClass + "> . \n" + - " ?existingAward<" + awardConferredByPred + "> ?existingOrg . \n" + + " ?awardReceipt <" + awardConferredByPred + "> ?existingOrg . \n" + + " ?existingOrg a <" + orgClass + "> . \n" + " ?existingOrg <" + awardConferredPred + "> ?existingAward . }"; final static String awardReceiptLabelQuery = @@ -281,7 +280,8 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements final static String orgLabelQuery = "SELECT ?existingOrgLabel WHERE { \n" + - " ?award <" + awardConferredByPred + "> ?existingOrg . \n" + + " ?awardReceipt <" + awardConferredByPred + "> ?existingOrg . \n" + + " ?existingOrg a <" + orgClass + "> . \n" + " ?existingOrg <" + label + "> ?existingOrgLabel . \n" + "}"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasIssuedCredentialGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasIssuedCredentialGenerator.java index 594f5d4e..7cc69d63 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasIssuedCredentialGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasIssuedCredentialGenerator.java @@ -28,7 +28,7 @@ public class PersonHasIssuedCredentialGenerator extends VivoBaseGenerator implem final static String issuedCredentialTypeClass = vivoCore + "IssuedCredential"; final static String credentialTypeClass = vivoCore + "Credential"; - final static String yearCredentialedPred = vivoCore + "dateTimeValue"; + final static String yearCredentialedPred = vivoCore + "dateIssued"; final static String issuedCredentialToInterval = vivoCore + "dateTimeInterval"; final static String intervalType = vivoCore + "DateTimeInterval"; final static String intervalToStart = vivoCore + "start"; @@ -117,12 +117,6 @@ public class PersonHasIssuedCredentialGenerator extends VivoBaseGenerator implem setValidators( list("datatype:" + XSD.xstring.toString())) ); - conf.addField( new FieldVTwo(). - setName("orgLabelDisplay"). - setRangeDatatypeUri(XSD.xstring.toString() ). - setValidators( list("datatype:" + XSD.xstring.toString())) - ); - conf.addField( new FieldVTwo(). setName("credentialLabelDisplay"). setRangeDatatypeUri(XSD.xstring.toString() ). @@ -184,8 +178,8 @@ public class PersonHasIssuedCredentialGenerator extends VivoBaseGenerator implem final static String n3ForExistingCredentialAssertion = "@prefix vivo: <" + vivoCore + "> . \n\n" + "?issuedCredential vivo:relates ?existingCredential . \n" + - "?existingCredential a <" + credentialTypeClass + "> . \n" + - "?credential a ?credentialType . \n" + +/* "?existingCredential a <" + credentialTypeClass + "> . \n" + + "?existingCredential a ?credentialType . \n" + */ "?existingCredential vivo:relatedBy ?issuedCredential . " ; final static String n3ForYearCredentialed = diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java index b2f5d42c..3ec5ea23 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java @@ -148,7 +148,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler { Map fieldLabelToOutputFieldLabel = new HashMap(); String aggregationRules = "(count(DISTINCT ?Grant) AS ?numOfGrants)"; - String grantType = "http://vivoweb.org/ontology#Grant"; + String grantType = "http://vivoweb.org/ontology/core#Grant"; ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(grantType, vitroRequest.getWebappDaoFactory()); String roleToGrantPredicate = "<" + predicate.getURI() + ">"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individuallist/ListedIndividual.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individuallist/ListedIndividual.java index ce9e7899..24615507 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individuallist/ListedIndividual.java +++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individuallist/ListedIndividual.java @@ -2,28 +2,60 @@ package edu.cornell.mannlib.vitro.webapp.web.templatemodels.individuallist; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; + import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.web.templatemodels.individuallist.BaseListedIndividual; -import edu.cornell.mannlib.vitro.webapp.web.templatemodels.individuallist.ListedIndividual; +import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; public class ListedIndividual extends BaseListedIndividual { - private static final Log log = LogFactory.getLog(ListedIndividual.class); - private static final String CORE = "http://vivoweb.org/ontology/core#"; + private static String VCARD_DATA_QUERY = "" + + "PREFIX obo: \n" + + "PREFIX vcard: \n" + + "SELECT DISTINCT ?title \n" + + "WHERE { \n" + + " ?subject obo:ARG_2000028 ?vIndividual . \n" + + " ?vIndividual vcard:hasTitle ?vTitle . \n" + + " ?vTitle vcard:title ?title . \n" + + "} " ; + + private final String title; public ListedIndividual(Individual individual, VitroRequest vreq) { super(individual, vreq); + title = findPreferredTitle(); } - + + private String findPreferredTitle() { + String queryStr = QueryUtils.subUriForQueryVar(VCARD_DATA_QUERY, "subject", individual.getURI()); + log.debug("queryStr = " + queryStr); + String value = ""; + try { + ResultSet results = QueryUtils.getQueryResults(queryStr, vreq); + while (results.hasNext()) { + QuerySolution soln = results.nextSolution(); + String t = QueryUtils.nodeToString( soln.get("title")); + if (StringUtils.isNotBlank(t)) { + value = t; + } + } + } catch (Exception e) { + log.error(e, e); + } + return value; + } + /* Template properties */ public String getPreferredTitle() { - return cleanTextForDisplay( individual.getDataValue(CORE + "preferredTitle") ); + return title; } } diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java index 782c2316..efaaccae 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java +++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java @@ -2,33 +2,73 @@ package edu.cornell.mannlib.vitro.webapp.web.templatemodels.searchresult; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; + import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; public class IndividualSearchResult extends BaseIndividualSearchResult { - private static final Log log = LogFactory.getLog(IndividualSearchResult.class); - private static final String CORE = "http://vivoweb.org/ontology/core#"; + private static String VCARD_DATA_QUERY = "" + + "PREFIX obo: \n" + + "PREFIX vcard: \n" + + "SELECT DISTINCT ?email ?title \n" + + "WHERE { \n" + + " ?subject obo:ARG_2000028 ?vIndividual . \n" + + " OPTIONAL { ?vIndividual vcard:hasEmail ?vEmail . \n" + + " ?vEmail vcard:email ?email . \n" + + " } \n" + + " OPTIONAL { ?vIndividual vcard:hasTitle ?vTitle . \n" + + " ?vTitle vcard:title ?title . \n" + + " } \n" + + "} " ; + + private String email = ""; + private String title = ""; public IndividualSearchResult(Individual individual, VitroRequest vreq) { super(individual, vreq); log.debug("Called Individual Search Result"); + findVcardInfo(); } + private void findVcardInfo() { + String queryStr = QueryUtils.subUriForQueryVar(VCARD_DATA_QUERY, "subject", individual.getURI()); + log.debug("queryStr = " + queryStr); + try { + ResultSet results = QueryUtils.getQueryResults(queryStr, vreq); + while (results.hasNext()) { + QuerySolution soln = results.nextSolution(); + String t = QueryUtils.nodeToString( soln.get("title")); + if (StringUtils.isNotBlank(t)) { + title = t; + } + String em = QueryUtils.nodeToString( soln.get("email")); + if (StringUtils.isNotBlank(em)) { + email = em; + } + } + } catch (Exception e) { + log.error(e, e); + } + } + + /* Access methods for templates */ public String getPreferredTitle() { - log.debug("Called get Title"); - return individual.getDataValue(CORE + "preferredTitle"); + return title; } public String getEmail() { - log.debug("Called get Email"); - return individual.getDataValue(CORE + "email"); + return email; } } \ No newline at end of file diff --git a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java index d3f9863d..50219042 100644 --- a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java +++ b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java @@ -4,6 +4,7 @@ package edu.cornell.mannlib.vivo.auth.policy; import static edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization.AUTHORIZED; import static edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization.INCONCLUSIVE; +import static edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants.SOME_LITERAL; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -44,10 +45,9 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; /** * Check the relationships in the SelfEditorRelationshipPolicy. * - * This only checks the relationships that deal with InfoContentEntitys. - * Testing the others seems too redundant. If we generalize this to use - * configurable relationships, then we'll be able to make more general tests as - * well. + * This only checks the relationships that deal with InfoContentEntitys. Testing + * the others seems too redundant. If we generalize this to use configurable + * relationships, then we'll be able to make more general tests as well. */ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { private static final Log log = LogFactory @@ -69,12 +69,12 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { private static final String URI_PERMITTED_PREDICATE = NS_PERMITTED + "permittedPredicate"; - private static final Property PERMITTED_PREDICATE = new Property( - URI_PERMITTED_PREDICATE); + private static final Property PERMITTED_PREDICATE = new Property( + URI_PERMITTED_PREDICATE); private static final String URI_RESTRICTED_PREDICATE = NS_RESTRICTED + "restrictedPredicate"; - private static final Property RESTRICTED_PREDICATE = new Property( - URI_RESTRICTED_PREDICATE); + private static final Property RESTRICTED_PREDICATE = new Property( + URI_RESTRICTED_PREDICATE); /** * Where the model statements are stored for this test. @@ -185,30 +185,28 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsRestricted() { action = new AddDataPropertyStatement(ontModel, - URI_RESTRICTED_RESOURCE, URI_PERMITTED_PREDICATE); + URI_RESTRICTED_RESOURCE, URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void dataPropPredicateIsRestricted() { action = new AddDataPropertyStatement(ontModel, URI_JOE_EDITED_IT, - URI_RESTRICTED_PREDICATE); + URI_RESTRICTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void objectPropSubjectIsRestricted() { action = new AddObjectPropertyStatement(ontModel, - URI_RESTRICTED_RESOURCE, PERMITTED_PREDICATE, - URI_JOE_EDITED_IT); + URI_RESTRICTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void objectPropPredicateIsRestricted() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, RESTRICTED_PREDICATE, - URI_JOE_EDITED_IT); + URI_PERMITTED_RESOURCE, RESTRICTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -226,14 +224,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsIceButNobodyIsSelfEditing() { action = new AddDataPropertyStatement(ontModel, URI_JOE_WROTE_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); } @Test public void dataPropSubjectIsIceButNoAuthorsOrEditorsOrFeatured() { action = new AddDataPropertyStatement(ontModel, URI_NOBODY_WROTE_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); assertDecision(INCONCLUSIVE, policy.isAuthorized(idBozoAndJoe, action)); } @@ -241,28 +239,28 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsIceButWrongAuthor() { action = new AddDataPropertyStatement(ontModel, URI_BOZO_WROTE_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void dataPropSubjectIsIceButWrongEditor() { action = new AddDataPropertyStatement(ontModel, URI_BOZO_EDITED_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void dataPropSubjectIsIceButWrongFeatured() { action = new AddDataPropertyStatement(ontModel, - URI_BOZO_FEATURED_IN_IT, URI_PERMITTED_PREDICATE); + URI_BOZO_FEATURED_IN_IT, URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void dataPropSubjectIsIceWithSelfEditingAuthor() { action = new AddDataPropertyStatement(ontModel, URI_JOE_WROTE_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -270,7 +268,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsIceWithSelfEditingEditor() { action = new AddDataPropertyStatement(ontModel, URI_JOE_EDITED_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -278,7 +276,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsIceWithSelfEditingFeatured() { action = new AddDataPropertyStatement(ontModel, URI_JOE_FEATURED_IN_IT, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -348,8 +346,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsIcebutNobodyIsSelfEditing() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, - URI_JOE_EDITED_IT); + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idNobody, action)); } @@ -365,16 +362,14 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsIceButWrongAuthor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, - URI_BOZO_WROTE_IT); + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_BOZO_WROTE_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @Test public void objectPropObjectIsIceButWrongEditor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, - URI_BOZO_EDITED_IT); + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_BOZO_EDITED_IT); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } @@ -389,8 +384,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsIceWithSelfEditingAuthor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, - URI_JOE_WROTE_IT); + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_WROTE_IT); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -398,8 +392,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void objectPropObjectIsIceWithSelfEditingEditor() { action = new AddObjectPropertyStatement(ontModel, - URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, - URI_JOE_EDITED_IT); + URI_PERMITTED_RESOURCE, PERMITTED_PREDICATE, URI_JOE_EDITED_IT); assertDecision(AUTHORIZED, policy.isAuthorized(idJoe, action)); assertDecision(AUTHORIZED, policy.isAuthorized(idBozoAndJoe, action)); } @@ -420,7 +413,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Test public void dataPropSubjectIsNotIce() { action = new AddDataPropertyStatement(ontModel, URI_PERMITTED_RESOURCE, - URI_PERMITTED_PREDICATE); + URI_PERMITTED_PREDICATE, SOME_LITERAL); assertDecision(INCONCLUSIVE, policy.isAuthorized(idJoe, action)); } diff --git a/themes/wilma/i18n/all.properties b/themes/wilma/i18n/all.properties index 1f90bda2..158f250a 100644 --- a/themes/wilma/i18n/all.properties +++ b/themes/wilma/i18n/all.properties @@ -194,15 +194,7 @@ hyperlink = Hyperlink # # accounts templates ( /templates/freemarker/body/accounts ) # -congratulations = Congratulations! -we_have_created_your_account = We have created your new {0} account associated with {1}. -did_not_request_text = If you did not request this new account you can safely ignore this email. \ - This request will expire if not acted upon for 30 days. -click_to_create_password = Click the link below to create your password for your new account using our secure server. password = password -if_link_failed = If the link above doesn't work, you can copy and paste the link directly into your browser's address bar. -thanks = Thanks! -paste_the_link = Paste the link below into your browser's address bar to create your password for your new account using our secure server. # # harvester templates ( /templates/freemarker/body/harvester ) @@ -363,7 +355,7 @@ selected_conference = Selected Conference years_participation_in = Years of Participation in grant_entry_for = grant entry for -select_existing_pub_or_enter_new = Please select an existing grant in the Title field or enter a new one. +select_existing_pub_or_enter_new = Please select an existing publication in the Title field or enter a new one. unable_to_handle_grant_editing = This form is unable to handle the editing of this grant because it is associated with multiple grant individuals. grant_type = grant Type @@ -876,4 +868,14 @@ select_credential_or_enter_name = Please enter or select a value in the Credenti type_of_credential = Type of Credential credential_name = Credential Name selected_credential = Selected Credential -year_issued = Year Issued \ No newline at end of file +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 \ No newline at end of file diff --git a/utilities/ISF-transition/obsoleteUris/directory_walker.rb b/utilities/ISF-transition/obsoleteUris/directory_walker.rb index c7c87ea8..5ccaa89c 100644 --- a/utilities/ISF-transition/obsoleteUris/directory_walker.rb +++ b/utilities/ISF-transition/obsoleteUris/directory_walker.rb @@ -34,13 +34,13 @@ class DirectoryWalker def scan_line(path, line_number, line) @obsolete_uris.uris.each do |uri| next if @known_exceptions.skip?(path, line_number, uri) - @report.add_event(Event.new(path, line_number, line, uri)) if line =~ Regexp.new(Regexp.quote(uri)) + @report.add_event(Event.new(path, line_number, line, uri)) if line =~ Regexp.new("\\b#{Regexp.quote(uri)}\\b") end if @complete @obsolete_uris.localnames.each do |localname| term = ":#{localname}" next if @known_exceptions.skip?(path, line_number, term) - @report.add_event(Event.new(path, line_number, line, term)) if line =~ Regexp.new(Regexp.quote(term)) + @report.add_event(Event.new(path, line_number, line, term)) if line =~ Regexp.new("#{Regexp.quote(term)}\\b") end end end diff --git a/utilities/ISF-transition/obsoleteUris/report.rb b/utilities/ISF-transition/obsoleteUris/report.rb index aa9dce78..0bdef5eb 100644 --- a/utilities/ISF-transition/obsoleteUris/report.rb +++ b/utilities/ISF-transition/obsoleteUris/report.rb @@ -33,7 +33,13 @@ class Report hash.sort.each do |path, events| puts "#{path}" events.sort{|a, b| a.line_number <=> b.line_number }.each do |e| - puts " #{e.line_number} #{e.line}" + trimmed = + if e.line.size <= 100 + e.line + else + e.line[0..97] << "..." + end + puts " #{e.line_number} #{trimmed}" puts " #{e.is_localname ? "Localname" : "URI"} #{e.string}" end puts "--------------------" diff --git a/utilities/LoadTesting/scripts/_captureTomcatLogs b/utilities/LoadTesting/scripts/_captureTomcatLogs index e5ddbbaf..55bcd656 100755 --- a/utilities/LoadTesting/scripts/_captureTomcatLogs +++ b/utilities/LoadTesting/scripts/_captureTomcatLogs @@ -10,6 +10,7 @@ directory, for possible inspection later. -------------------------------------------------------------------------------- =end +require File.expand_path('subscripts/common', File.dirname(__FILE__)) require 'date' require "#{File.dirname(__FILE__)}/subscripts/loadParms" @@ -17,19 +18,27 @@ def figure_time_stamp() return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S") end -Dir.chdir("/home/jeb228/LoadTesting/versions/#{@version_name}") do |path| - @tomcat_logs_dir = "#{path}/tomcatLogs" - if (! File.directory?(@tomcat_logs_dir)) - Dir.mkdir(@tomcat_logs_dir) +def add_read_me() + puts "Add a comment for the README.txt file" + comment = STDIN.gets.strip + return if comment.empty? + + File.open('README.txt', "w") do |file| + file.puts comment end end +@tomcat_logs_dir = version_file('tomcatLogs') +if (! File.directory?(@tomcat_logs_dir)) + Dir.mkdir(@tomcat_logs_dir) +end + Dir.chdir(@tomcat_logs_dir) do |path| @this_logs_dir = "#{path}/#{figure_time_stamp()}" Dir.mkdir(@this_logs_dir) end Dir.chdir(@this_logs_dir) do |path| - system('cp ~/LoadTesting/tomcat/logs/* .') + system("cp #{@home}/tomcat/logs/* .") + add_read_me() end - diff --git a/utilities/acceptance-tests/suites/ShortViews/shortview_config.n3 b/utilities/acceptance-tests/suites/ShortViews/shortview_config.n3 index 13700e49..37e20113 100644 --- a/utilities/acceptance-tests/suites/ShortViews/shortview_config.n3 +++ b/utilities/acceptance-tests/suites/ShortViews/shortview_config.n3 @@ -67,12 +67,14 @@ mydomain:facultyPreferredTitleDG a datagetters:SparqlQueryDataGetter ; display:saveToVar "extra" ; display:query """ -PREFIX rdfs: -PREFIX vivo: -SELECT ?pt +PREFIX obo: +PREFIX vcard: +SELECT DISTINCT ?pt WHERE { -?individualUri ?pt -} +?individualUri obo:ARG_2000028 ?vIndividual . +?vIndividual vcard:hasTitle ?vTitle . +?vTitle vcard:title ?pt . +} LIMIT 1 """ .