How can I create a cts:query from sem:sparql…
Background, I am tyring create a custom constraint, and for that it needs to return cts:query.. but in my custom constraint I want to do sparql.. how do I do this.. eg:
sem:sparql("select DISTINCT ?subject
from
<http://rdf.abbvienet.com/entity/abbvie/biologic>
where {?subject <http://schemas.abbvienet.com/entity/target> <http://rdf.abbvienet.com/entity/ncbi/target/695>} ")
I think I figured out .. need to use cts:triple-range-query
If anyone is interested.. following is what I did for my eg sparq above..
cts:and-query((cts:triple-range-query((), sem:iri('http://schemas.abbvienet.com/entity/target'),
sem:iri('http://rdf.abbvienet.com/entity/ncbi/target/695')),
cts:collection-query('http://rdf.abbvienet.com/entity/abbvie/biologic'))))
Please let me know if there is nicer way to do this :) ?