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:30 +00:00
parent 84e0df4952
commit 7afd3789a5
7 changed files with 6 additions and 18 deletions

View file

@ -36,8 +36,6 @@
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName } GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource } OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
GRAPH ?g5 { ?infoResource a ?subclass } GRAPH ?g5 { ?infoResource a ?subclass }
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue } OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue }
GRAPH ?g7 { ?dateTimeValue core:dateTime ?dateTime } GRAPH ?g7 { ?dateTimeValue core:dateTime ?dateTime }

View file

@ -59,8 +59,6 @@
GRAPH ?g3 { ?org rdfs:label ?orgName } GRAPH ?g3 { ?org rdfs:label ?orgName }
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf foaf:Organization } OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf foaf:Organization }
GRAPH ?g5 { ?org a ?subclass } GRAPH ?g5 { ?org a ?subclass }
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
} }
OPTIONAL { GRAPH ?g6 { ?edTraining core:degreeEarned ?degree } OPTIONAL { GRAPH ?g6 { ?edTraining core:degreeEarned ?degree }

View file

@ -45,8 +45,6 @@
} }
OPTIONAL { GRAPH ?g4 { ?role a ?subclass } OPTIONAL { GRAPH ?g4 { ?role a ?subclass }
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Role } GRAPH ?g5 { ?subclass rdfs:subClassOf core:Role }
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
OPTIONAL { GRAPH ?g6 { ?role rdfs:label ?roleLabel } } OPTIONAL { GRAPH ?g6 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g7 { ?role core:dateTimeInterval ?dateTimeInterval } OPTIONAL { GRAPH ?g7 { ?role core:dateTimeInterval ?dateTimeInterval }

View file

@ -34,8 +34,6 @@
GRAPH ?g4 { ?person rdfs:label ?personName } GRAPH ?g4 { ?person rdfs:label ?personName }
OPTIONAL { GRAPH ?g5 { ?person a ?subclass } OPTIONAL { GRAPH ?g5 { ?person a ?subclass }
GRAPH ?g6 { ?subclass rdfs:subClassOf foaf:Person } GRAPH ?g6 { ?subclass rdfs:subClassOf foaf:Person }
FILTER (?g6 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g6 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
} }
} ORDER BY ?subclass ?rank ?personName } ORDER BY ?subclass ?rank ?personName

View file

@ -48,8 +48,6 @@
} }
OPTIONAL { GRAPH ?g4 { ?position a ?subclass } OPTIONAL { GRAPH ?g4 { ?position a ?subclass }
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position } GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position }
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } } OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } }
OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval } OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval }

View file

@ -54,8 +54,6 @@
} }
OPTIONAL { GRAPH ?g8 { ?position a ?subclass } OPTIONAL { GRAPH ?g8 { ?position a ?subclass }
GRAPH ?g9 { ?subclass rdfs:subClassOf core:Position } GRAPH ?g9 { ?subclass rdfs:subClassOf core:Position }
FILTER (?g9 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g9 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
} }
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
</query-collated> </query-collated>

View file

@ -16,8 +16,9 @@
GRAPH ?g1 { ?subject ?property ?role } GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf } OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
GRAPH ?g3 { ?role ?roleProp ?indivInRole } GRAPH ?g3 { ?role ?roleProp ?indivInRole }
FILTER (?g3 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp; # TO DO: Implement this filtering in Java postprocessing
?g3 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; ) # FILTER (?g3 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
# ?g3 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
GRAPH ?g4 { ?indivInRole rdfs:label ?indivName } GRAPH ?g4 { ?indivInRole rdfs:label ?indivName }
} }
OPTIONAL { GRAPH ?g5 { ?role rdfs:label ?roleLabel } } OPTIONAL { GRAPH ?g5 { ?role rdfs:label ?roleLabel } }
@ -48,8 +49,9 @@
GRAPH ?g1 { ?subject ?property ?role } GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf } OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
GRAPH ?g3 { ?role ?roleProp ?indivInRole } GRAPH ?g3 { ?role ?roleProp ?indivInRole }
FILTER (?g3 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp; # TO DO: Implement this filtering in Java postprocessing
?g3 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; ) # FILTER (?g3 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
# ?g3 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
GRAPH ?g4 { ?indivInRole rdfs:label ?indivName } GRAPH ?g4 { ?indivInRole rdfs:label ?indivName }
} }
OPTIONAL { GRAPH ?g5 { ?role rdfs:label ?roleLabel } } OPTIONAL { GRAPH ?g5 { ?role rdfs:label ?roleLabel } }
@ -66,8 +68,6 @@
} }
OPTIONAL { GRAPH ?g13 { ?role a ?subclass } OPTIONAL { GRAPH ?g13 { ?role a ?subclass }
GRAPH ?g14 { ?subclass rdfs:subClassOf core:Role } GRAPH ?g14 { ?subclass rdfs:subClassOf core:Role }
FILTER (?g14 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g14 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
} }
} ORDER BY ?subclass ?indivName ?roleLabel ?roleTypeLabel } ORDER BY ?subclass ?indivName ?roleLabel ?roleTypeLabel
</query-collated> </query-collated>