# $This file is distributed under the terms of the license in /doc/license.txt$ # # Short View configuration # # This file allows a Vitro administrator to configure short view templates and data getters # for individuals of particular classes in particular contexts. This is a transitional # implementation, and should be replaced when the work on the Application and Display # Ontology is complete. # # Find out how to use this file at # https://sourceforge.net/apps/mediawiki/vivo/index.php?title=Using_Short_Views_in_Release_1.5 # @prefix vivo: . @prefix display: . @prefix datagetters: . @prefix mydomain: . # # In all views, Facult Members should show the name of the # department they belong to. # vivo:FacultyMember display:hasCustomView mydomain:facultySearchView ; display:hasCustomView mydomain:facultyIndexView ; display:hasCustomView mydomain:facultyBrowseView . mydomain:facultySearchView a display:customViewForIndividual ; display:appliesToContext "SEARCH" ; display:hasTemplate "view-search-faculty.ftl" ; display:hasDataGetter mydomain:facultyDepartmentDG . mydomain:facultyIndexView a display:customViewForIndividual ; display:appliesToContext "INDEX" ; display:hasTemplate "view-index-faculty.ftl" ; display:hasDataGetter mydomain:facultyDepartmentDG . mydomain:facultyBrowseView a display:customViewForIndividual ; display:appliesToContext "BROWSE" ; display:hasTemplate "view-browse-faculty.ftl" ; display:hasDataGetter mydomain:facultyDepartmentDG ; display:hasDataGetter mydomain:facultyPreferredTitleDG . mydomain:facultyDepartmentDG a datagetters:SparqlQueryDataGetter ; display:saveToVar "details" ; display:query """ PREFIX rdfs: PREFIX vivo: SELECT ?deptName WHERE { ?individualUri vivo:hasMemberRole ?membership . ?membership vivo:roleContributesTo ?deptUri . ?deptUri a vivo:AcademicDepartment ; rdfs:label ?deptName . } LIMIT 20 """ . mydomain:facultyPreferredTitleDG a datagetters:SparqlQueryDataGetter ; display:saveToVar "extra" ; display:query """ PREFIX rdfs: PREFIX vivo: SELECT ?pt WHERE { ?individualUri ?pt } LIMIT 1 """ . # # In the INDEX view, Academic departments should show locations # and department head. # vivo:AcademicDepartment display:hasCustomView mydomain:departmentView . mydomain:departmentView a display:customViewForIndividual ; display:appliesToContext "INDEX" ; display:hasTemplate "view-index-department.ftl" ; display:hasDataGetter mydomain:departmentLocationDG ; display:hasDataGetter mydomain:departmentHeadDG . mydomain:departmentLocationDG a datagetters:SparqlQueryDataGetter ; display:saveToVar "locations" ; display:query """ PREFIX rdfs: PREFIX vivo: SELECT ?label WHERE { ?location vivo:geographicLocationOf ?individualUri ; rdfs:label ?label . } LIMIT 20 """ . mydomain:departmentHeadDG a datagetters:SparqlQueryDataGetter ; display:saveToVar "deptHead" ; display:query """ PREFIX rdfs: PREFIX vivo: SELECT ?label WHERE { ?individualUri vivo:contributingRole ?role . ?role vivo:leaderRoleOf ?head . ?head rdfs:label ?label . } LIMIT 1 """ .