[TASK] Use FILTER NOT EXISTS instead of OPTIONAL juggling.
This commit is contained in:
parent
1394221d03
commit
de2d6fa64a
|
@ -148,14 +148,11 @@ public class Main {
|
|||
+ " BIND(f:timestamp(?a,rdf:type,<http://example.org/type/A>) AS ?tsa) "
|
||||
+ " BIND(f:timestamp(?c,rdf:type,<http://example.org/type/C>) AS ?tsc) "
|
||||
+ " FILTER(?tsa < ?tsc) "
|
||||
+ " OPTIONAL {"
|
||||
+ " FILTER NOT EXISTS { "
|
||||
+ " ?b a <http://example.org/type/B> . "
|
||||
+ " BIND(f:timestamp(?b,rdf:type,<http://example.org/type/B>) AS ?tsb) "
|
||||
+ " FILTER(?tsb < ?tsa || ?tsc < ?tsb)"
|
||||
+ " FILTER(?tsa < ?tsb && ?tsb < ?tsc)"
|
||||
+ " } "
|
||||
//+ " BIND(BOUND(?b) AS ?bbound) "
|
||||
//+ " BIND(?tsa < ?tsb AS ?abeforeb) "
|
||||
//+ " BIND(?tsb < ?tsc AS ?bbeforec) "
|
||||
+ "}";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue