GithubHelp home page GithubHelp logo

Comments (3)

gouttegd avatar gouttegd commented on July 22, 2024

I believe this is a limitation of the OWL API. It uses java.lang.Integer to represent integer values, so the biggest integer it can accept is 2 147 483 647 (2³¹ − 1) – any bigger value would trigger the bug.

from protege.

oke464 avatar oke464 commented on July 22, 2024

I believe this is a limitation of the OWL API. It uses java.lang.Integer to represent integer values, so the biggest integer it can accept is 2 147 483 647 (2³¹ − 1) – any bigger value would trigger the bug.

Thank you for quick response! Ah, yes this is a good point. I do not know how OWL API handles this in the background, but I have also tried with the xsd:long type, but that did not help.

However, in the following example (ReproduceErrorNumberFormatException3.zip), the same number works with the xsd:integer type. The difference between the examples ReproduceErrorNumberFormatException2.zip and ReproduceErrorNumberFormatException3.zip are the nested classes.

Also, there is another case in our ontology where a larger number, 149597870700, is used; this works in the nested classes when the other data properties are removed. See example ReproduceErrorNumberFormatException4.zip.

In the case that the OWL API integer fix does not work, maybe these examples can give more clues?

from protege.

gouttegd avatar gouttegd commented on July 22, 2024

Very interesting. It seems the issue is more subtle than I thought.

Contrary to what I thought, the OWL API is in fact capable of dealing with arbitrary large integer values. When an integer value is too large to fit into a 32-bit integer, the OWL API stores it as a plain string, which can be as large as needed.

As long as that value is not compared to any other integer value, it all works fine. So a class expression like this num value 92740100783 (as in your example 3), on its own, causes no problem.

But a class expression like this SuperClass1 and (exp value -34) and (num value 149597870700) (as in your example 4) does cause an issue, because at some point the different operands of the intersection need to be compared between each other. And it seems the code in the OWL API that performs that comparison cannot handle properly the case when one of the integer it has to compare is a large integer stored as a string (it just tries to parse the string into an integer, resulting in a NumberFormatException because the value is too large).

I’m afraid there’s nothing that can be done in Protégé – it’s purely an OWL API issue. I’ll open a ticket there.

from protege.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.