NIHVIVO-1859 Apply collation subclass filtering in Java postprocessing rather than in query, due to inefficiency of graph filtering in the SPARQl query as it is converted to SQL

This commit is contained in:
rjy7 2011-01-24 17:57:28 +00:00
parent f9c467fa16
commit a1c6286992
4 changed files with 179 additions and 47 deletions

View file

@ -24,15 +24,9 @@
SELECT ?subclass ?object ?name ?moniker {
GRAPH ?g1 { ?subject ?property ?object
OPTIONAL { ?object a ?subclass }
# TODO: the original intent was to allow the
# type triple to be in a different graph,
# but SDB makes an extremely inefficient
# query with this additional graph variable.
}
OPTIONAL { GRAPH ?g2 { ?object rdfs:label ?name } }
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
FILTER ( ?g1 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g1 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
OPTIONAL { GRAPH ?g3 { ?object vitro:moniker ?moniker } }
} ORDER BY ?subclass
</query-collated>