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

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

Closed
MaillPierre opened this issue May 11, 2023 · 8 comments

Comments

@MaillPierre
Copy link
Member

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
@remiceres
Copy link
Collaborator

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?

@MaillPierre
Copy link
Member Author

This solves the issue, thank you.

@remiceres
Copy link
Collaborator

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
Copy link
Contributor

ocorby commented Aug 3, 2023 via email

@FabienGandon
Copy link
Collaborator

FabienGandon commented Aug 3, 2023 via email

@remiceres
Copy link
Collaborator

Okay, I restored the old default behavior.

@remiceres
Copy link
Collaborator

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
Copy link
Contributor

ocorby commented Aug 3, 2023 via email

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

No branches or pull requests

4 participants