NIHVIVO-1633 Support collation toggling for all object properties. Basic functionality in place but not all queries working perfectly yet.

This commit is contained in:
rjy7 2011-01-19 20:46:36 +00:00
parent 43167c6c5c
commit b71400d74e
8 changed files with 129 additions and 102 deletions

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- Default list view config file for uncollated object properties
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
SELECT ?object ?name ?moniker {
GRAPH ?g1 { ?subject ?property ?object }
OPTIONAL { GRAPH ?g2 { ?object rdfs:label ?name } }
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
}
</query>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.DefaultListViewDataPostProcessor</postprocessor>
<template>propStatement-default.ftl</template>
</list-view-config>

View file

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- Default list view config file for collated object properties
<!-- Default list view config file for uncollated object properties
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
SELECT ?object ?name ?moniker {
GRAPH ?g1 { ?subject ?property ?object }
OPTIONAL { GRAPH ?g2 { ?object rdfs:label ?name } }
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
}
</query-base>
<query-collated>
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
@ -18,9 +29,9 @@
FILTER (?g4 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g4 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
}
</query>
} ORDER BY ?subclass
</query-collated>
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.DefaultListViewDataPostProcessor</postprocessor>
<template>propStatement-default.ftl</template>

View file

@ -6,17 +6,20 @@
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
SELECT ?link (afn:localname(?link) AS ?linkName) ?anchor ?url WHERE {
SELECT ?link
(afn:localname(?link) AS ?linkName)
?anchor
?url WHERE {
GRAPH ?g1 { ?subject ?property ?link }
OPTIONAL { GRAPH ?g2 { ?link vitro:linkAnchor ?anchor } }
OPTIONAL { GRAPH ?g3 { ?link vitro:linkURL ?url } }
OPTIONAL { GRAPH ?g4 { ?link vitro:linkDisplayRank ?rank } }
} ORDER BY ?rank
</query>
</query-base>
<template>propStatement-vitroLink.ftl</template>
</list-view-config>