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

Corese-command: Unwanted download of files during file conversion #134

Closed
MaillPierre opened this issue Jul 26, 2023 · 2 comments
Closed

Comments

@MaillPierre
Copy link
Member

Conversion of a file using corese command tries to download any file object of the owl:imports property

Related to #126 .

Expected Behavior

Should take a given file and output the converted file

Current Behavior

The corese convert command tries to download a file that does not exist and returns errors including the content of web pages. Also, it generates new triples depending on the result of the importation.

Possible Solution

Deactivate importation of owl:imports for corese-command

Steps to Reproduce

  1. create a file "test.nt" with the following content:
# uses owl:imports to import the ontology from the web
<http://te.st> <http://www.w3.org/2002/07/owl#imports> <https://www.google.com/> .
  1. Use corese command with :
corese-command convert -i test.nt -r turtle
  1. The results of my tests is:
[Fatal Error] :1:3: The markup in the document preceding the root element must be well-formed.
15:57:49.133 [main] ERROR fr.inria.corese.core.load.CreateImpl - org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 3; The markup in the document preceding the root element must be well-formed.
@prefix owl: <http://www.w3.org/2002/07/owl#> .

<http://te.st> owl:imports <https://www.google.com/> .

[a <http://www.w3.org/ns/rdfa#Error> ;
  <http://www.w3.org/ns/rdfa#context> "The markup in the document preceding the root element must be well-formed. at 1:3"] .

Context (Environment)

Linux Fedora
Corese command installed by script on the 26/07/2023

@remiceres
Copy link
Collaborator

remiceres commented Aug 3, 2023

Hello Pierre,

Thank you for your report. I have added the configuration file feature to Corese-Command.

If you want to disable the import of owl:imports, you can achieve this by using a new option on the command line: -c, --config or --init (they are all aliases). This option takes a path to a configuration file as an argument.
This file will be a property file, similar to the ones used in other Corese interfaces.

Here's an example of a configuration file that disables the import of owl:imports:

# Disable the import of owl:imports
DISABLE_OWL_AUTO_IMPORT = true

You can use this configuration file with the command line like this:

corese-command convert -i test.nt -r turtle -c config.properties

I hope this explanation is clear and helpful. This feature will be available in the next release of Corese.
Please feel free to close this issue if everything is okay for you.

@remiceres
Copy link
Collaborator

I've added a new option -n or --no-owl-import to all sub-commands of Corese-Command to disable the import of owl:imports. This will be available in the next release of Corese.

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

2 participants