NIHVIVO3285: the series label will now display if the intervening event is part of a series or if the presentation itself is part of a series

This commit is contained in:
tworrall 2011-11-07 16:01:54 +00:00
parent 5c8fbbb798
commit b2476d88c9
2 changed files with 166 additions and 59 deletions

View file

@ -10,7 +10,7 @@
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt; PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
@ -19,6 +19,7 @@
?role ?roleLabel ?role ?roleLabel
?presentation ?presentationName ?presentationLabel ?presentation ?presentationName ?presentationLabel
?conference ?conferenceLabel ?conference ?conferenceLabel
?series ?seriesLabel
?workshop ?workshop
?dateTime ?dateTime
@ -28,7 +29,7 @@
OPTIONAL { ?role rdfs:label ?roleLabel } OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role core:roleRealizedIn ?presentation OPTIONAL { ?role vivo:roleRealizedIn ?presentation
LET (?presentationName := afn:localname(?presentation)) LET (?presentationName := afn:localname(?presentation))
OPTIONAL { ?presentation rdfs:label ?presentationLabel } OPTIONAL { ?presentation rdfs:label ?presentationLabel }
@ -37,37 +38,58 @@
OPTIONAL { ?conference rdfs:label ?conferenceLabel } OPTIONAL { ?conference rdfs:label ?conferenceLabel }
{ {
?presentation core:eventWithin ?conference ?presentation vivo:eventWithin ?conference
} UNION { } UNION {
?conference core:includesEvent ?presentation ?conference vivo:includesEvent ?presentation
} }
} }
OPTIONAL { OPTIONAL {
{ {
?presentation core:eventWithin ?workshop . ?presentation vivo:eventWithin ?workshop .
?workshop core:eventWithin ?conference ?workshop vivo:eventWithin ?conference
} UNION { } UNION {
?workshop core:includesEvent ?presentation . ?workshop vivo:includesEvent ?presentation .
?conference core:includesEvent ?workshop ?conference vivo:includesEvent ?workshop
} }
OPTIONAL { ?conference rdfs:label ?conferenceLabel } 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 vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?workshop vivo:includesEvent ?presentation .
?series vivo:seriesForEvent ?workshop
}
OPTIONAL { ?series rdfs:label ?seriesLabel }
}
<collated> <collated>
?presentation vitro:mostSpecificType ?subclass . ?presentation vitro:mostSpecificType ?subclass .
{ {
?subclass rdfs:subClassOf core:Presentation ?subclass rdfs:subClassOf vivo:Presentation
} UNION { } UNION {
?subclass owl:equivalentClass core:Presentation ?subclass owl:equivalentClass vivo:Presentation
} }
</collated> </collated>
} }
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?role vivo:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . OPTIONAL { ?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTime ?dateTimeStartValue vivo:dateTime ?dateTime
} }
} }
@ -79,34 +101,34 @@
</query-select> </query-select>
<query-construct> <query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt; PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass . ?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:Presentation . ?subclass rdfs:subClassOf vivo:Presentation .
?subclass owl:equivalentClass core:Presentation . ?subclass owl:equivalentClass vivo:Presentation .
} WHERE { } WHERE {
{ {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass . ?presentation vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:Presentation ?subclass rdfs:subClassOf vivo:Presentation
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?presentation vitro:mostSpecificType ?subclass . ?presentation vitro:mostSpecificType ?subclass .
?subclass owl:equivalentClass core:Presentation ?subclass owl:equivalentClass vivo:Presentation
} }
} }
</query-construct> </query-construct>
<query-construct> <query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
@ -120,7 +142,7 @@
?role ?roleProperty ?roleValue ?role ?roleProperty ?roleValue
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?presentation rdfs:label ?presentationLabel ?presentation rdfs:label ?presentationLabel
} }
} }
@ -128,38 +150,38 @@
<query-construct> <query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?conference . ?presentation vivo:eventWithin ?conference .
?conference core:includesEvent ?presentation . ?conference vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} WHERE { } WHERE {
{ {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?conference ?presentation vivo:eventWithin ?conference
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?conference . ?presentation vivo:eventWithin ?conference .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?conference core:includesEvent ?presentation ?conference vivo:includesEvent ?presentation
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?conference core:includesEvent ?presentation . ?conference vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} }
} }
@ -167,60 +189,143 @@
<query-construct> <query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
?workshop core:eventWithin ?conference . ?workshop vivo:eventWithin ?conference .
?conference core:includesEvent ?workshop . ?conference vivo:includesEvent ?workshop .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?workshop . ?presentation vivo:eventWithin ?workshop .
?workshop core:includesEvent ?presentation . ?workshop vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} WHERE { } WHERE {
{ {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?workshop . ?presentation vivo:eventWithin ?workshop .
?workshop core:eventWithin ?conference ?workshop vivo:eventWithin ?conference
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?presentation core:eventWithin ?workshop . ?presentation vivo:eventWithin ?workshop .
?workshop core:eventWithin ?conference . ?workshop vivo:eventWithin ?conference .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?conference core:includesEvent ?workshop . ?conference vivo:includesEvent ?workshop .
?workshop core:includesEvent ?presentation ?workshop vivo:includesEvent ?presentation
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:roleRealizedIn ?presentation . ?role vivo:roleRealizedIn ?presentation .
?conference a bibo:Conference . ?conference a bibo:Conference .
?conference core:includesEvent ?workshop . ?conference vivo:includesEvent ?workshop .
?workshop core:includesEvent ?presentation . ?workshop vivo:includesEvent ?presentation .
?conference rdfs:label ?conferenceLabel ?conference rdfs:label ?conferenceLabel
} }
} }
</query-construct> </query-construct>
<query-construct> <query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval . ?series a vivo:EventSeries .
?dateTimeInterval core:start ?dateTimeStartValue . ?presentation vivo:inEventSeries ?series .
?dateTimeStartValue core:dateTime ?dateTimeStart ?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?workshop vivo:inEventSeries ?series .
?series vivo:seriesForEvent ?workshop .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:includesEvent ?presentation .
?series rdfs:label ?seriesLabel
} WHERE {
{
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?presentation vivo:eventWithin ?workshop .
?workshop vivo:inEventSeries ?series .
?series rdfs:label ?seriesLabel
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop vivo:includesEvent ?presentation
} UNION {
?subject ?property ?role .
?role vivo:roleRealizedIn ?presentation .
?series a vivo:EventSeries .
?series vivo:seriesForEvent ?workshop .
?workshop vivo:includesEvent ?presentation .
?series rdfs:label ?seriesLabel
}
}
</query-construct>
<query-construct>
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue vivo:dateTime ?dateTimeStart
} WHERE { } WHERE {
?subject ?property ?role . ?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval . ?role vivo:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeInterval vivo:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart ?dateTimeStartValue vivo:dateTime ?dateTimeStart
} }
</query-construct> </query-construct>

View file

@ -30,6 +30,8 @@
<#local conference> <#local conference>
<#if statement.conference?has_content && statement.conferenceLabel?has_content> <#if statement.conference?has_content && statement.conferenceLabel?has_content>
<a href="${profileUrl(statement.conference)}">${statement.conferenceLabel}</a> <a href="${profileUrl(statement.conference)}">${statement.conferenceLabel}</a>
<#elseif statement.series?has_content && statement.seriesLabel?has_content>
<a href="${profileUrl(statement.series)}">${statement.seriesLabel}</a>
</#if> </#if>
</#local> </#local>