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 ?subclass
# 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
}
}
FILTER ( bound(?indivInRole) )
} ORDER BY ?subclass ?indivLabel ?roleLabel ?roleTypeLabel ?indivName
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
}
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
}
}
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
}
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
}
propStatement-relatedRole.ftl