vivo/productMods/config/listViewConfig-relatedRole.xml

135 lines
5.7 KiB
XML
Raw Normal View History

<?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>
<query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
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
2013-09-23 09:04:22 -04:00
?dateTimeInterval ?dateTimeStart ?dateTimeEnd ?objectType
WHERE {
2013-09-23 09:04:22 -04:00
?subject ?property ?role .
?role a ?objectType
OPTIONAL { ?role rdfs:label ?roleLabel }
# We need ?subclass in the uncollated query to get the roleTypeLabel
2013-09-23 09:04:22 -04:00
# for roles that have no label.
2013-10-29 14:47:41 -04:00
OPTIONAL { ?role vitro:mostSpecificType ?subclass . }
OPTIONAL { ?role vitro:mostSpecificType ?subclass .
?subclass rdfs:label ?roleTypeLabel
}
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/RO_0000052&gt; ?indivInRole }
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/RO_0000052&gt; ?indivInRole .
?indivInRole rdfs:label ?indivLabel
}
2013-11-22 11:59:36 -05:00
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?indivInRole .
2013-10-29 14:47:41 -04:00
}
2013-11-22 11:59:36 -05:00
OPTIONAL { ?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?indivInRole .
2013-10-29 14:47:41 -04:00
?indivInRole rdfs:label ?indivLabel
}
2013-10-29 14:47:41 -04:00
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval .
?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>
2011-01-31 22:52:40 +00:00
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&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;
2011-01-31 22:52:40 +00:00
CONSTRUCT {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
2011-01-31 22:52:40 +00:00
?role ?roleProperty ?roleValue .
?role vitro:mostSpecificType ?subclass .
2011-01-31 22:52:40 +00:00
?subclass rdfs:label ?roleTypeLabel .
?indivInRole rdfs:label ?indivLabel
} WHERE {
{
2013-09-23 09:04:22 -04:00
?subject ?property ?role .
?role a ?objectType
2011-01-31 22:52:40 +00:00
} UNION {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
?role ?roleProperty ?roleValue
2011-01-31 22:52:40 +00:00
} UNION {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
?role vitro:mostSpecificType ?subclass
2011-01-31 22:52:40 +00:00
} UNION {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
2011-12-12 17:15:39 +00:00
?role vitro:mostSpecificType ?subclass .
2011-01-31 22:52:40 +00:00
?subclass rdfs:label ?roleTypeLabel
} UNION {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
?role &lt;http://purl.obolibrary.org/obo/RO_0000052&gt; ?indivInRole .
?indivInRole rdfs:label ?indivLabel
} UNION {
?subject ?property ?role .
?role a ?objectType .
2013-11-22 11:59:36 -05:00
?role &lt;http://purl.obolibrary.org/obo/BFO_0000054&gt; ?indivInRole .
2011-01-31 22:52:40 +00:00
?indivInRole rdfs:label ?indivLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
2011-01-31 22:52:40 +00:00
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?role .
2013-09-23 09:04:22 -04:00
?role a ?objectType .
2011-01-31 22:52:40 +00:00
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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>
2011-01-31 22:52:40 +00:00
</list-view-config>