Re: writing a triple filter?

On Fri, Aug 05, 2005 at 10:31:28PM +0100, Seaborne, Andy wrote:

> Exactly how will depend on exactly what you are trying to eliminate but ....
> 
> CONSTRUCT { ?s ?p ?o }
> WHERE { ?s ?p ?o . FILTER ( ?s != <subj> && ?p != <pred> && ?o != "obj" ) }
> 
> does one simple case.

Hmm, so...

CONSTRUCT { <ground triples...> 
	    ?s ?p ?o }
WHERE     { ?s ?p ?o.
	    FILTER( ?s != <myfoaf:kendall> && 
	    	    ?p != <foaf:knows> && 
		    ?o != <myfoaf:edd> ) }

Yes, I believe that gives the results I wanted. I'll modify my CONSTRUCT
test case, and trust that someone who knows how will add it to the suite. Or
something.

Thanks, Andy.

Cheers, 
Kendall

Received on Friday, 5 August 2005 21:45:40 UTC