-- 作者:ybziwen
-- 发布时间:10/25/2008 10:15:00 PM
-- swrl的问题
本体: <?xml version="1.0"?> <rdf:RDF xmlns:temporal="http://swrl.stanford.edu/ontologies/built-ins/3.3/temporal.owl#" xmlns:swrla="http://swrl.stanford.edu/ontologies/3.3/swrla.owl#" xmlns:query="http://swrl.stanford.edu/ontologies/built-ins/3.3/query.owl#" xmlns:swrl="http://www.w3.org/2003/11/swrl#" xmlns:swrlx="http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns="http://www.owl-ontologies.com/Ontology1224926049.owl#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:abox="http://swrl.stanford.edu/ontologies/built-ins/3.3/abox.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:tbox="http://swrl.stanford.edu/ontologies/built-ins/3.3/tbox.owl#" xml:base="http://www.owl-ontologies.com/Ontology1224926049.owl"> <owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://www.w3.org/2003/11/swrl"/> <owl:imports rdf:resource="http://www.w3.org/2003/11/swrlb"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/3.3/swrla.owl"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/built-ins/3.3/tbox.owl"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/built-ins/3.3/abox.owl"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/built-ins/3.3/query.owl"/> <owl:imports rdf:resource="http://swrl.stanford.edu/ontologies/built-ins/3.3/temporal.owl"/> </owl:Ontology> <owl:Class rdf:ID="person"/> <owl:Class rdf:ID="man"> <rdfs:subClassOf rdf:resource="#person"/> </owl:Class> <owl:ObjectProperty rdf:ID="hassibling"> <rdfs:range rdf:resource="#person"/> <rdfs:domain rdf:resource="#person"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="hasbrother"> <rdfs:range rdf:resource="#person"/> <rdfs:domain rdf:resource="#person"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="http://www.w3.org/2003/11/swrl#argument2"/> <person rdf:ID="aa"> <hassibling> <man rdf:ID="bb"/> </hassibling> </person> <swrl:Variable rdf:ID="y"/> <swrl:Imp rdf:ID="Rule-1"> <swrl:body> <swrl:AtomList> <rdf:rest> <swrl:AtomList> <rdf:first> <swrl:ClassAtom> <swrl:classPredicate rdf:resource="#man"/> <swrl:argument1 rdf:resource="#y"/> </swrl:ClassAtom> </rdf:first> <rdf:rest> <swrl:AtomList> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:argument2 rdf:resource="#y"/> <swrl:argument1> <swrl:Variable rdf:ID="x"/> </swrl:argument1> <swrl:propertyPredicate rdf:resource="#hassibling"/> </swrl:IndividualPropertyAtom> </rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> </swrl:AtomList> </rdf:rest> </swrl:AtomList> </rdf:rest> <rdf:first> <swrl:ClassAtom> <swrl:argument1 rdf:resource="#x"/> <swrl:classPredicate rdf:resource="#person"/> </swrl:ClassAtom> </rdf:first> </swrl:AtomList> </swrl:body> <swrl:head> <swrl:AtomList> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> <rdf:first> <swrl:IndividualPropertyAtom> <swrl:argument1 rdf:resource="#x"/> <swrl:argument2 rdf:resource="#y"/> <swrl:propertyPredicate rdf:resource="#hasbrother"/> </swrl:IndividualPropertyAtom> </rdf:first> </swrl:AtomList> </swrl:head> </swrl:Imp> <owl:DataRange> <owl:oneOf rdf:parseType="Resource"> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" >true</rdf:first> </owl:oneOf> </owl:DataRange> <owl:DataRange> <owl:oneOf rdf:parseType="Resource"> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" >true</rdf:first> <rdf:rest rdf:parseType="Resource"> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" >false</rdf:first> </rdf:rest> </owl:oneOf> </owl:DataRange> </rdf:RDF> <!-- Created with Protege (with OWL Plugin 3.3.1, Build 430) http://protege.stanford.edu --> 我的规则:person(?x) ∧man(?y) ∧hassibling(?x, ?y) → hasbrother(?x, ?y) 为什么得不到结果hasbrother(aa,bb)?
|