NIHVIVO-3879 fixed blank node deletion root finder query

This commit is contained in:
brianjlowe 2012-07-06 17:25:02 +00:00
parent 278fde61d6
commit a205915dc2

View file

@ -93,7 +93,7 @@ public abstract class RDFServiceJena extends RDFServiceImpl implements RDFServic
log.warn("This likely indicates a problem; excessive data may be deleted.");
}
String rootFinder = "SELECT ?s WHERE { ?s ?p ?o OPTIONAL { ?ss ?pp ?s FILTER(!isBlank(?ss)) } FILTER (!bound(?ss)) }";
String rootFinder = "SELECT ?s WHERE { ?s ?p ?o OPTIONAL { ?ss ?pp ?s } FILTER (!isBlank(?s) || !bound(?ss)) }";
Query rootFinderQuery = QueryFactory.create(rootFinder);
QueryExecution qe = QueryExecutionFactory.create(rootFinderQuery, blankNodeModel);
try {