W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

construct test, re-revised

From: Kendall Clark <kendall@monkeyfist.com>
Date: Mon, 8 Aug 2005 16:14:12 -0400
To: DAWG Mailing List <public-rdf-dawg@w3.org>
Message-ID: <20050808201412.GI18555@monkeyfist.com>

Okay, this is the test I'd like to see in the test suite. FWIW, I'm using
it in the protocol doc for one of the CONSTRUCT protocol examples (it also
illustrates con-neg).

It's also a nice test for non-simple FILTERs.

--Data--
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix myfoaf: <http://clark.dallas.tx.us/kendall/foaf.rdf#>.

myfoaf:kendall foaf:name "Kendall Grant Clark";
               foaf:workplaceHomepage <http://www.mindswap.org/>;
               foaf:homepage <http://clark.dallas.tx.us/kendall/>;
               foaf:knows myfoaf:edd;
               foaf:knows myfoaf:niel;
	       rdf:type foaf:Person.

myfoaf:edd foaf:mbox <mailto:edd@usefulinc.com>;
	   rdf:type foaf:Person.

myfoaf:niel rdf:type foaf:Person;
	    foaf:mbox <mailto:niel@bornstein.atlanta.ga.us>.
----

--Query--
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX myfoaf: <http://clark.dallas.tx.us/kendall/foaf.rdf#>

CONSTRUCT { myfoaf:kendall foaf:depiction <http://clark.dallas.tx.us/kendall/kendall.jpg>.
            myfoaf:kendall foaf:schoolHomepage <http://www.smu.edu/>.
            ?s ?p ?o.}
WHERE {?s ?p ?o
      FILTER ( ! (?s = myfoaf:kendall && ?p = foaf:knows && ?o = myfoaf:edd ) 
                 && ! ( ?s = myfoaf:edd && ?p = foaf:mbox && ?o = <mailto:edd@usefulinc.com> )
		 && ! ( ?s = myfoaf:edd && ?p = rdf:type && ?o = foaf:Person))}
----

--Results--
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix myfoaf: <http://clark.dallas.tx.us/kendall/foaf.rdf#>.

myfoaf:kendall foaf:name "Kendall Grant Clark";
	       foaf:depiction <http://clark.dallas.tx.us/kendall/kendall.jpg>.
	       foaf:schoolHomepage <http://www.smu.edu/>.
               foaf:workplaceHomepage <http://www.mindswap.org/>;
               foaf:homepage <http://clark.dallas.tx.us/kendall/>;
               foaf:knows myfoaf:niel;
	       rdf:type foaf:Person.

myfoaf:niel rdf:type foaf:Person;
	    foaf:mbox <mailto:niel@bornstein.atlanta.ga.us>.
----


Cheers, 
Kendall
Received on Monday, 8 August 2005 20:16:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT