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

shaclinfer.sh hangs when ttl contains some specific owl:imports #53

Closed
vsimko opened this issue Dec 6, 2018 · 1 comment · Fixed by #185
Closed

shaclinfer.sh hangs when ttl contains some specific owl:imports #53

vsimko opened this issue Dec 6, 2018 · 1 comment · Fixed by #185

Comments

@vsimko
Copy link

vsimko commented Dec 6, 2018

In some cases, the shaclinfer.sh (and also shaclvalidate.sh) hangs when the input turtle file contains some specific owl:imports. I think it tries to automatically download and parse the sources referenced by the imports.

Minimal reproducible example:

<http://some/uri> <http://www.w3.org/2002/07/owl#imports> <http://spdx.org/licenses/LGPL-2.0-or-later> .

A dirty workaround that I'm currently using is:

sed 's/owl:imports.*;//g' file.ttl > file-without-imports.ttl
shaclinfer.sh -datafile file-without-imports.ttl

When I do this, I need to declare additional prefixes because my sh:rule would not work.
Here is the list of prefixes that I added:

  sh:declare [
      rdf:type sh:PrefixDeclaration ;
      sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ;
      sh:prefix "rdfs" ;
    ] ;
  sh:declare [
      rdf:type sh:PrefixDeclaration ;
      sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ;
      sh:prefix "xsd" ;
    ] ;
  sh:declare [
      rdf:type sh:PrefixDeclaration ;
      sh:namespace "http://www.w3.org/2002/07/owl#"^^xsd:anyURI ;
      sh:prefix "owl" ;
    ] ;
  sh:declare [
      rdf:type sh:PrefixDeclaration ;
      sh:namespace "http://www.w3.org/ns/shacl#"^^xsd:anyURI ;
      sh:prefix "sh" ;
    ] ;

It would be nice if the scripts could at least provide a flag (e.g. -noimports) to turn off owl:imports.

@HolgerKnublauch
Copy link
Collaborator

(I am on vacation and will not get to this before January).

The work-around should be to add dm.setProcessImports(false); into the constructor of AbstractTool.

ashleycaselli added a commit that referenced this issue Oct 10, 2024
…x-action-3.x

ci(deps): update docker/setup-buildx-action action to v3.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants