Corese-command: Unwanted download of files during file conversion
MaillPierre opened this issue · 2 comments
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
- 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/> .
- Use corese command with :
corese-command convert -i test.nt -r turtle
- 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
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.
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.