diff --git a/productMods/config/listViewConfig-dateTimeInterval.xml b/productMods/config/listViewConfig-dateTimeInterval.xml index 63f482c8..fc04ae41 100644 --- a/productMods/config/listViewConfig-dateTimeInterval.xml +++ b/productMods/config/listViewConfig-dateTimeInterval.xml @@ -16,29 +16,70 @@ ?valueEnd ?valueEndName ?dateTimeEnd ?precisionEnd WHERE { - GRAPH ?g1 { ?subject ?property ?dateTimeInterval - LET (?intervalName := afn:localname(?dateTimeInterval)) - } - OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?valueStart - LET (?valueStartName := afn:localname(?valueStart)) - } - OPTIONAL { GRAPH ?g3 { ?valueStart core:dateTime ?dateTimeStart } } - OPTIONAL { GRAPH ?g4 { ?valueStart core:dateTimePrecision ?dateTimePrecisionStart - LET (?precisionStart := afn:localname(?dateTimePrecisionStart)) - } + ?subject ?property ?dateTimeInterval + LET (?intervalName := afn:localname(?dateTimeInterval)) + OPTIONAL { ?dateTimeInterval core:start ?valueStart + LET (?valueStartName := afn:localname(?valueStart)) + OPTIONAL { ?valueStart core:dateTime ?dateTimeStart } + OPTIONAL { ?valueStart core:dateTimePrecision ?dateTimePrecisionStart + LET (?precisionStart := afn:localname(?dateTimePrecisionStart)) } } - OPTIONAL { GRAPH ?g5 { ?dateTimeInterval core:end ?valueEnd - LET (?valueEndName := afn:localname(?valueEnd)) - } - OPTIONAL { GRAPH ?g6 { ?valueEnd core:dateTime ?dateTimeEnd } } - OPTIONAL { GRAPH ?g7 { ?valueEnd core:dateTimePrecision ?dateTimePrecisionEnd - LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd)) - } + OPTIONAL { ?dateTimeInterval core:end ?valueEnd + LET (?valueEndName := afn:localname(?valueEnd)) + OPTIONAL { ?valueEnd core:dateTime ?dateTimeEnd } + OPTIONAL { ?valueEnd core:dateTimePrecision ?dateTimePrecisionEnd + LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd)) } } } - + + + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval core:start ?valueStart . + ?dateTimeInterval core:end ?valueEnd + } WHERE { + { + ?subject ?property ?dateTimeInterval + } + UNION { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval core:start ?valueStart + } + UNION { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval core:end ?valueEnd + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?valueStart ?p ?o + } WHERE { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval core:start ?valueStart . + ?valueStart ?p ?o + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?valueEnd ?p ?o + } WHERE { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval core:end ?valueEnd . + ?valueEnd ?p ?o + } + + diff --git a/productMods/config/listViewConfig-dateTimeValue.xml b/productMods/config/listViewConfig-dateTimeValue.xml index e12f7b32..78407434 100644 --- a/productMods/config/listViewConfig-dateTimeValue.xml +++ b/productMods/config/listViewConfig-dateTimeValue.xml @@ -13,11 +13,26 @@ (afn:localname(?dateTimeValue) AS ?dateTimeValueName) (afn:localname(?dateTimePrecision) AS ?precision) ?dateTime WHERE { - GRAPH ?g1 { ?subject ?property ?dateTimeValue } - OPTIONAL { GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime } } - OPTIONAL { GRAPH ?g3 { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision } } + ?subject ?property ?dateTimeValue + OPTIONAL { ?dateTimeValue core:dateTime ?dateTime } + OPTIONAL { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision } } + + + CONSTRUCT { + ?subject ?property ?dateTimeValue . + ?dateTimeValue ?p ?o . + } WHERE { + { + ?subject ?property ?dateTimeValue + } + UNION { + ?subject ?property ?dateTimeValue . + ?dateTimeValue ?p ?o . + } + } + - \ No newline at end of file + diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml index fb1e2850..a9321cdc 100644 --- a/productMods/config/listViewConfig-educationalTraining.xml +++ b/productMods/config/listViewConfig-educationalTraining.xml @@ -15,25 +15,24 @@ ?majorField ?deptOrSchool ?info ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?edTraining + ?subject ?property ?edTraining LET (?edTrainingName := afn:localname(?edTraining)) + OPTIONAL { ?edTraining core:trainingAtOrganization ?org . + ?org rdfs:label ?orgName } - OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org } - GRAPH ?g3 { ?org rdfs:label ?orgName } + OPTIONAL { ?edTraining core:degreeEarned ?degree + OPTIONAL { ?degree rdfs:label ?degreeName } + OPTIONAL { ?degree core:abbreviation ?degreeAbbr } } - OPTIONAL { GRAPH ?g4 { ?edTraining core:degreeEarned ?degree } - OPTIONAL { GRAPH ?g5 { ?degree rdfs:label ?degreeName } } - OPTIONAL { GRAPH ?g6 { ?degree core:abbreviation ?degreeAbbr } } - } - OPTIONAL { GRAPH ?g7 { ?edTraining core:majorField ?majorField } } - OPTIONAL { GRAPH ?g8 { ?edTraining core:departmentOrSchool ?deptOrSchool } } - OPTIONAL { GRAPH ?g9 { ?edTraining core:supplementalInformation ?info } } - OPTIONAL { GRAPH ?g10 { ?edTraining core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g12 { ?dateTimeStartValue core:dateTime ?dateTimeStart } + 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 { GRAPH ?g13 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g14 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) @@ -52,32 +51,142 @@ ?majorField ?deptOrSchool ?info ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?edTraining + ?subject ?property ?edTraining LET (?edTrainingName := afn:localname(?edTraining)) - } - OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org } - GRAPH ?g3 { ?org rdfs:label ?orgName } - OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf foaf:Organization } - GRAPH ?g5 { ?org a ?subclass } + OPTIONAL { ?edTraining core:trainingAtOrganization ?org . + ?org rdfs:label ?orgName + OPTIONAL { ?subclass rdfs:subClassOf foaf:Organization . + ?org a ?subclass } } - OPTIONAL { GRAPH ?g6 { ?edTraining core:degreeEarned ?degree } - OPTIONAL { GRAPH ?g7 { ?degree rdfs:label ?degreeName } } - OPTIONAL { GRAPH ?g8 { ?degree core:abbreviation ?degreeAbbr } } + OPTIONAL { ?edTraining core:degreeEarned ?degree + OPTIONAL { ?degree rdfs:label ?degreeName } + OPTIONAL { ?degree core:abbreviation ?degreeAbbr } } - OPTIONAL { GRAPH ?g9 { ?edTraining core:majorField ?majorField } } - OPTIONAL { GRAPH ?g10 { ?edTraining core:departmentOrSchool ?deptOrSchool } } - OPTIONAL { GRAPH ?g11 { ?edTraining core:supplementalInformation ?info } } - OPTIONAL { GRAPH ?g12 { ?edTraining core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g13 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g14 { ?dateTimeStartValue core:dateTime ?dateTimeStart } + 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 { GRAPH ?g15 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g16 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) + + + 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 { + ?subclass rdfs:subClassOf foaf:Organization . + } WHERE { + ?subclass rdfs:subClassOf foaf:Organization . + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?subject ?property ?edTraining . + ?edTraining ?edTrainingProp ?edTrainingValue . + ?edTraining core:trainingAtOrganization ?org . + ?org rdfs:label ?orgName . + ?edTraining core:degreeEarned ?degree . + ?edTraining core:dateTimeInterval ?dateTimeInterval + } WHERE { + { + ?subject ?property ?edTraining . + } + UNION { + ?subject ?property ?edTraining . + ?edTraining ?edTrainingProp ?edTrainingValue + } + UNION { + ?subject ?property ?edTraining . + ?edTraining core:trainingAtOrganization ?org . + ?org rdfs:label ?orgName + } + UNION { + ?subject ?property ?edTraining . + ?edTraining core:degreeEarned ?degree . + } + UNION { + ?subject ?property ?edTraining . + ?edTraining core:dateTimeInterval ?dateTimeInterval + } + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?org a ?subclass + } WHERE { + ?subject ?property ?edTraining . + ?edTraining core:trainingAtOrganization ?org . + ?org a ?subclass + } + + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?degree rdfs:label ?degreeName . + ?degree core:abbreviation ?degreeAbbr + } WHERE { + { + ?subject ?property ?edTraining . + ?edTraining core:degreeEarned ?degree . + ?degree rdfs:label ?degreeName + } UNION { + ?subject ?property ?edTraining . + ?edTraining core:degreeEarned ?degree . + ?degree core:abbreviation ?degreeAbbr + } + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart . + } WHERE { + ?subject ?property ?edTraining . + ?edTraining core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart . + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?edTraining . + ?edTraining core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index c4963727..bb6dd7d1 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -1,64 +1,123 @@ - - - - - - - - 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 (afn:localname(?role) AS ?roleName) - ?roleLabel - ?activity (afn:localname(?activity) AS ?activityName) - ?activityLabel - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?role } - OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity } - OPTIONAL { GRAPH ?g3 { ?activity rdfs:label ?activityLabel } } - } - OPTIONAL { GRAPH ?g4 { ?role rdfs:label ?roleLabel } } - OPTIONAL { GRAPH ?g5 { ?role core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } - } - } - } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName - - - - 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 (afn:localname(?role) AS ?roleName) - ?roleLabel - ?activity ?activityName - ?activityLabel - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?role } - OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity } - OPTIONAL { GRAPH ?g3 { ?activity rdfs:label ?activityLabel } } - } - OPTIONAL { GRAPH ?g4 { ?role a ?subclass } - GRAPH ?g5 { ?subclass rdfs:subClassOf core:Role } - } - OPTIONAL { GRAPH ?g6 { ?role rdfs:label ?roleLabel } } - OPTIONAL { GRAPH ?g7 { ?role core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g9 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g11 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } - } - } - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName - - - + + + + + + + + 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 (afn:localname(?role) AS ?roleName) + ?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 + ?role (afn:localname(?role) AS ?roleName) + ?roleLabel + ?activity ?activityName + ?dateTimeStart ?dateTimeEnd WHERE { + ?subject ?property ?role + 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 . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subclass rdfs:subClassOf core:Role + } WHERE { + ?subclass rdfs:subClassOf core:Role + } + + + + 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 + } UNION { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue + } UNION { + ?subject ?property ?role . + ?role core:roleIn ?activity . + ?activity rdfs:label ?activityName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + \ No newline at end of file diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index 77a44646..3e2abdd4 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -1,43 +1,80 @@ - - - - - - - - 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 (afn:localname(?authorship) AS ?authorshipName) - ?person ?personName WHERE { - GRAPH ?g1 { ?subject ?property ?authorship } - OPTIONAL { GRAPH ?g2 { ?authorship core:authorRank ?rank } } - OPTIONAL { GRAPH ?g3 { ?authorship core:linkedAuthor ?person } - GRAPH ?g4 { ?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 - ?authorship (afn:localname(?authorship) AS ?authorshipName) - ?person ?personName WHERE { - GRAPH ?g1 { ?subject ?property ?authorship } - OPTIONAL { GRAPH ?g2 { ?authorship core:authorRank ?rank } } - OPTIONAL { GRAPH ?g3 { ?authorship core:linkedAuthor ?person } - GRAPH ?g4 { ?person rdfs:label ?personName } - OPTIONAL { GRAPH ?g5 { ?person a ?subclass } - GRAPH ?g6 { ?subclass rdfs:subClassOf foaf:Person } - } - } - } ORDER BY ?subclass ?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#> + + SELECT DISTINCT ?authorship (afn:localname(?authorship) AS ?authorshipName) + ?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 + ?authorship (afn:localname(?authorship) AS ?authorshipName) + ?person ?personName WHERE { + ?subject ?property ?authorship + OPTIONAL { ?authorship core:authorRank ?rank } + OPTIONAL { ?authorship core:linkedAuthor ?person . + ?person rdfs:label ?personName + OPTIONAL { ?person a ?subclass . + ?subclass rdfs:subClassOf foaf: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#> + CONSTRUCT { + ?subject ?property ?authorship . + ?authorship ?authorshipProperty ?authorshipValue . + ?person rdfs:label ?personName . + ?person a ?subclass + } WHERE { + { + ?subject ?property ?authorship + } UNION { + ?subject ?property ?authorship . + ?authorship ?authorshipProperty ?authorshipValue + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedAuthor ?person . + ?person rdfs:label ?personName + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedAuthor ?person . + ?person rdfs:label ?personName . + ?person a ?subclass + } + } + + + + diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml index dbc91c5b..d3d63d44 100644 --- a/productMods/config/listViewConfig-organizationForPosition.xml +++ b/productMods/config/listViewConfig-organizationForPosition.xml @@ -1,67 +1,128 @@ - - - - - - - - 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 (afn:localname(?position) AS ?positionName) - ?positionTitle - ?person ?personName - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?position } - OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person } - GRAPH ?g3 { ?person rdfs:label ?personName } - } - OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } } - OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g9 { ?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 - ?position (afn:localname(?position) AS ?positionName) - ?positionTitle - ?person ?personName - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?position } - OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person } - GRAPH ?g3 { ?person rdfs:label ?personName } - } - OPTIONAL { GRAPH ?g4 { ?position a ?subclass } - GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position } - } - OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } } - OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g9 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g11 { ?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 ?subclass ?personName - - - - \ No newline at end of file + + + + + + + + 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 (afn:localname(?position) AS ?positionName) + ?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 + ?position (afn:localname(?position) AS ?positionName) + ?positionTitle + ?person ?personName + ?dateTimeStart ?dateTimeEnd WHERE { + ?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 . + ?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 ?subclass ?personName + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subclass rdfs:subClassOf core:Position + } WHERE { + ?subclass rdfs:subClassOf core:Position + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?position . + ?position ?positionProperty ?positionValue . + ?person rdfs:label ?personName + } WHERE { + { + ?subject ?property ?position + } UNION { + ?subject ?property ?position . + ?position ?positionProperty ?positionValue + } UNION { + ?subject ?property ?position . + ?position core:positionForPerson ?person . + ?person rdfs:label ?personName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + + diff --git a/productMods/config/listViewConfig-personInPosition.xml b/productMods/config/listViewConfig-personInPosition.xml index 5f279f5f..7be5edd3 100644 --- a/productMods/config/listViewConfig-personInPosition.xml +++ b/productMods/config/listViewConfig-personInPosition.xml @@ -1,62 +1,123 @@ - - - - - - - - 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 (afn:localname(?position) AS ?positionName) - ?positionTitle - ?org ?orgName - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?position } - OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org } - GRAPH ?g3 { ?org rdfs:label ?orgName } - } - OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } } - OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g9 { ?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 - ?position (afn:localname(?position) AS ?positionName) - ?positionTitle - ?org ?orgName - ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?position } - OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org } - GRAPH ?g3 { ?org rdfs:label ?orgName } - } - OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } } - OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart } - } - OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } - } - } - OPTIONAL { GRAPH ?g8 { ?position a ?subclass } - GRAPH ?g9 { ?subclass rdfs:subClassOf core:Position } - } - } ORDER BY ?subclass 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 ?position (afn:localname(?position) AS ?positionName) + ?positionTitle + ?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: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 + ?position (afn:localname(?position) AS ?positionName) + ?positionTitle + ?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:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + } + OPTIONAL { ?position a ?subclass . + ?subclass rdfs:subClassOf core:Position + } + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subclass rdfs:subClassOf core:Position + } WHERE { + ?subclass rdfs:subClassOf core:Position + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?position . + ?position ?positionProperty ?positionValue . + ?org rdfs:label ?orgName + } WHERE { + { + ?subject ?property ?position + } UNION { + ?subject ?property ?position . + ?position ?positionProperty ?positionValue + } UNION { + ?subject ?property ?position . + ?position core:positionInOrganization ?org . + ?org rdfs:label ?orgName + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?position . + ?position core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + + + \ No newline at end of file diff --git a/productMods/config/listViewConfig-relatedRole.xml b/productMods/config/listViewConfig-relatedRole.xml index 7a760f92..2a4449c1 100644 --- a/productMods/config/listViewConfig-relatedRole.xml +++ b/productMods/config/listViewConfig-relatedRole.xml @@ -15,28 +15,28 @@ ?roleLabel ?roleTypeLabel ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?role } + ?subject ?property ?role # We need ?subclass in query-base to get the roleTypeLabel for roles that # have no label (e.g., InvestigatorRole and its subclasses) - OPTIONAL { GRAPH ?g2 { ?role a ?subclass } - GRAPH ?g3 { ?subclass rdfs:subClassOf core:Role } - OPTIONAL { GRAPH ?g4 { ?subclass rdfs:label ?roleTypeLabel } } + OPTIONAL { ?role a ?subclass . + ?subclass rdfs:subClassOf core:Role + OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } } - OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf } - GRAPH ?g6 { ?role ?roleProp ?indivInRole } - OPTIONAL { GRAPH ?g7 { ?indivInRole rdfs:label ?indivLabel } } + OPTIONAL { ?roleProp rdfs:subPropertyOf core:roleOf . + ?role ?roleProp ?indivInRole + OPTIONAL { ?indivInRole rdfs:label ?indivLabel } } - OPTIONAL { GRAPH ?g8 { ?role rdfs:label ?roleLabel } } + OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { GRAPH ?g9 { ?role core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g11 { ?dateTimeStartValue core:dateTime ?dateTimeStart } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart } - OPTIONAL { GRAPH ?g12 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g13 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } # Make sure we get the role that goes with the role property @@ -60,26 +60,26 @@ ?roleLabel ?roleTypeLabel ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE { - GRAPH ?g1 { ?subject ?property ?role } + ?subject ?property ?role - OPTIONAL { GRAPH ?g2 { ?role a ?subclass } - GRAPH ?g3 { ?subclass rdfs:subClassOf core:Role } - OPTIONAL { GRAPH ?g4 { ?subclass rdfs:label ?roleTypeLabel } } + OPTIONAL { ?role a ?subclass . + ?subclass rdfs:subClassOf core:Role + OPTIONAL { ?subclass rdfs:label ?roleTypeLabel } } - OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf } - GRAPH ?g6 { ?role ?roleProp ?indivInRole } - OPTIONAL { GRAPH ?g7 { ?indivInRole rdfs:label ?indivLabel } } + OPTIONAL { ?roleProp rdfs:subPropertyOf core:roleOf . + ?role ?roleProp ?indivInRole + OPTIONAL { ?indivInRole rdfs:label ?indivLabel } } - OPTIONAL { GRAPH ?g8 { ?role rdfs:label ?roleLabel } } + OPTIONAL { ?role rdfs:label ?roleLabel } - OPTIONAL { GRAPH ?9 { ?role core:dateTimeInterval ?dateTimeInterval } - OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue } - GRAPH ?g11 { ?dateTimeStartValue core:dateTime ?dateTimeStart } + OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval + OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart } - OPTIONAL { GRAPH ?g12 { ?dateTimeInterval core:end ?dateTimeEndValue } - GRAPH ?g13 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } + OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd } } # Make sure we get the role that goes with the role property @@ -91,9 +91,87 @@ } ORDER BY ?subclass ?indivName ?indivLabel ?roleLabel ?roleTypeLabel + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subclass rdfs:subClassOf core:Role + } WHERE { + ?subclass rdfs:subClassOf core:Role + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?roleProp rdfs:subPropertyOf core:roleOf + } WHERE { + ?roleProp rdfs:subPropertyOf core:roleOf + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + CONSTRUCT { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue . + ?subclass rdfs:label ?roleTypeLabel . + ?indivInRole rdfs:label ?indivLabel + } WHERE { + { + ?subject ?property ?role + } UNION { + ?subject ?property ?role . + ?role ?roleProperty ?roleValue . + } UNION { + ?subject ?property ?role . + ?role a ?subclass . + } UNION { + ?subject ?property ?role . + ?role a ?subclass . + ?subclass rdfs:label ?roleTypeLabel + } UNION { + ?subject ?property ?role . + ?role ?roleProp ?indivInRole . + ?indivInRole rdfs:label ?indivLabel + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:start ?dateTimeStartValue . + ?dateTimeStartValue core:dateTime ?dateTimeStart + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + CONSTRUCT { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } WHERE { + ?subject ?property ?role . + ?role core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeEndValue . + ?dateTimeEndValue core:dateTime ?dateTimeEnd + } + - \ No newline at end of file +