updating editor and review role list views for new property relating the role to the activity

This commit is contained in:
stellamit 2011-11-04 18:03:20 +00:00
parent cd088e325d
commit 01a90eb20d
2 changed files with 6 additions and 21 deletions

View file

@ -3,9 +3,6 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt --> <!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<!-- Discussion with Brian C: This file is a modification of listViewConfig-hasRole.xml -
it might be decided to merge the two. (sjm222 6/7/2011) -->
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
@ -36,9 +33,6 @@
OPTIONAL { ?activity rdfs:label ?activityLabel } OPTIONAL { ?activity rdfs:label ?activityLabel }
} }
OPTIONAL { ?role core:forInformationResource ?infoResource
LET (?infoResourceName := afn:localname(?infoResource))
OPTIONAL { ?infoResource rdfs:label ?infoResourceLabel }
# NB Currently we can only retrieve subclass for either the # NB Currently we can only retrieve subclass for either the
# infoResource or the activity, but not both. Later, we could have # infoResource or the activity, but not both. Later, we could have
@ -52,8 +46,7 @@
) )
# Get subclass label for display in uncollated view # Get subclass label for display in uncollated view
?subclass rdfs:label ?subclassLabel ?subclass rdfs:label ?subclassLabel
}
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
@ -66,7 +59,7 @@
<critical-data-required> <critical-data-required>
FILTER ( bound(?infoResource) ) FILTER ( bound(?infoResource) )
</critical-data-required> </critical-data-required>
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?infoResourceLabel ?infoResourceName } ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
</query-select> </query-select>
<query-construct> <query-construct>
@ -77,13 +70,13 @@
CONSTRUCT { CONSTRUCT {
?subject ?property ?role . ?subject ?property ?role .
?role core:forInformationResource ?infoResource . ?role core:roleContributesTo ?infoResource .
?infoResource vitro:mostSpecificType ?subclass . ?infoResource vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf ?superclass . ?subclass rdfs:subClassOf ?superclass .
?subclass rdfs:label ?subclassLabel ?subclass rdfs:label ?subclassLabel
} WHERE { } WHERE {
?subject ?property ?role . ?subject ?property ?role .
?role core:forInformationResource ?infoResource . ?role core:roleContributesTo ?infoResource .
?infoResource vitro:mostSpecificType ?subclass . ?infoResource vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf ?superclass . ?subclass rdfs:subClassOf ?superclass .
?subclass rdfs:label ?subclassLabel ?subclass rdfs:label ?subclassLabel
@ -161,7 +154,7 @@
?role ?roleProperty ?roleValue . ?role ?roleProperty ?roleValue .
} UNION { } UNION {
?subject ?property ?role . ?subject ?property ?role .
?role core:forInformationResource ?infoResource . ?role core:roleContributesTo ?infoResource .
?infoResource rdfs:label ?infoResourceLabel . ?infoResource rdfs:label ?infoResourceLabel .
} }
} }

View file

@ -15,15 +15,7 @@
next statement --> next statement -->
<#macro showRole statement property> <#macro showRole statement property>
<#local linkedIndividual> <#local linkedIndividual>
<#if statement.infoResource??> <a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
<#if statement.activity??>
<a href="${profileUrl(statement.infoResource)}">${statement.infoResourceLabel!statement.infoResourceName}</a> <a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
<#else>
<a href="${profileUrl(statement.infoResource)}">${statement.infoResourceLabel!statement.infoResourceName}</a>
</#if>
<#elseif statement.activity??>
<a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
</#if>
</#local> </#local>
<#local dateTime> <#local dateTime>