You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Allan Kamau <al...@gmail.com> on 2019/06/11 09:28:49 UTC

Loading RDF/XML data to Fuseki using curl

I am new to jena-fuseki and I am struggling to load data from several
RDF/XML files to a single graph over http using curl.

Suppose my server is running at "localhost:8080/fuseki" and I have
configured a dataset called "ABC", and I have an RDF/XML file
"/local/data/tmp/ABC/RDFXML/ABC_1.xml", what would be the curl command (and
arguments) to post the above data?

Perhaps also point me to the documentation which features the use of using
REST for loading data.

Regards,

Allan.

Re: Loading RDF/XML data to Fuseki using curl

Posted by Allan Kamau <al...@gmail.com>.
On Tue, Jun 11, 2019 at 1:56 PM Andy Seaborne <an...@apache.org> wrote:

>
>
> On 11/06/2019 10:28, Allan Kamau wrote:
> > I am new to jena-fuseki and I am struggling to load data from several
> > RDF/XML files to a single graph over http using curl.
> >
> > Suppose my server is running at "localhost:8080/fuseki" and I have
> > configured a dataset called "ABC", and I have an RDF/XML file
> > "/local/data/tmp/ABC/RDFXML/ABC_1.xml", what would be the curl command
> (and
> > arguments) to post the above data?
>
> curl -XPOST --header 'Content-type: application/rdf+xml' \
>     --data-binary @/local/data/tmp/ABC/RDFXML/ABC_1.xml \
>     http://localhost:8080/fuseki/ABC
>
> Goes to the default graph of the dataset.
>
> http://localhost:8080/fuseki/ABC?default
>
> Uss ?graph= for a named graph.
>
> > Perhaps also point me to the documentation which features the use of
> using
> > REST for loading data.
>
> The java class RDFConnection
>
> and the scripts like s-post which are graph centric:
> https://www.w3.org/TR/sparql11-http-rdf-update/
>
> https://jena.apache.org/documentation/fuseki2/soh.html
>
> in the bin/ directory. They use the file extension to determine the
> syntax so *.rdf is better.
>
>      Andy
>
> >
> > Regards,
> >
> > Allan.
> >
>

Thank you Andy.

Allan.

Re: Loading RDF/XML data to Fuseki using curl

Posted by Andy Seaborne <an...@apache.org>.

On 11/06/2019 10:28, Allan Kamau wrote:
> I am new to jena-fuseki and I am struggling to load data from several
> RDF/XML files to a single graph over http using curl.
> 
> Suppose my server is running at "localhost:8080/fuseki" and I have
> configured a dataset called "ABC", and I have an RDF/XML file
> "/local/data/tmp/ABC/RDFXML/ABC_1.xml", what would be the curl command (and
> arguments) to post the above data?

curl -XPOST --header 'Content-type: application/rdf+xml' \
    --data-binary @/local/data/tmp/ABC/RDFXML/ABC_1.xml \
    http://localhost:8080/fuseki/ABC

Goes to the default graph of the dataset.

http://localhost:8080/fuseki/ABC?default

Uss ?graph= for a named graph.

> Perhaps also point me to the documentation which features the use of using
> REST for loading data.

The java class RDFConnection

and the scripts like s-post which are graph centric:
https://www.w3.org/TR/sparql11-http-rdf-update/

https://jena.apache.org/documentation/fuseki2/soh.html

in the bin/ directory. They use the file extension to determine the 
syntax so *.rdf is better.

     Andy

> 
> Regards,
> 
> Allan.
>