NIHVIVO-2325 Retrieve property in core:hasRole list view query, since the view supports multiple properties, so the template knows which property is being displayed.

This commit is contained in:
ryounes 2011-03-29 13:46:28 +00:00
parent be6c3c5a30
commit a47a480552
10 changed files with 50 additions and 13 deletions

View file

@ -10,6 +10,8 @@
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
SELECT DISTINCT <collated>?subclass</collated>
# send the property to the template, since this view supports multiple role properties
?property
?role
?startDateOnly
?roleLabel
@ -18,8 +20,6 @@
?subject ?property ?role
LET (?startDateOnly := (?property = core:hasPresenterRole) )
OPTIONAL { ?role core:roleIn ?activity .
?activity rdfs:label ?activityName
}

View file

@ -1,7 +1,11 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#authorInAuthorship -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#authorInAuthorship.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeValue -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeValue.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#educationalTraining -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#educationalTraining.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#hasRole and its child properties -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#hasRole and its child properties.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>
@ -19,8 +23,9 @@
</#if>
</#local>
<#local core = "http://vivoweb.org/ontology/core#">
<#local dateTime>
<#if statement.startDateOnly == "true">
<#if statement.property == "${core}hasPresenterRole">
<@dt.yearSpan statement.dateTimeStart! />
<#else>
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#informationResourceInAuthorship -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#informationResourceInAuthorship.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#organizationForPosition -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#organizationForPosition.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#personInPosition -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#personInPosition.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>

View file

@ -1,6 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#relatedRole -->
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#relatedRole.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>