SWRL rule for owl 2 TypeError: Property() takes no arguments

42 views Asked by At
<owl:DatatypeProperty rdf:about="http://example.org/hasDistance">
    <rdfs:domain rdf:resource="http://example.org/Chair"/>
    <rdfs:domain rdf:resource="http://example.org/Suitcase"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
  </owl:DatatypeProperty>   

I have the following data property hasDistance

<ex:Chair rdf:about="http://example.org/myChair_6969">
    <ex:hasDistance rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">5</ex:hasDistance>
    <ex:hasIdentifier>chair1</ex:hasIdentifier>
    <ex:hasPoint>
      <ex:Point rdf:about="http://example.org/myPoint_6969">
        <ex:x rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">10.255</ex:x>
        <ex:y rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">20.2525</ex:y>
      </ex:Point>
    </ex:hasPoint>
  </ex:Chair>

This is how my Class chair is defined

<ex:hasPoint>
      <ex:Point rdf:about="http://example.org/myPoint_6969">
        <ex:x rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">10</ex:x>
        <ex:y rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">20</ex:y>
      </ex:Point>
    </ex:hasPoint>

This is my has point. I am trying to run following rule rule.set_as_rule("Chair(?c) ^ hasPoint(?c, ?p) ^ x(?p, 10) ^ y(?p, 20) -> hasDistance(?c, 5)") But If i run it I get following error

 TypeError: Property() takes no arguments  

Which I am not really sure what it means

0

There are 0 answers