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

Workaround to OWLAPI bug #48

Merged
merged 2 commits into from
Jul 21, 2021
Merged

Workaround to OWLAPI bug #48

merged 2 commits into from
Jul 21, 2021

Conversation

NicolasRouquette
Copy link
Member

@melaasar
Copy link
Member

in your PR, why you overrode the storer for rdf extension, but not xml and owl extensions, if they use the same format which is RDF/XML?

			extensions.put("owl", new RDFXMLDocumentFormat());
			extensions.put("rdf", new RioRDFXMLDocumentFormat());
			extensions.put("xml", new RDFXMLDocumentFormat());

@melaasar
Copy link
Member

When I test OwlLoad with the resulting trig files, I get the following exception:

        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.util.concurrent.ExecutionException: org.apache.jena.sparql.ARQException: Can't load quads into a graph
        at io.opencaesar.owl.load.OwlLoadApp.run(OwlLoadApp.java:178)
        at io.opencaesar.owl.load.OwlLoadApp.main(OwlLoadApp.java:121)
        at io.opencaesar.owl.load.OwlLoadTask.run(OwlLoadTask.java:49)
        ... 95 more
Caused by: org.apache.jena.sparql.ARQException: Can't load quads into a graph
        at org.apache.jena.rdfconnection.RDFConnectionRemote.upload(RDFConnectionRemote.java:403)
        at org.apache.jena.rdfconnection.RDFConnectionRemote.load(RDFConnectionRemote.java:350)
        at io.opencaesar.owl.load.OwlLoadApp.lambda$loadOntology$3(OwlLoadApp.java:224)

@NicolasRouquette
Copy link
Member Author

I noticed this behavior as well.

Basically, with Apache Jena, we can load serializations that do not have a named graph.
This seems to be a subtle conflict due to the Jena API we use to load the file where the name graph is already specified; see: https://github.com/opencaesar/owl-tools/blob/master/owl-load/src/main/java/io/opencaesar/owl/load/OwlLoadApp.java#L224

With GraphDB (see https://graphdb.ontotext.com/documentation/9.6/enterprise/devhub/workbench-rest-api/curl-commands.html#workbench-rest-api-curl-commands-repository-management), we can load Trig files with the named graphs to preserve them in the GraphDB repository.

@melaasar melaasar merged commit 90863ee into master Jul 21, 2021
@melaasar melaasar deleted the workaround branch July 21, 2021 19:39
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 this pull request may close these issues.

2 participants