2011-01-06 14:44:04 +00:00
|
|
|
<?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>
|
2011-01-19 20:46:39 +00:00
|
|
|
<query-base>
|
2011-01-06 14:44:04 +00:00
|
|
|
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#>
|
|
|
|
|
2011-01-24 21:53:02 +00:00
|
|
|
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
|
2011-01-19 20:46:39 +00:00
|
|
|
?roleLabel ?roleTypeLabel
|
|
|
|
?indivInRole ?indivName
|
2011-01-18 00:25:43 +00:00
|
|
|
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
2011-01-06 14:44:04 +00:00
|
|
|
GRAPH ?g1 { ?subject ?property ?role }
|
2011-01-25 19:17:10 +00:00
|
|
|
|
|
|
|
# ?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 } }
|
|
|
|
}
|
|
|
|
|
2011-01-24 21:53:02 +00:00
|
|
|
# Works because we don't do inferencing on subproperties, so the only ?roleProp
|
2011-01-24 20:12:53 +00:00
|
|
|
# returned will be the asserted one.
|
2011-01-25 19:17:10 +00:00
|
|
|
OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf }
|
|
|
|
GRAPH ?g6 { ?role ?roleProp ?indivInRole }
|
|
|
|
GRAPH ?g7 { ?indivInRole rdfs:label ?indivName }
|
2011-01-24 21:53:02 +00:00
|
|
|
}
|
2011-01-25 19:17:10 +00:00
|
|
|
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 }
|
2011-01-06 14:44:04 +00:00
|
|
|
}
|
2011-01-25 19:17:10 +00:00
|
|
|
OPTIONAL { GRAPH ?g13 { ?dateTimeInterval core:end ?dateTimeEndValue }
|
|
|
|
GRAPH ?g14 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
2011-01-06 14:44:04 +00:00
|
|
|
}
|
2011-01-24 21:53:02 +00:00
|
|
|
}
|
|
|
|
FILTER (
|
|
|
|
( ?roleProp != core:investigatorRoleOf || ?subclass = core:InvestigatorRole ) &&
|
|
|
|
( ?roleProp != core:principalInvestigatorRoleOf || ?subclass = core:PrincipalInvestigatorRole ) &&
|
|
|
|
( ?roleProp != core:co-PrincipalInvestigatorRoleOf || ?subclass = core:CoPrincipalInvestigatorRole )
|
|
|
|
)
|
2011-01-07 20:34:30 +00:00
|
|
|
} ORDER BY ?indivName ?roleLabel ?roleTypeLabel
|
2011-01-19 20:46:39 +00:00
|
|
|
</query-base>
|
|
|
|
|
|
|
|
<query-collated>
|
|
|
|
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#>
|
|
|
|
|
2011-01-24 20:12:53 +00:00
|
|
|
SELECT DISTINCT ?subclass
|
2011-01-19 20:46:39 +00:00
|
|
|
?role (afn:localname(?role) AS ?roleName)
|
|
|
|
?roleLabel ?roleTypeLabel
|
|
|
|
?indivInRole ?indivName
|
|
|
|
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
2011-01-25 19:17:10 +00:00
|
|
|
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 } }
|
|
|
|
}
|
|
|
|
|
2011-01-24 21:53:02 +00:00
|
|
|
# Works because we don't do inferencing on subproperties, so the only ?roleProp
|
2011-01-24 20:12:53 +00:00
|
|
|
# returned will be the asserted one.
|
2011-01-25 19:17:10 +00:00
|
|
|
OPTIONAL { GRAPH ?g5 { ?roleProp rdfs:subPropertyOf core:roleOf }
|
|
|
|
GRAPH ?g6 { ?role ?roleProp ?indivInRole }
|
|
|
|
GRAPH ?g7 { ?indivInRole rdfs:label ?indivName }
|
2011-01-24 21:53:02 +00:00
|
|
|
}
|
2011-01-25 19:17:10 +00:00
|
|
|
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 }
|
2011-01-19 20:46:39 +00:00
|
|
|
}
|
2011-01-25 19:17:10 +00:00
|
|
|
OPTIONAL { GRAPH ?g13 { ?dateTimeInterval core:end ?dateTimeEndValue }
|
|
|
|
GRAPH ?g14 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
2011-01-19 20:46:39 +00:00
|
|
|
}
|
|
|
|
}
|
2011-01-24 21:53:02 +00:00
|
|
|
FILTER (
|
|
|
|
( ?roleProp != core:investigatorRoleOf || ?subclass = core:InvestigatorRole ) &&
|
|
|
|
( ?roleProp != core:principalInvestigatorRoleOf || ?subclass = core:PrincipalInvestigatorRole ) &&
|
|
|
|
( ?roleProp != core:co-PrincipalInvestigatorRoleOf || ?subclass = core:CoPrincipalInvestigatorRole )
|
|
|
|
)
|
2011-01-19 20:46:39 +00:00
|
|
|
} ORDER BY ?subclass ?indivName ?roleLabel ?roleTypeLabel
|
|
|
|
</query-collated>
|
2011-01-24 20:12:53 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.RelatedRoleDataPostProcessor</postprocessor>
|
|
|
|
-->
|
|
|
|
|
2011-01-06 14:44:04 +00:00
|
|
|
<template>propStatement-relatedRole.ftl</template>
|
|
|
|
</list-view-config>
|