merging 4307 from the 1.5 maintenance branch

This commit is contained in:
tworrall 2012-10-29 16:21:28 +00:00
parent 876bf71a74
commit 7a8d5d9d17
2 changed files with 43 additions and 76 deletions

View file

@ -14,6 +14,7 @@
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
SELECT DISTINCT ?awardReceipt SELECT DISTINCT ?awardReceipt
?receiptLabel
?award ?award
?awardLabel ?awardLabel
?conferredBy ?conferredBy
@ -24,11 +25,13 @@
WHERE { WHERE {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt core:receiptOf ?award . OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel }
OPTIONAL { ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt ?award core:receipt ?awardReceipt
OPTIONAL { ?award rdfs:label ?awardLabel } OPTIONAL { ?award rdfs:label ?awardLabel }
OPTIONAL { ?award core:awardConferredBy ?conferredBy . OPTIONAL { ?award core:awardConferredBy ?conferredBy
?conferredBy rdfs:label ?conferredByLabel OPTIONAL { ?conferredBy rdfs:label ?conferredByLabel }
}
} }
OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
@ -41,51 +44,11 @@
} }
} }
OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
} }
}
} ORDER BY DESC(?dateTime) DESC(?dateTimeEnd) } ORDER BY DESC(?dateTime) DESC(?dateTimeEnd)
</query-select> </query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel
} WHERE {
{
?subject ?property ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue .
?awardReceipt rdfs:label ?awardReceiptLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel
}
}
</query-construct>
<query-construct> <query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
@ -94,10 +57,10 @@
CONSTRUCT { CONSTRUCT {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue . ?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award . ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt . ?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy . ?award core:awardConferredBy ?conferredBy .
?conferredBy rdfs:label ?conferredByLabel ?conferredBy rdfs:label ?conferredByLabel
} WHERE { } WHERE {
@ -105,30 +68,31 @@
?subject ?property ?awardReceipt ?subject ?property ?awardReceipt
} UNION { } UNION {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue ?awardReceipt rdfs:label ?receiptLabel
} UNION { } UNION {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue . ?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt rdfs:label ?awardReceiptLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award . ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt ?award core:receipt ?awardReceipt
} UNION { } UNION {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue . ?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award . ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt . ?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy ?award core:awardConferredBy ?conferredBy
} UNION { } UNION {
?subject ?property ?awardReceipt . ?subject ?property ?awardReceipt .
?awardReceipt ?awardReceiptProperty ?awardReceiptValue . ?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt rdfs:label ?awardReceiptLabel .
?awardReceipt core:receiptOf ?award . ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt . ?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy . ?award core:awardConferredBy ?conferredBy .
?conferredBy rdfs:label ?conferredByLabel ?conferredBy rdfs:label ?conferredByLabel
} }

View file

@ -15,7 +15,9 @@
<#local linkedIndividual> <#local linkedIndividual>
<#if statement.award??> <#if statement.award??>
<a href="${profileUrl(statement.uri("award"))}" title="award name">${statement.awardLabel!statement.localName!}</a> <a href="${profileUrl(statement.uri("award"))}" title="award name">${statement.awardLabel!statement.localName}</a>
<#else>
<a href="${profileUrl(statement.uri("awardReceipt"))}" title="award receipt name">${statement.receiptLabel!statement.localName}</a>
</#if> </#if>
</#local> </#local>
@ -34,4 +36,5 @@
</#local> </#local>
<@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] /> <@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] />
</#macro> </#macro>