Wimmics / corese

Software platform implementing and extending the standards of the Semantic Web.
https://project.inria.fr/corese/
Other
98 stars 29 forks source link

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

Closed MaillPierre closed 1 year ago

MaillPierre commented 1 year ago

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
    1. 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

Specifications

remiceres commented 1 year ago

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 commented 1 year ago

This solves the issue, thank you.

remiceres commented 1 year ago

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 1 year ago

Attention à la compatibilité ascendante de coreseLes applications qui utilisent owl:import ne marcheront plus, cad les ontologies OWLPar défaut ça devrait charger et si on le demande ça devrait ne pas chargerOlivier  -------- Message d'origine --------De : Rémi Cérès @.> Date : 03/08/2023 15:59 (GMT+01:00) À : Wimmics/corese @.> Cc : Subscribed @.***> Objet : Re: [Wimmics/corese] The presence of owl:imports in a document creates new graphs with data imported from unknown third parties (Issue #126) 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.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

FabienGandon commented 1 year ago

+1 pour que la configuration par défaut soit en compatibilité ascendante Fabien Gandon, http://fabien.info 

remiceres commented 1 year ago

Okay, I restored the old default behavior.

remiceres commented 1 year ago

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

Voir : https://github.com/Wimmics/corese/issues/134

ocorby commented 1 year ago

Il pourrait y avoir une option -noimport -------- Message d'origine --------De : Rémi Cérès @.> Date : 03/08/2023 19:28 (GMT+01:00) À : Wimmics/corese @.> Cc : ocorby @.>, Comment @.> Objet : Re: [Wimmics/corese] The presence of owl:imports in a document creates new graphs with data imported from unknown third parties (Issue #126) 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

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>