vivo/productMods/config/listViewConfig-hasEditReviewRole.xml

164 lines
No EOL
7.3 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>
<query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
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;
SELECT DISTINCT <collated>?subclass</collated> ?subclassLabel
# send the property to the template, since this view supports multiple role properties
?property
?role
?activity ?activityName
?activityLabel
?infoResource ?infoResourceName
?infoResourceLabel
?dateTimeStart ?dateTimeEnd WHERE {
?subject ?property ?role
OPTIONAL { ?role core:roleContributesTo ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
OPTIONAL { ?role core:roleRealizedIn ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
}
# NB Currently we can only retrieve subclass for either the
# infoResource or the activity, but not both. Later, we could have
# the query retrieve both and write a custom preprocessor to merge
# the results into a single subclass column.
?infoResource vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf ?superclass
FILTER ( ( ?property = core:hasEditorRole &amp;&amp; ?superclass = bibo:Collection ) ||
( ?property = core:hasReviewerRole &amp;&amp; ?superclass = core:InformationResource )
)
# Get subclass label for display in uncollated view
?subclass rdfs:label ?subclassLabel
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(?infoResource) )
</critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
</query-select>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
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;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?infoResource .
?infoResource vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf ?superclass .
?subclass rdfs:label ?subclassLabel
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?infoResource .
?infoResource vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf ?superclass .
?subclass rdfs:label ?subclassLabel
FILTER ( ?superclass = bibo:Collection || ?superclass = core:InformationResource )
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
?activity rdfs:label ?activityName
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityName
} UNION {
?subject ?property ?role .
?role core:roleRealizedIn ?activity .
?activity rdfs:label ?activityName
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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: &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>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
?infoResource rdfs:label ?infoResourceLabel
} WHERE {
{
?subject ?property ?role
} UNION {
?subject ?property ?role .
?role ?roleProperty ?roleValue .
} UNION {
?subject ?property ?role .
?role core:roleContributesTo ?infoResource .
?infoResource rdfs:label ?infoResourceLabel .
}
}
</query-construct>
<template>propStatement-hasEditReviewRole.ftl</template>
</list-view-config>