NIHVIVO-2605 core:hasPresenterRole custom list view, temporarily without construct queries
This commit is contained in:
parent
4b641d5dc7
commit
cf82810a5e
3 changed files with 30 additions and 106 deletions
|
@ -6,6 +6,7 @@
|
|||
<list-view-config>
|
||||
<query-select>
|
||||
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 <collated>?subclass</collated>
|
||||
?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 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
|
||||
}
|
||||
}
|
||||
|
||||
<collated>
|
||||
?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
|
||||
}
|
||||
</collated>
|
||||
|
||||
}
|
||||
|
||||
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) )
|
||||
</critical-data-required>
|
||||
|
||||
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) ?presentationName
|
||||
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) ?presentationLabel ?presentationName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
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 }
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
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
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
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
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,18 +15,24 @@
|
|||
next statement -->
|
||||
<#macro showRole statement>
|
||||
<#local linkedIndividual>
|
||||
<#if statement.activity??>
|
||||
<a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
|
||||
<#if statement.presentation??>
|
||||
<a href="${profileUrl(statement.presentation)}">${statement.presentationLabel!statement.presentationName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${profileUrl(statement.role)}">missing activity</a>
|
||||
<a href="${profileUrl(statement.role)}">missing presentation</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTime>
|
||||
<@dt.yearSpan statement.dateTimeStart! />
|
||||
<@dt.yearSpan statement.dateTime! />
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} ${statement.roleLabel!} ${dateTime!}
|
||||
<#local conference>
|
||||
<#if statement.conference?has_content && statement.conferenceLabel?has_content>
|
||||
<a href="${profileUrl(statement.conference)}">${statement.conferenceLabel}</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<@s.join [ linkedIndividual, statement.roleLabel!, conference! ] /> ${dateTime!}
|
||||
|
||||
</#macro>
|
|
@ -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 />
|
||||
|
|
Loading…
Add table
Reference in a new issue