131 lines
5.6 KiB
XML
131 lines
5.6 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
|
|
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
|
|
|
<!-- List view config for http://vivoweb.org/ontology/core#contributingRole,
|
|
http://vivoweb.org/ontology/core#realizedRole and http://vivoweb.org/ontology/core#linkedRole -->
|
|
|
|
<list-view-config>
|
|
<query-select>
|
|
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 vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
|
|
|
SELECT DISTINCT <collated>?subclass</collated>
|
|
# send the property to the template, since this view supports multiple role properties
|
|
?property
|
|
?role
|
|
?roleLabel ?roleTypeLabel
|
|
?indivInRole (afn:localname(?indivInRole) AS ?indivName)
|
|
?indivLabel
|
|
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
|
|
|
?subject ?property ?role
|
|
|
|
OPTIONAL { ?role rdfs:label ?roleLabel }
|
|
|
|
# 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 vitro:mostSpecificType ?subclass .
|
|
?subclass rdfs:subClassOf core:Role
|
|
OPTIONAL { ?subclass rdfs:label ?roleTypeLabel }
|
|
?roleProp rdfs:subPropertyOf core:roleOf ;
|
|
rdfs:domain ?subclass .
|
|
OPTIONAL { ?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
|
|
}
|
|
}
|
|
<critical-data-required>
|
|
FILTER ( bound(?indivInRole) )
|
|
</critical-data-required>
|
|
} ORDER BY <collated>?subclass</collated> ?indivLabel ?roleLabel ?roleTypeLabel ?indivName
|
|
</query-select>
|
|
|
|
<query-construct>
|
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
|
CONSTRUCT {
|
|
?subclass rdfs:subClassOf core:Role .
|
|
?roleProp rdfs:subPropertyOf core:roleOf .
|
|
?roleProp rdfs:domain ?subclass
|
|
} WHERE {
|
|
?subclass rdfs:subClassOf core:Role .
|
|
?roleProp rdfs:subPropertyOf core:roleOf ;
|
|
rdfs:domain ?subclass
|
|
}
|
|
</query-construct>
|
|
|
|
<query-construct>
|
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
|
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 ?roleProperty ?roleValue .
|
|
?role vitro:mostSpecificType ?subclass .
|
|
?subclass rdfs:label ?roleTypeLabel .
|
|
?indivInRole rdfs:label ?indivLabel
|
|
} WHERE {
|
|
{
|
|
?subject ?property ?role
|
|
} UNION {
|
|
?subject ?property ?role .
|
|
?role ?roleProperty ?roleValue
|
|
} UNION {
|
|
?subject ?property ?role .
|
|
?role vitro:mostSpecificType ?subclass
|
|
} UNION {
|
|
?subject ?property ?role .
|
|
?role vitro:mostSpecificType ?subclass .
|
|
?subclass rdfs:label ?roleTypeLabel
|
|
} UNION {
|
|
?subject ?property ?role .
|
|
?role ?roleProp ?indivInRole .
|
|
?indivInRole rdfs:label ?indivLabel
|
|
}
|
|
}
|
|
</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>
|
|
|
|
<query-construct>
|
|
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
|
|
}
|
|
</query-construct>
|
|
|
|
<template>propStatement-relatedRole.ftl</template>
|
|
</list-view-config>
|