diff --git a/productMods/config/listViewConfig-hasPresenterRole.xml b/productMods/config/listViewConfig-hasPresenterRole.xml index c91c7e53..ad3cb16d 100644 --- a/productMods/config/listViewConfig-hasPresenterRole.xml +++ b/productMods/config/listViewConfig-hasPresenterRole.xml @@ -6,6 +6,7 @@ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -14,40 +15,43 @@ SELECT DISTINCT ?subclass ?role ?roleLabel ?presentation ?presentationName ?presentationLabel - ?conference ?conferenceName ?conferenceLabel + ?conference ?conferenceLabel + ?dateTime WHERE { ?subject ?property ?role - + + OPTIONAL { ?role rdfs:label ?roleLabel } + OPTIONAL { ?role core:roleIn ?presentation LET (?presentationName := afn:localname(?presentation)) OPTIONAL { ?presentation rdfs:label ?presentationLabel } - OPTIONAL { ?conference a core:Conference . - LET (?conferenceName := afn:localname(?conference)) - OPTIONAL { ?conference rdfs:label ?conferenceLabel } + OPTIONAL { ?conference a bibo:Conference . + OPTIONAL { ?conference rdfs:label ?conferenceLabel } - { ?presentation core:eventWithin ?conference } - UNION - { ?conference core:includesEvent ?presentation } - + { + ?presentation core:eventWithin ?conference } UNION { + ?conference core:includesEvent ?presentation + } } ?presentation vitro:mostSpecificType ?subclass . - { ?subclass rdfs:subClassOf core:Presentation } - UNION - { ?subclass owl:equivalentClass core:Presentation } + + { + ?subclass rdfs:subClassOf core:Presentation } UNION { + ?subclass owl:equivalentClass core:Presentation + } } - OPTIONAL { ?role rdfs:label ?roleLabel } OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . - ?dateTimeStartValue core:dateTime ?dateTimeStart + ?dateTimeStartValue core:dateTime ?dateTime } } @@ -55,94 +59,9 @@ FILTER ( bound(?presentation) ) - } ORDER BY ?subclass DESC(?dateTimeEnd) ?presentationName + } ORDER BY ?subclass DESC(?dateTimeEnd) ?presentationLabel ?presentationName - - PREFIX core: <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 core:roleIn ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - } WHERE { - ?subject ?property ?role . - ?role core:roleIn ?presentation . - ?presentation vitro:mostSpecificType ?subclass . - { ?subclass rdfs:subClassOf core:Presentation } - UNION - { ?subclass owl:equivalentClass core:Presentation } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue . - ?presentation rdfs:label ?presentationLabel - } WHERE { - { - ?subject ?property ?role - } UNION { - ?subject ?property ?role . - ?role ?roleProperty ?roleValue - } UNION { - ?subject ?property ?role . - ?role core:roleIn ?presentation . - ?presentation rdfs:label ?presentationLabel - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - - CONSTRUCT { - ?subject ?property ?role . - ?conference a core:Conference . - ?presentation core:eventWithin ?conference . - ?conference core:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } WHERE { - ?subject ?property ?presentation . - ?role core:roleIn ?presentation . - ?conference a core:Conference . - - { - ?presentation core:eventWithin ?conference - } UNION { - ?presentation core:eventWithin ?conference . - ?conference rdfs:label ?conferenceLabel - } UNION { - ?conference core:includesEvent ?presentation - } UNION { - ?conference core:includesEvent ?presentation . - ?conference rdfs:label ?conferenceLabel - } - } - - - - - 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 - } - diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl index 1ec9cdad..20c4d5bc 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasPresenterRole.ftl @@ -15,18 +15,24 @@ next statement --> <#macro showRole statement> <#local linkedIndividual> - <#if statement.activity??> - ${statement.activityLabel!statement.activityName} + <#if statement.presentation??> + ${statement.presentationLabel!statement.presentationName} <#else> <#-- This shouldn't happen, but we must provide for it --> - missing activity + missing presentation <#local dateTime> - <@dt.yearSpan statement.dateTimeStart! /> + <@dt.yearSpan statement.dateTime! /> + + + <#local conference> + <#if statement.conference?has_content && statement.conferenceLabel?has_content> + ${statement.conferenceLabel} + - ${linkedIndividual} ${statement.roleLabel!} ${dateTime!} + <@s.join [ linkedIndividual, statement.roleLabel!, conference! ] /> ${dateTime!} \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl index 7b4f386a..439cafbc 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl @@ -6,7 +6,6 @@ is also used to generate the property statement during a deletion. --> -<#import "lib-sequence.ftl" as s> <#import "lib-datetime.ftl" as dt> <@showRole statement />