NIHVIVO-3303 - showing the defining source for a concept
This commit is contained in:
parent
bb4b5af2b3
commit
337249e90c
2 changed files with 43 additions and 4 deletions
|
@ -10,14 +10,25 @@
|
|||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT ?concept ?conceptLabel ?conceptName
|
||||
SELECT ?concept ?conceptLabel ?conceptName ?vocabularySource ?vocabularySourceName
|
||||
WHERE {
|
||||
?subject ?property ?concept .
|
||||
LET (?conceptName := afn:localname(?concept))
|
||||
optional {?concept rdfs:label ?conceptLabel}
|
||||
optional {?concept rdfs:isDefinedBy ?vocabularySource
|
||||
optional { ?vocabularySource rdfs:label ?vocabularySourceName}}
|
||||
} ORDER BY ?conceptLabel ?conceptName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?concept .
|
||||
} WHERE {
|
||||
?subject ?property ?concept .
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
|
@ -25,8 +36,33 @@
|
|||
?concept rdfs:label ?conceptLabel
|
||||
} WHERE {
|
||||
?subject ?property ?concept .
|
||||
optional {?concept rdfs:label ?conceptLabel}
|
||||
?concept rdfs:label ?conceptLabel
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?concept .
|
||||
?concept rdfs:isDefinedBy ?vocabularySource
|
||||
} WHERE {
|
||||
?subject ?property ?concept .
|
||||
?concept rdfs:isDefinedBy ?vocabularySource
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?concept .
|
||||
?concept rdfs:isDefinedBy ?vocabularySource .
|
||||
?vocabularySource rdfs:label ?vocabularySourceName
|
||||
} WHERE {
|
||||
?subject ?property ?concept .
|
||||
?concept rdfs:isDefinedBy ?vocabularySource .
|
||||
?vocabularySource rdfs:label ?vocabularySourceName
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-hasAssociatedConcept.ftl</template>
|
||||
</list-view-config>
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
is also used to generate the property statement during a deletion.
|
||||
-->
|
||||
|
||||
|
||||
<@showConcept statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showConcept statement>
|
||||
<a href="${statement.concept}">${statement.conceptLabel!statement.conceptName}</a>
|
||||
<#if statement.vocabularySourceName??>
|
||||
<a href="${statement.concept}">${statement.conceptLabel!statement.conceptName}</a> (<a href="${statement.vocabularySource}">${statement.vocabularySourceName}</a>)
|
||||
<#else>
|
||||
<a href="${statement.concept}">${statement.conceptLabel!statement.conceptName}</a>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
|
Loading…
Add table
Reference in a new issue