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

robot extract does not export 'properties' on stato.owl #1084

Closed
proccaserra opened this issue Feb 7, 2023 · 3 comments · Fixed by #1087
Closed

robot extract does not export 'properties' on stato.owl #1084

proccaserra opened this issue Feb 7, 2023 · 3 comments · Fixed by #1087

Comments

@proccaserra
Copy link

this works:
java -jar ../../robot-1.9.1-elk-0.5.0.jar export --input stato.owl --header "ID|LABEL|SubProperty Of|Domain|Range|Type|definition|definition source|term editor" --include "properties" --format xlsx --export stato-properties.xlsx

this doesn't:
java -jar ../../robot-1.9.1-elk-0.5.0.jar export --input stato.owl --header "ID|LABEL|SYNONYMS|SubClass Of|Equivalent Class|SubProperty Of|Disjoint With|Domain|Range|Type|definition|definition source|term editor|R command|Python command|example of usage|editor note|has curation status" --include "classes properties" --format xlsx --export stato-all.xlsx

with the following error message:
Missing exception ID: class [uk.ac](http://uk.ac/).manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl cannot be cast to class org.semanticweb.owlapi.model.OWLObjectPropertyExpression ([uk.ac](http://uk.ac/).manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl and org.semanticweb.owlapi.model.OWLObjectPropertyExpression are in unnamed module of loader 'app')

@proccaserra
Copy link
Author

the tail of the stack trace when running the verbose more.

DEBUG Missing exception ID: class uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl cannot be cast to class org.semanticweb.owlapi.model.OWLObjectPropertyExpression (uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl and org.semanticweb.owlapi.model.OWLObjectPropertyExpression are in unnamed module of loader 'app')
class uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl cannot be cast to class org.semanticweb.owlapi.model.OWLObjectPropertyExpression (uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl and org.semanticweb.owlapi.model.OWLObjectPropertyExpression are in unnamed module of loader 'app')
java.lang.ClassCastException: class uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl cannot be cast to class org.semanticweb.owlapi.model.OWLObjectPropertyExpression (uk.ac.manchester.cs.owl.owlapi.OWLAnnotationPropertyImpl and org.semanticweb.owlapi.model.OWLObjectPropertyExpression are in unnamed module of loader 'app')
at org.semanticweb.owlapi.search.EntitySearcher.getDisjointProperties(EntitySearcher.java:1132)
at org.obolibrary.robot.ExportOperation.getRow(ExportOperation.java:1154)
at org.obolibrary.robot.ExportOperation.createExportTable(ExportOperation.java:321)
at org.obolibrary.robot.ExportCommand.execute(ExportCommand.java:165)
at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:61)

@jamesaoverton
Copy link
Member

jamesaoverton commented Feb 7, 2023

The problem occurs here https://github.com/ontodev/robot/blob/master/robot-core/src/main/java/org/obolibrary/robot/ExportOperation.java#L1154 when we ask the OWLAPI EntitySearcher for disjoint properties of an annotation property. The OWLAPI probably considers that nonsense. Removing that block of code fixes the problem for me.

As a workaround for now, I suggest removing "Disjoint With" from the --header -- then it runs properly for me.

@proccaserra
Copy link
Author

the workaround indeed works. Thx @jamesaoverton for the prompt feedback! much appreciated

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

Successfully merging a pull request may close this issue.

2 participants