Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got decimal type for integer value inferred via hasValue restriction #38

Open
patrickwestphal opened this issue Jan 17, 2017 · 0 comments

Comments

@patrickwestphal
Copy link

When working with an ontology having an owl:hasValue restriction, the inferred type of an xsd:integer value will be xsd:decimal. Given, for example, these two axioms

<owl:Class rdf:about="http://example.com/Bat">
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="http://example.com/hasLegs"/>
      <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2</owl:hasValue>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>
<owl:NamedIndividual rdf:about="http://example.com/bat01">
  <rdf:type rdf:resource="http://example.com/Bat"/>
</owl:NamedIndividual>

Pellet will infer

<rdf:Description rdf:about="http://example.com/bat01">
  <j.0:hasLegs rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">2</j.0:hasLegs>
  <rdf:type rdf:resource="http://example.com/Bat"/>
</rdf:Description>

which is unexpected to me and differs from the behavior when having the number of legs defined in the ABox, i.e.

<owl:NamedIndividual rdf:about="http://example.com/bat01">
  <rdf:type rdf:resource="http://example.com/Bat"/>
  <ex:hasLegs rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2</ex:hasLegs>
</owl:NamedIndividual>

My question now is if there is a good reason to get an xsd:decimal or whether this is a bug. I attached a minimal ontology for the owl:hasValue and one for the assertion case.

minimal_examples.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant