Wimmics/corese

The presence of owl:imports in a document creates new graphs with data imported from unknown third parties

MaillPierre opened this issue · 8 comments

Expected Behavior

Loading a file using the LOAD query only adds the data of the file to the server

Actual Behavior

Loading a file containing an ontology using the owl:imports property also loads the RDF files that can be dereferenced at the URIs object of the property.

Steps to Reproduce the Problem

  1. Launch a fresh instance of corese server with java -jar corese-server-4.4.0.jar -su
  2. Executing SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } } returns no graph. Executing SELECT (count(*) AS ?count) { ?s ?p ?o } returns 0.
  3. Execute the SPARQL query LOAD <https://raw.githubusercontent.com/Wimmics/IndeGx/coreseDebug/rules/indegx_vocabulary.ttl> to load a file into the default graph
  4. Executing SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } } returns the following list of graphs:
<http://www.w3.org/2000/01/rdf-schema#>
<http://www.w3.org/ns/dcat#>
<http://www.w3.org/ns/earl#>
<http://www.w3.org/ns/prov-dictionary#>
kg:default
<http://www.w3.org/ns/prov-links#>
<http://www.w3.org/ns/sparql-service-description#>
<http://www.w3.org/ns/prov#>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
<https://raw.githubusercontent.com/Wimmics/IndeGx/coreseDebug/rules/indegx_vocabulary.ttl>
<http://www.w3.org/ns/prov-dc#>
<http://www.w3.org/2002/07/owl#>
<http://www.w3.org/ns/prov-aq#>
<http://www.w3.org/ns/prov-o#>
<http://dataid.dbpedia.org/ns/core#>
<http://www.w3.org/ns/prov-o-inverses#>
<http://www.w3.org/2000/01/rdf-schema>
<http://www.w3.org/ns/dqv#>
<http://www.w3.org/2004/02/skos/core>

Each graph contains the content of its corresponding ontology.
Executing SELECT (count(*) AS ?count) { GRAPH kg:default{ ?s ?p ?o } } shows that some content is added to the default graph.
The original file contains 252 lines but executing SELECT (count(*) AS ?count) { ?s ?p ?o } returns 5938 triples.

Suggested solutions

  • Adding a setting to control this behavior.
  • Disabling this behavior by default.

Specifications

  • Version: 4.4.0, downloaded the 11/05/2023
  • Platform: Fedora

Hello Pierre,

Thank you for reporting this issue and providing detailed information. We have considered your suggestion and worked on a resolution.

The problem has been addressed by introducing a new property: DISABLE_OWL_AUTO_IMPORT. To utilize this feature, please create a corese.properties file and add the following line: DISABLE_OWL_AUTO_IMPORT = true. Then, start the Corese-Server or Corese-GUI with the -init corese.properties option.

This feature will be included in the next release of Corese. In the meantime, if you need it, I provide you a jar file that contains this functionality (Corese-Server, Corese-Gui).

I will not close this ticket immediately. Could you please confirm if this resolves your issue and works as expected?

This solves the issue, thank you.

Hello Pierre,

In the upcoming release of Corese (>= 4.4.2), the import of owl:imports will be disabled by default.

If you wish to enable it, you will need to use a property file. Here's an example of a configuration file that enables the import of owl:imports (>= 4.4.2):

# Enenable the import of owl:imports
ENABLE_OWL_AUTO_IMPORT = true

I hope this will be helpful for you.

ocorby commented

Okay, I restored the old default behavior.

Est-ce qu'il serait pertinent de le désactiver par défaut dans le cadre de la commande "convert" de Corese-Command ?

Voir : #134

ocorby commented