added departments to concept page based on researcher selecting concept as research area
* 4 new files for handling the new linkage (individual--skos-concept.ftl, individual-affiliated-departments.ftl, individual-affiliated-dept-details.ftl, vivoConceptDataGetters.n3) * added invdividual--skos-concept.ftl to the skos:Concept definition in vivo-core-1.5-annotations.rdf * added i18n entries for the new ftl pages
This commit is contained in:
parent
5f7bbc6799
commit
76238887b1
6 changed files with 157 additions and 0 deletions
82
rdf/display/everytime/vivoConceptDataGetters.n3
Normal file
82
rdf/display/everytime/vivoConceptDataGetters.n3
Normal file
|
@ -0,0 +1,82 @@
|
|||
# $This file is distributed under the terms of the license in /doc/license.txt$
|
||||
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||
@prefix core: <http://vivoweb.org/ontology/core#> .
|
||||
@prefix vivoweb: <http://vivoweb.org/ontology#> .
|
||||
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
|
||||
|
||||
|
||||
#### n3 for research areas ####
|
||||
|
||||
## associate the classes with the datagetter ##
|
||||
|
||||
<http://www.w3.org/2004/02/skos/core#Concept> display:hasDataGetter display:getDepartmentDataGetter .
|
||||
|
||||
## define the datagetter ##
|
||||
|
||||
display:getDepartmentDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "departmentsResults";
|
||||
display:query
|
||||
"""
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
SELECT DISTINCT (str(?departmentLabel) AS ?deptLabel) ?dept
|
||||
WHERE {
|
||||
?individualURI vivo:researchAreaOf ?person .
|
||||
?person vivo:personInPosition ?posn .
|
||||
?posn vivo:positionInOrganization ?dept .
|
||||
?dept rdfs:label ?departmentLabel
|
||||
OPTIONAL { ?posn vivo:dateTimeInterval ?dti
|
||||
OPTIONAL { ?dti vivo:end ?end .
|
||||
?end vivo:dateTime ?endDate
|
||||
}
|
||||
}
|
||||
FILTER ( !bound(?endDate) ||
|
||||
afn:substring(str(?endDate), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
||||
}
|
||||
ORDER BY ?deptLabel
|
||||
""" .
|
||||
|
||||
## detail page for dept research areas ##
|
||||
|
||||
<http://vitro.mannlib.cornell.edu/ns/default#n55553333>
|
||||
a <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page> ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasDataGetter> <http://vitro.mannlib.cornell.edu/ns/default#n55552222> ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#requiresBodyTemplate> "individual-affiliated-dept-details.ftl" ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#title> "Departmental Research Areas" ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#urlMapping> "/affiliatedDepartments" .
|
||||
|
||||
<http://vitro.mannlib.cornell.edu/ns/default#n55552222>
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter> ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#query>
|
||||
"""
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
SELECT DISTINCT (str (?prsnLabel) AS ?personLabel)
|
||||
?person
|
||||
(Str(?researchAreaLabel) AS ?raLabel)
|
||||
(str(?departmentLabel) AS ?orgLabel)
|
||||
?raURI
|
||||
?orgURI
|
||||
WHERE {
|
||||
?orgURI vivo:organizationForPosition ?posn .
|
||||
?orgURI rdfs:label ?orgLabel .
|
||||
?posn vivo:positionForPerson ?person .
|
||||
?person rdfs:label ?prsnLabel .
|
||||
?person vivo:hasResearchArea ?raURI .
|
||||
?raURI rdfs:label ?researchAreaLabel
|
||||
|
||||
}
|
||||
ORDER BY ?personLabel
|
||||
""" ;
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
|
||||
"deptResearchAreas" .
|
||||
|
||||
|
||||
|
||||
|
|
@ -2953,6 +2953,7 @@
|
|||
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
|
||||
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
|
||||
<vitro:inClassGroup rdf:resource="http://vivoweb.org/ontology#vitroClassGrouppublications"/>
|
||||
<vitro:customDisplayViewAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string">individual--skos-concept.ftl</vitro:customDisplayViewAnnot>
|
||||
<vitro:displayLimitAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
|
||||
>-1</vitro:displayLimitAnnot>
|
||||
<vitro:displayRankAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue