From: Radoslaw O. <ra...@gm...> - 2005-04-14 15:46:16
|
Hi Rudy, notice that all literals in your model are datatyped so you have to = consider it in your queries. In your example, the correct query should be: select ?fullname where(?x, = <person:lastName>,"Rusli"^^<http://www.w3.org/2001/XMLSchema#string>) (?x,<person:name>,?fullname) using owl for <http://www.w3.org/2002/07/owl#> person for <http://ebiquity.umbc.edu/v2.1/ontology/person.owl#> This should work fine. Cheers Radek ----- Original Message -----=20 From: rudy rusli=20 To: rdf...@li...=20 Sent: Thursday, April 14, 2005 3:25 AM Subject: [Rdfapi-php-interest] RDQL Query hi, i am new to RAP API. At the moment, i have developed my OWL model in protege 3.1 beta. and managed to load the model by using RAP. but, when i tried to query to return a student's full name, it always says 'no match'. This is what I wrote for the query : $rdql_query=3D'select ?fullname where(?x, <person:lastName>,"Rusli") (?x,<person:name>,?fullname) using owl for <http://www.w3.org/2002/07/owl#> person for <http://ebiquity.umbc.edu/v2.1/ontology/person.owl#> '; $res=3D$model->rdqlQuery($rdql_query); RdqlEngine::writeQueryResultAsHtmlTable($res); and this is my OWL model: <?xml version=3D"1.0"?> <rdf:RDF = xmlns:assoc=3D"http://ebiquity.umbc.edu/v2.1/ontology/association.owl#" = xmlns:research=3D"http://ebiquity.umbc.edu/v2.1/ontology/research.owl#" xmlns:rdf=3D"http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema#" = xmlns:pub=3D"http://ebiquity.umbc.edu/v2.1/ontology/publication.owl#" xmlns:rdfs=3D"http://www.w3.org/2000/01/rdf-schema#" xmlns:owl=3D"http://www.w3.org/2002/07/owl#" xmlns=3D"http://ebiquity.umbc.edu/v2.1/ontology/project.owl#" = xmlns:contact=3D"http://ebiquity.umbc.edu/v2.1/ontology/contact.owl#" xmlns:cc=3D"http://web.resource.org/cc/#" xmlns:person=3D"http://ebiquity.umbc.edu/v2.1/ontology/person.owl#" xml:base=3D"http://ebiquity.umbc.edu/v2.1/ontology/project.owl" > <rdf:Description rdf:about=3D""> <owl:imports rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/contact.owl#"/> <owl:imports rdf:resource=3D"#"/> <rdf:type rdf:resource=3D"http://www.w3.org/2002/07/owl#Ontology"/> <owl:imports rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/research.owl#"/> <owl:imports rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/person.owl#"/> <owl:imports rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/publication.owl#"/= > <owl:imports rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/association.owl#"/= > </rdf:Description> <rdf:Description rdf:about=3D"#RudyRusli"> <person:name rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Rudy Rusli</person:name> <person:biography rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Rudy Rusli is a master student at Curtin Uni</person:biography> <person:firstName rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Rudy</person:fir= stName> <person:lastName rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Rusli</person:la= stName> <rdf:type = rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/person.owl#MSStude= nt"/> </rdf:Description> <rdf:Description rdf:about=3D"#DedySyamsuar"> <person:lastName rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Syamsuar</person= :lastName> <person:firstName rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Dedy</person:fir= stName> <rdf:type = rdf:resource=3D"http://ebiquity.umbc.edu/v2.1/ontology/person.owl#MSStude= nt"/> <person:name rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Dedy Syamsuar</person:name> <person:biography rdf:datatype=3D"http://www.w3.org/2001/XMLSchema#string">Dedi is a student at curtin uni</person:biography> </rdf:Description> </rdf:RDF> <!-- Created with Protege (with OWL Plugin 2.0 beta, Build 245)=20 http://protege.stanford.edu --> can somebody help me in correcting my query ? thank you rudy rusli ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dick _______________________________________________ Rdfapi-php-interest mailing list Rdf...@li... https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest |