diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml index 9b214b58..dd85287a 100644 --- a/productMods/config/listViewConfig-authorInAuthorship.xml +++ b/productMods/config/listViewConfig-authorInAuthorship.xml @@ -4,45 +4,29 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?authorship - ?infoResource ?infoResourceName - ?dateTime WHERE { - ?subject ?property ?authorship - OPTIONAL { ?authorship core:linkedInformationResource ?infoResource . - ?infoResource rdfs:label ?infoResourceName - OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } - } - } ORDER BY DESC(?dateTime) ?infoResourceName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?authorship ?infoResource ?infoResourceName ?dateTime WHERE { ?subject ?property ?authorship OPTIONAL { ?authorship core:linkedInformationResource ?infoResource . ?infoResource rdfs:label ?infoResourceName + OPTIONAL { ?subclass rdfs:subClassOf core:InformationResource . ?infoResource a ?subclass - } + } + OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime - } - } - } ORDER BY ?subclass DESC(?dateTime) ?infoResourceName - + } + } + } ORDER BY ?subclass ?infoResourceName + PREFIX core: <http://vivoweb.org/ontology/core#> diff --git a/productMods/config/listViewConfig-dateTimeInterval.xml b/productMods/config/listViewConfig-dateTimeInterval.xml index f9def01e..30493edc 100644 --- a/productMods/config/listViewConfig-dateTimeInterval.xml +++ b/productMods/config/listViewConfig-dateTimeInterval.xml @@ -4,7 +4,7 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> @@ -33,7 +33,7 @@ } } } - + PREFIX core: <http://vivoweb.org/ontology/core#> diff --git a/productMods/config/listViewConfig-dateTimeValue.xml b/productMods/config/listViewConfig-dateTimeValue.xml index a26786b3..c7e61120 100644 --- a/productMods/config/listViewConfig-dateTimeValue.xml +++ b/productMods/config/listViewConfig-dateTimeValue.xml @@ -4,7 +4,7 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> @@ -16,7 +16,7 @@ OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } OPTIONAL { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision } } - + CONSTRUCT { diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml index ee68d472..f43f80f0 100644 --- a/productMods/config/listViewConfig-educationalTraining.xml +++ b/productMods/config/listViewConfig-educationalTraining.xml @@ -4,46 +4,13 @@ - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?edTraining - ?org ?orgName - ?degreeName ?degreeAbbr - ?majorField ?deptOrSchool ?info - ?dateTimeStart ?dateTimeEnd - WHERE { - ?subject ?property ?edTraining - OPTIONAL { ?edTraining core:trainingAtOrganization ?org . - ?org rdfs:label ?orgName - } - OPTIONAL { ?edTraining core:degreeEarned ?degree - OPTIONAL { ?degree rdfs:label ?degreeName } - OPTIONAL { ?degree core:abbreviation ?degreeAbbr } - } - 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 - } - } - } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) - - - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?edTraining ?org ?orgName ?degreeName ?degreeAbbr @@ -53,10 +20,12 @@ ?subject ?property ?edTraining OPTIONAL { ?edTraining core:trainingAtOrganization ?org . ?org rdfs:label ?orgName + OPTIONAL { ?subclass rdfs:subClassOf foaf:Organization . ?org a ?subclass - } - } + } + + } OPTIONAL { ?edTraining core:degreeEarned ?degree OPTIONAL { ?degree rdfs:label ?degreeName } OPTIONAL { ?degree core:abbreviation ?degreeAbbr } @@ -73,7 +42,7 @@ } } } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index 82b60c8c..425d1bd9 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -4,37 +4,12 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?role - ?roleLabel - ?activity ?activityName - ?dateTimeStart ?dateTimeEnd WHERE { - ?subject ?property ?role - OPTIONAL { ?role core:roleIn ?activity . - ?activity rdfs:label ?activityName - } - OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?role ?roleLabel ?activity ?activityName @@ -43,9 +18,11 @@ OPTIONAL { ?role core:roleIn ?activity . ?activity rdfs:label ?activityName } + OPTIONAL { ?role a ?subclass . ?subclass rdfs:subClassOf core:Role } + OPTIONAL { ?role rdfs:label ?roleLabel } OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . @@ -55,8 +32,8 @@ ?dateTimeEndValue core:dateTime ?dateTimeEnd } } - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName - + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index 4980c8b1..072e627f 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -4,40 +4,26 @@ - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?authorship - ?person ?personName WHERE { - ?subject ?property ?authorship - OPTIONAL { ?authorship core:authorRank ?rank } - OPTIONAL { ?authorship core:linkedAuthor ?person . - ?person rdfs:label ?personName - } - } ORDER BY ?rank ?personName - - - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?authorship ?person ?personName WHERE { ?subject ?property ?authorship OPTIONAL { ?authorship core:authorRank ?rank } OPTIONAL { ?authorship core:linkedAuthor ?person . - ?person rdfs:label ?personName + ?person rdfs:label ?personName + OPTIONAL { ?person a ?subclass . ?subclass rdfs:subClassOf foaf:Person - } - } - } ORDER BY ?subclass ?rank ?personName - + } + + } ORDER BY ?subclass ?rank ?personName + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml index c7abc188..2e39f5ef 100644 --- a/productMods/config/listViewConfig-organizationForPosition.xml +++ b/productMods/config/listViewConfig-organizationForPosition.xml @@ -4,40 +4,12 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?position - ?positionTitle - ?person ?personName - ?dateTimeStart ?dateTimeEnd WHERE { - ?subject ?property ?position - OPTIONAL { ?position core:positionForPerson ?person . - ?person rdfs:label ?personName - } - OPTIONAL { ?position rdfs:label ?positionTitle } - OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - - } - # Current positions only: end date is either null or not in the past - } FILTER ( !bound(?dateTimeEnd) || - afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) - } ORDER BY ?personName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?position ?positionTitle ?person ?personName @@ -45,10 +17,12 @@ ?subject ?property ?position OPTIONAL { ?position core:positionForPerson ?person . ?person rdfs:label ?personName - } + } + OPTIONAL { ?position a ?subclass . ?subclass rdfs:subClassOf core:Position - } + } + OPTIONAL { ?position rdfs:label ?positionTitle } OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . @@ -60,8 +34,8 @@ # Current positions only: end date is either null or not in the past } FILTER ( !bound(?dateTimeEnd) || afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) - } ORDER BY ?subclass ?personName - + } ORDER BY ?subclass ?personName + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/productMods/config/listViewConfig-personInPosition.xml b/productMods/config/listViewConfig-personInPosition.xml index 6db9b722..3a46b378 100644 --- a/productMods/config/listViewConfig-personInPosition.xml +++ b/productMods/config/listViewConfig-personInPosition.xml @@ -4,39 +4,12 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?position - ?positionTitle - ?hrJobTitle - ?org ?orgName - ?dateTimeStart ?dateTimeEnd WHERE { - ?subject ?property ?position - OPTIONAL { ?position core:positionInOrganization ?org . - ?org rdfs:label ?orgName - } - OPTIONAL { ?position rdfs:label ?positionTitle } - OPTIONAL { ?position core:hrJobTitle ?hrJobTitle } - OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval - OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart - } - OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd - } - } - } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?subclass + SELECT DISTINCT ?subclass ?position ?positionTitle ?hrJobTitle @@ -56,11 +29,13 @@ ?dateTimeEndValue core:dateTime ?dateTimeEnd } } + OPTIONAL { ?position a ?subclass . ?subclass rdfs:subClassOf core:Position } - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName - + + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/productMods/config/listViewConfig-relatedRole.xml b/productMods/config/listViewConfig-relatedRole.xml index a4085f00..d9b119d9 100644 --- a/productMods/config/listViewConfig-relatedRole.xml +++ b/productMods/config/listViewConfig-relatedRole.xml @@ -4,12 +4,13 @@ - + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?role + SELECT DISTINCT ?subclass + ?role ?roleLabel ?roleTypeLabel ?indivInRole (afn:localname(?indivInRole) AS ?indivName) ?indivLabel @@ -18,9 +19,9 @@ ?subject ?property ?role OPTIONAL { ?role rdfs:label ?roleLabel } - - # We need ?subclass in query-base to get the roleTypeLabel for roles that - # have no label (e.g., InvestigatorRole and its subclasses) + + # We need ?subclass in the uncollated query to get the roleTypeLabel + # for roles that have no label (e.g., InvestigatorRole and its subclasses). OPTIONAL { ?role a ?subclass . ?subclass rdfs:subClassOf core:Role OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } @@ -39,45 +40,8 @@ } } - } ORDER BY ?indivName ?indivLabel ?roleLabel ?roleTypeLabel - - - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT DISTINCT ?subclass - ?role - ?roleLabel ?roleTypeLabel - ?indivInRole (afn:localname(?indivInRole) AS ?indivName) - ?indivLabel - ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE { - - ?subject ?property ?role - - OPTIONAL { ?role rdfs:label ?roleLabel } - - OPTIONAL { ?role a ?subclass . - ?subclass rdfs:subClassOf core:Role - OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } - ?roleProp rdfs:subPropertyOf core:roleOf ; - rdfs:domain ?subclass . - ?role ?roleProp ?indivInRole - OPTIONAL { ?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 - } - } - - } ORDER BY ?subclass ?indivName ?indivLabel ?roleLabel ?roleTypeLabel - + } ORDER BY ?subclass?indivName ?indivLabel ?roleLabel ?roleTypeLabel + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>