Updates to default list view: remove moniker, and handle label vs. local name from sparql query rather than a data postprocessor
This commit is contained in:
parent
87dc7698e1
commit
0f3491f42d
4 changed files with 9 additions and 17 deletions
|
@ -12,15 +12,15 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT <collated> ?subclass </collated>
|
||||
?object ?name ?moniker WHERE {
|
||||
?object ?label ?localName WHERE {
|
||||
|
||||
?subject ?property ?object
|
||||
LET (?localName := afn:localname(?object))
|
||||
<collated> OPTIONAL { ?object a ?subclass }
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
</collated>
|
||||
OPTIONAL { ?object rdfs:label ?name }
|
||||
OPTIONAL { ?object vitro:moniker ?moniker }
|
||||
} ORDER BY <collated> ?subclass </collated> ?name ?object
|
||||
OPTIONAL { ?object rdfs:label ?label }
|
||||
} ORDER BY <collated> ?subclass </collated> ?label ?label ?localName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
|
@ -30,8 +30,7 @@
|
|||
CONSTRUCT {
|
||||
?subject ?property ?object .
|
||||
?object a ?subclass .
|
||||
?object rdfs:label ?name .
|
||||
?object vitro:moniker ?moniker
|
||||
?object rdfs:label ?label .
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?object
|
||||
|
@ -42,16 +41,11 @@
|
|||
}
|
||||
UNION {
|
||||
?subject ?property ?object .
|
||||
?object rdfs:label ?name .
|
||||
?object rdfs:label ?label .
|
||||
}
|
||||
UNION {
|
||||
?subject ?property ?object .
|
||||
?object vitro:moniker ?moniker .
|
||||
}
|
||||
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.DefaultListViewDataPostProcessor</postprocessor>
|
||||
|
||||
<template>propStatement-default.ftl</template>
|
||||
</list-view-config>
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
is also used to generate the property statement during a deletion.
|
||||
-->
|
||||
|
||||
<a href="${profileUrl(statement.object)}">${statement.name!}</a> ${statement.moniker!}
|
||||
<a href="${profileUrl(statement.object)}">${statement.label!statement.localName!}</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue