vivo/productMods/config/listViewConfig-relatedRole.xml

99 lines
5.2 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-base>
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;
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
?roleLabel ?roleTypeLabel
?indivInRole ?indivName
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
# ?role is either a core:Role or one of its subclasses
{
{ GRAPH ?g2 { ?role a ?subclass } }
{ GRAPH ?g3 { ?subclass rdfs:subClassOf core:Role } }
UNION
{ GRAPH ?g4 { ?role a core:Role } }
}
# Works because we don't do inferencing on subproperties, so the only ?roleProp
# returned will be the asserted one.
OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf }
GRAPH ?g6 { ?role ?roleProp ?indivInRole }
GRAPH ?g7 { ?indivInRole rdfs:label ?indivName }
}
OPTIONAL { GRAPH ?g8 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g9 { ?subclass rdfs:label ?roleTypeLabel } }
OPTIONAL { GRAPH ?g10 { ?role core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g12 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g13 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g14 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
FILTER (
( ?roleProp != core:investigatorRoleOf || ?subclass = core:InvestigatorRole ) &amp;&amp;
( ?roleProp != core:principalInvestigatorRoleOf || ?subclass = core:PrincipalInvestigatorRole ) &amp;&amp;
( ?roleProp != core:co-PrincipalInvestigatorRoleOf || ?subclass = core:CoPrincipalInvestigatorRole )
)
} ORDER BY ?indivName ?roleLabel ?roleTypeLabel
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?role (afn:localname(?role) AS ?roleName)
?roleLabel ?roleTypeLabel
?indivInRole ?indivName
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
# ?role is either a core:Role or one of its subclasses
{
{ GRAPH ?g2 { ?role a ?subclass } }
{ GRAPH ?g3 { ?subclass rdfs:subClassOf core:Role } }
UNION
{ GRAPH ?g4 { ?role a core:Role } }
}
# Works because we don't do inferencing on subproperties, so the only ?roleProp
# returned will be the asserted one.
OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf }
GRAPH ?g6 { ?role ?roleProp ?indivInRole }
GRAPH ?g7 { ?indivInRole rdfs:label ?indivName }
}
OPTIONAL { GRAPH ?g8 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g9 { ?subclass rdfs:label ?roleTypeLabel } }
OPTIONAL { GRAPH ?g10 { ?role core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g12 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g13 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g14 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
FILTER (
( ?roleProp != core:investigatorRoleOf || ?subclass = core:InvestigatorRole ) &amp;&amp;
( ?roleProp != core:principalInvestigatorRoleOf || ?subclass = core:PrincipalInvestigatorRole ) &amp;&amp;
( ?roleProp != core:co-PrincipalInvestigatorRoleOf || ?subclass = core:CoPrincipalInvestigatorRole )
)
} ORDER BY ?subclass ?indivName ?roleLabel ?roleTypeLabel
</query-collated>
<!--
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.RelatedRoleDataPostProcessor</postprocessor>
-->
<template>propStatement-relatedRole.ftl</template>
</list-view-config>