From: atat <ast...@ya...> - 2006-11-09 20:51:31
|
Hello,=0AI'm trying to use the Sparql client to connect to a SPARQL service= running on the same machine. Here is the code I used:=0A=0A// Include all = RAP classes =0Adefine("RDFAPI_INCLUDE_DIR", "C:/downloads/Semantic/rdfapi-p= hp/api/");=0Ainclude(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); =0A=0A// Create a = SPARQL client=0A$client =3D ModelFactory::getSparqlClient("http://localhost= :2020/sparql");=0A=0A$querystring =3D '=0APREFIX person: <http://www.owl-on= tologies.com/person.owl#>=0A=0ASELECT ?FirstName ?LastName =0AWHERE { =0A = ?x person:first_name ?FirstName ;=0A person:last_name ?LastName =0A=0A}= =0A';=0A=0A$query =3D new ClientQuery();=0A$query->query($querystring);=0A$= result =3D $client->query($query);=0A=0Aforeach($result as $line) {=0A $= value =3D $line['?FirstName'];=0A if($value !=3D "")=0A echo $value= ->toString()."<br>";=0A else=0A echo "undbound<br>";=0A}=0A=0AThe S= PARQL service is from a Joseki server. I get this message:=0A=0AFatal error= : Class 'SparqlClient' not found in =0AC:\downloads\Semantic\rdfapi-php\api= \model\ModelFactory.php on line =0A272=0A=0AAny ideas how to fix this? Than= x a lot!=0A=0A=0A=0A=0A =0A________________________________________________= ____________________________________=0ADo you Yahoo!?=0AEveryone is raving = about the all-new Yahoo! Mail beta.=0Ahttp://new.mail.yahoo.com |