You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Martynas Jusevičius <ma...@atomgraph.com> on 2023/06/06 09:26:05 UTC

Executing SHACL over Fuseki dataset

Hi,

What is the approach to validating data stored in Fuseki with SHACL?
Without having to retrieve a data dump first.

I have found some generic projects that claim to translate SHACL to SPARQL:
https://github.com/rdfshapes/shacl-sparql
https://github.com/Shape-Fragments/SHACL2SPARQL
Has anyone had any luck with them?

I was wondering if a Jena-based solution would be feasible and what
would it take.


Martynas

Re: Executing SHACL over Fuseki dataset

Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Thanks Øyvind, that looks promising.

On Tue, Jun 6, 2023 at 11:58 AM Øyvind Gjesdal <oy...@gmail.com> wrote:
>
> I haven't tried it, but it looks like it is implemented, and you can
> configure a SHACL service on datasets, in the assembler for Fuseki.
> https://jena.apache.org/documentation/shacl/#integration-with-apache-jena-fuseki
>
>
> You can then use the api and post shapes as files for validating datasets:
>
> The example from the documentation :
>
> curl -XPOST --data-binary @fu-shapes.ttl  \
>      --header 'Content-type: text/turtle' \
>      'http://localhost:3030/ds/shacl?graph=default'
>
> Best regards,
> Øyvind
>
>
> On Tue, Jun 6, 2023 at 11:27 AM Martynas Jusevičius <ma...@atomgraph.com>
> wrote:
>
> > Hi,
> >
> > What is the approach to validating data stored in Fuseki with SHACL?
> > Without having to retrieve a data dump first.
> >
> > I have found some generic projects that claim to translate SHACL to SPARQL:
> > https://github.com/rdfshapes/shacl-sparql
> > https://github.com/Shape-Fragments/SHACL2SPARQL
> > Has anyone had any luck with them?
> >
> > I was wondering if a Jena-based solution would be feasible and what
> > would it take.
> >
> >
> > Martynas
> >

Re: Executing SHACL over Fuseki dataset

Posted by Øyvind Gjesdal <oy...@gmail.com>.
I haven't tried it, but it looks like it is implemented, and you can
configure a SHACL service on datasets, in the assembler for Fuseki.
https://jena.apache.org/documentation/shacl/#integration-with-apache-jena-fuseki


You can then use the api and post shapes as files for validating datasets:

The example from the documentation :

curl -XPOST --data-binary @fu-shapes.ttl  \
     --header 'Content-type: text/turtle' \
     'http://localhost:3030/ds/shacl?graph=default'

Best regards,
Øyvind


On Tue, Jun 6, 2023 at 11:27 AM Martynas Jusevičius <ma...@atomgraph.com>
wrote:

> Hi,
>
> What is the approach to validating data stored in Fuseki with SHACL?
> Without having to retrieve a data dump first.
>
> I have found some generic projects that claim to translate SHACL to SPARQL:
> https://github.com/rdfshapes/shacl-sparql
> https://github.com/Shape-Fragments/SHACL2SPARQL
> Has anyone had any luck with them?
>
> I was wondering if a Jena-based solution would be feasible and what
> would it take.
>
>
> Martynas
>