PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
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#>
SELECT DISTINCT ?subclass ?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 && ?superclass = bibo:Collection ) ||
( ?property = core:hasReviewerRole && ?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
}
}
FILTER ( bound(?infoResource) )
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
PREFIX bibo: <http://purl.org/ontology/bibo/>
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 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 )
}
PREFIX core: <http://vivoweb.org/ontology/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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
}
}
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
}
PREFIX core: <http://vivoweb.org/ontology/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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 .
}
}
propStatement-hasEditReviewRole.ftl