-
Notifications
You must be signed in to change notification settings - Fork 229
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
Specific value of data property with range xsd:integer in nested class tree raises NumberFormatException #1191
Comments
I believe this is a limitation of the OWL API. It uses |
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 However, in the following example (ReproduceErrorNumberFormatException3.zip), the same number works with the 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? |
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 But a class expression like this 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. |
TL;DR
Open the file
ReproduceErrorNumberFormatException2.ttl
(files are in the attached .zip file).Navigate to 'Entities'->'Classes'.
There are two trees: Navigating down tree
1
tosubclass
an error occurs. Navigating down tree2
it works as expected. Check the error output (also included in attached fileprotege_error_output.txt
).Inspecting the file
ReproduceErrorNumberFormatException2.ttl
in a text editor the only difference is the data property "num value 92740100783". It works for other numbers, e.g. "92".In details
Error info:
I have constructed a program that generates a turtle formatted file that I wish to open and use in protégé.
I have recreated a minimum example (file:
ReproduceErrorNumberFormatException2.ttl
) that mirrors the ontology structure I generate while still contains the error. With risk of a bold guess, it seems like protégé tries to parse the integer '92740100783' as a string, even though the range is set toxsd:integer
. However, changing the number to another number, e.g. to '92', the parser works as expected.Note the naming of the IRI:s where the SubClass contains the same IRI as its superclass followed by the '#' separator for the class name.
Could not find any related issues to NumberFormatException in the issues list.
To reproduce:
Inspect the file
ReproduceErrorNumberFormatException2.ttl
attached in the post. Notice the difference between:<http://www.semanticweb.org/ReproduceError/Testing/SuperClass1#subclass>
and<http://www.semanticweb.org/ReproduceError/Testing/SuperClass2#subclass>
. The only difference between1
and2
is the data property:Ideally start protege from a terminal session.
Open the file
ReproduceErrorNumberFormatException2.ttl
in protege.Navigate to 'Entities'->'Classes'.
Open the class hierarchy in the following order to directly reproduce the error:
owl:Thing
>Head
>Top1
>SuperClass1
>SubClass
This may cause protégé to bug a little, restart in that case and do the following:
Open instead the working hierarchy:
owl:Thing
>Head
>Top2
>SuperClass2
>SubClass
Now, open the file
ReproduceErrorNumberFormatException2.ttl
in a text editor and change '92740100783' to '92' and open the file in protégé again, and follow the steps according to1.
above, and it should work as expected.Error message
See full error message in attached file
protege_error_output.txt
.Version info
Linux: Pop!_OS 22.04 LTS (Ubuntu based)
Protégé: 5.6.1
Files
ReproduceError.zip
The text was updated successfully, but these errors were encountered: