You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2020/11/09 11:42:35 UTC

Re: Copy triples in named graphs

Hi,

this command returns triplets although content-type is set as requested:

curl -H "Accept: application/n-quads"  http://localhost:3030/ds

Wondering what I'm doing wrong here?

-Mikael


On 15/10/2020 18.36, Andy Seaborne wrote:
>
>
> On 15/10/2020 13:45, Mikael Pesonen wrote:
>> Hi,
>>
>> is it possible to copy all data from one Jena instance to other which 
>> is running and containing data already?
>
> Yes - pull the data out of one store (GET) and push it into another POST.
>
> See the thread "Streaming data to Fuseki"
>
>> So I want to dump all NQuads (triples in named graphs) in one db and 
>> insert them into other running db without affecting existing data.
>
> POST = "add into"
>
>
> N-Quads will miss prefixes, if that matters.
>
>>
>> All I know is sparql construct which doesn't work here I think.
>>
>> Br,
>> Mikael
>>
>>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Sorry disconnect, not timeout.

On 09/11/2020 17.05, Mikael Pesonen wrote:
>
> Okay, weird... I'm making the curl call on same server, what could 
> cause the timeout then?
>
>
> On 09/11/2020 16.18, Andy Seaborne wrote:
>>
>>
>> On 09/11/2020 14:16, Mikael Pesonen wrote:
>>>
>>> We are also using 3.16.0
>>>
>>> Just noticed with GET there is this warning, if it's related
>>
>> Well, you aren't going to get an results!
>>
>> The connection was closed early.  Client issue.
>>
>>>
>>> 16:10:35 INFO  Fuseki          :: [125415] GET http://localhost:3030/ds
>>> 16:10:35 WARN  Fuseki          :: [125415] Runtime IO Exception 
>>> (client left?) RC = 500 : org.eclipse.jetty.io.EofException
>>> 16:10:35 INFO  Fuseki          :: [125415] 500 
>>> org.eclipse.jetty.io.EofException (204 ms)
>>
>>     Andy
>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Okay, weird... I'm making the curl call on same server, what could cause 
the timeout then?


On 09/11/2020 16.18, Andy Seaborne wrote:
>
>
> On 09/11/2020 14:16, Mikael Pesonen wrote:
>>
>> We are also using 3.16.0
>>
>> Just noticed with GET there is this warning, if it's related
>
> Well, you aren't going to get an results!
>
> The connection was closed early.  Client issue.
>
>>
>> 16:10:35 INFO  Fuseki          :: [125415] GET http://localhost:3030/ds
>> 16:10:35 WARN  Fuseki          :: [125415] Runtime IO Exception 
>> (client left?) RC = 500 : org.eclipse.jetty.io.EofException
>> 16:10:35 INFO  Fuseki          :: [125415] 500 
>> org.eclipse.jetty.io.EofException (204 ms)
>
>     Andy

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

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

On 09/11/2020 14:16, Mikael Pesonen wrote:
> 
> We are also using 3.16.0
> 
> Just noticed with GET there is this warning, if it's related

Well, you aren't going to get an results!

The connection was closed early.  Client issue.

> 
> 16:10:35 INFO  Fuseki          :: [125415] GET http://localhost:3030/ds
> 16:10:35 WARN  Fuseki          :: [125415] Runtime IO Exception (client 
> left?) RC = 500 : org.eclipse.jetty.io.EofException
> 16:10:35 INFO  Fuseki          :: [125415] 500 
> org.eclipse.jetty.io.EofException (204 ms)

     Andy

Re: Copy triples in named graphs

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
We are also using 3.16.0

Just noticed with GET there is this warning, if it's related

16:10:35 INFO  Fuseki          :: [125415] GET http://localhost:3030/ds
16:10:35 WARN  Fuseki          :: [125415] Runtime IO Exception (client 
left?) RC = 500 : org.eclipse.jetty.io.EofException
16:10:35 INFO  Fuseki          :: [125415] 500 
org.eclipse.jetty.io.EofException (204 ms)



On 09/11/2020 16.04, Andy Seaborne wrote:
> Fuseki does quads (whether you call that extended GSP or just the 
> plain HTTP thing is semantics).
>
> Depending on version, it's on the /dataset and either needs 
> configuring (old) or it happens when GSP is available (current).
>
> With 3.16.0 and current development:
>
> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
>
> works for me as does application/trig or text/trig.
>
>     Andy
>
> On 09/11/2020 12:38, Mikael Pesonen wrote:
>>
>> Right, so construct where (short form) also returns empty set:
>>
>> curl -X POST --data-binary "CONSTRUCT WHERE {GRAPH ?g {?s ?p ?o}} 
>> limit 5" -H 'Content-Type: application/sparql-query' 
>> http://localhost:3030/ds
>>
>>
>> On 09/11/2020 14.32, Martynas Jusevičius wrote:
>>> Your query is a SELECT so it will return a result set, not a graph
>>> (triples or quads).
>>>
>>> I don't think there is a standard way to retrieve quads with SPARQL
>>> 1.1 query, but Jena supports an extended CONSTRUCT:
>>> https://jena.apache.org/documentation/query/construct-quad.html
>>>
>>> The quad store should work though, as you have shown: curl -H "Accept:
>>> application/n-quads"  http://localhost:3030/ds
>>> Not sure why it doesn't for you.
>>>
>>> On Mon, Nov 9, 2020 at 1:24 PM Mikael Pesonen
>>> <mi...@lingsoft.fi> wrote:
>>>>
>>>> Yes, selecting data returns JSON from a graph:
>>>>
>>>> curl -X POST --data-binary "select * WHERE{GRAPH ?g {?s ?p ?o}} 
>>>> limit 5"
>>>> -H 'Content-Type: application/sparql-query' http://localhost:3030/ds
>>>>
>>>>
>>>> Asking for n-quads returns application/sparql-results+xml
>>>>
>>>> curl -H "Accept: application/n-quads" -X POST --data-binary "select *
>>>> WHERE{GRAPH ?g {?s ?p ?o}} limit 5" -H 'Content-Type:
>>>> application/sparql-query' http://localhost:3030/ds
>>>>
>>>> BR,
>>>> Mikael
>>>>
>>>> On 09/11/2020 13.50, Martynas Jusevičius wrote:
>>>>> Are you sure you have named graphs in that dataset?
>>>>>
>>>>> On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
>>>>> <mi...@lingsoft.fi> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> this command returns triplets although content-type is set as 
>>>>>> requested:
>>>>>>
>>>>>> curl -H "Accept: application/n-quads" http://localhost:3030/ds
>>>>>>
>>>>>> Wondering what I'm doing wrong here?
>>>>>>
>>>>>> -Mikael
>>>>>>
>>>>>>
>>>>>> On 15/10/2020 18.36, Andy Seaborne wrote:
>>>>>>> On 15/10/2020 13:45, Mikael Pesonen wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> is it possible to copy all data from one Jena instance to other 
>>>>>>>> which
>>>>>>>> is running and containing data already?
>>>>>>> Yes - pull the data out of one store (GET) and push it into 
>>>>>>> another POST.
>>>>>>>
>>>>>>> See the thread "Streaming data to Fuseki"
>>>>>>>
>>>>>>>> So I want to dump all NQuads (triples in named graphs) in one 
>>>>>>>> db and
>>>>>>>> insert them into other running db without affecting existing data.
>>>>>>> POST = "add into"
>>>>>>>
>>>>>>>
>>>>>>> N-Quads will miss prefixes, if that matters.
>>>>>>>
>>>>>>>> All I know is sparql construct which doesn't work here I think.
>>>>>>>>
>>>>>>>> Br,
>>>>>>>> Mikael
>>>>>>>>
>>>>>>>>
>>>>>> -- 
>>>>>> Lingsoft - 30 years of Leading Language Management
>>>>>>
>>>>>> www.lingsoft.fi
>>>>>>
>>>>>> Speech Applications - Language Management - Translation - 
>>>>>> Reader's and Writer's Tools - Text Tools - E-books and M-books
>>>>>>
>>>>>> Mikael Pesonen
>>>>>> System Engineer
>>>>>>
>>>>>> e-mail: mikael.pesonen@lingsoft.fi
>>>>>> Tel. +358 2 279 3300
>>>>>>
>>>>>> Time zone: GMT+2
>>>>>>
>>>>>> Helsinki Office
>>>>>> Eteläranta 10
>>>>>> FI-00130 Helsinki
>>>>>> FINLAND
>>>>>>
>>>>>> Turku Office
>>>>>> Kauppiaskatu 5 A
>>>>>> FI-20100 Turku
>>>>>> FINLAND
>>>>>>
>>>> -- 
>>>> Lingsoft - 30 years of Leading Language Management
>>>>
>>>> www.lingsoft.fi
>>>>
>>>> Speech Applications - Language Management - Translation - Reader's 
>>>> and Writer's Tools - Text Tools - E-books and M-books
>>>>
>>>> Mikael Pesonen
>>>> System Engineer
>>>>
>>>> e-mail: mikael.pesonen@lingsoft.fi
>>>> Tel. +358 2 279 3300
>>>>
>>>> Time zone: GMT+2
>>>>
>>>> Helsinki Office
>>>> Eteläranta 10
>>>> FI-00130 Helsinki
>>>> FINLAND
>>>>
>>>> Turku Office
>>>> Kauppiaskatu 5 A
>>>> FI-20100 Turku
>>>> FINLAND
>>>>
>>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

Posted by Andy Seaborne <an...@apache.org>.
Fuseki does quads (whether you call that extended GSP or just the plain 
HTTP thing is semantics).

Depending on version, it's on the /dataset and either needs configuring 
(old) or it happens when GSP is available (current).

With 3.16.0 and current development:

curl -H "Accept: application/n-quads"  http://localhost:3030/ds

works for me as does application/trig or text/trig.

     Andy

On 09/11/2020 12:38, Mikael Pesonen wrote:
> 
> Right, so construct where (short form) also returns empty set:
> 
> curl -X POST --data-binary "CONSTRUCT WHERE {GRAPH ?g {?s ?p ?o}} limit 
> 5" -H 'Content-Type: application/sparql-query' http://localhost:3030/ds
> 
> 
> On 09/11/2020 14.32, Martynas Jusevičius wrote:
>> Your query is a SELECT so it will return a result set, not a graph
>> (triples or quads).
>>
>> I don't think there is a standard way to retrieve quads with SPARQL
>> 1.1 query, but Jena supports an extended CONSTRUCT:
>> https://jena.apache.org/documentation/query/construct-quad.html
>>
>> The quad store should work though, as you have shown: curl -H "Accept:
>> application/n-quads"  http://localhost:3030/ds
>> Not sure why it doesn't for you.
>>
>> On Mon, Nov 9, 2020 at 1:24 PM Mikael Pesonen
>> <mi...@lingsoft.fi> wrote:
>>>
>>> Yes, selecting data returns JSON from a graph:
>>>
>>> curl -X POST --data-binary "select * WHERE{GRAPH ?g {?s ?p ?o}} limit 5"
>>> -H 'Content-Type: application/sparql-query' http://localhost:3030/ds
>>>
>>>
>>> Asking for n-quads returns application/sparql-results+xml
>>>
>>> curl -H "Accept: application/n-quads" -X POST --data-binary "select *
>>> WHERE{GRAPH ?g {?s ?p ?o}} limit 5" -H 'Content-Type:
>>> application/sparql-query' http://localhost:3030/ds
>>>
>>> BR,
>>> Mikael
>>>
>>> On 09/11/2020 13.50, Martynas Jusevičius wrote:
>>>> Are you sure you have named graphs in that dataset?
>>>>
>>>> On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
>>>> <mi...@lingsoft.fi> wrote:
>>>>> Hi,
>>>>>
>>>>> this command returns triplets although content-type is set as 
>>>>> requested:
>>>>>
>>>>> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
>>>>>
>>>>> Wondering what I'm doing wrong here?
>>>>>
>>>>> -Mikael
>>>>>
>>>>>
>>>>> On 15/10/2020 18.36, Andy Seaborne wrote:
>>>>>> On 15/10/2020 13:45, Mikael Pesonen wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> is it possible to copy all data from one Jena instance to other 
>>>>>>> which
>>>>>>> is running and containing data already?
>>>>>> Yes - pull the data out of one store (GET) and push it into 
>>>>>> another POST.
>>>>>>
>>>>>> See the thread "Streaming data to Fuseki"
>>>>>>
>>>>>>> So I want to dump all NQuads (triples in named graphs) in one db and
>>>>>>> insert them into other running db without affecting existing data.
>>>>>> POST = "add into"
>>>>>>
>>>>>>
>>>>>> N-Quads will miss prefixes, if that matters.
>>>>>>
>>>>>>> All I know is sparql construct which doesn't work here I think.
>>>>>>>
>>>>>>> Br,
>>>>>>> Mikael
>>>>>>>
>>>>>>>
>>>>> -- 
>>>>> Lingsoft - 30 years of Leading Language Management
>>>>>
>>>>> www.lingsoft.fi
>>>>>
>>>>> Speech Applications - Language Management - Translation - Reader's 
>>>>> and Writer's Tools - Text Tools - E-books and M-books
>>>>>
>>>>> Mikael Pesonen
>>>>> System Engineer
>>>>>
>>>>> e-mail: mikael.pesonen@lingsoft.fi
>>>>> Tel. +358 2 279 3300
>>>>>
>>>>> Time zone: GMT+2
>>>>>
>>>>> Helsinki Office
>>>>> Eteläranta 10
>>>>> FI-00130 Helsinki
>>>>> FINLAND
>>>>>
>>>>> Turku Office
>>>>> Kauppiaskatu 5 A
>>>>> FI-20100 Turku
>>>>> FINLAND
>>>>>
>>> -- 
>>> Lingsoft - 30 years of Leading Language Management
>>>
>>> www.lingsoft.fi
>>>
>>> Speech Applications - Language Management - Translation - Reader's 
>>> and Writer's Tools - Text Tools - E-books and M-books
>>>
>>> Mikael Pesonen
>>> System Engineer
>>>
>>> e-mail: mikael.pesonen@lingsoft.fi
>>> Tel. +358 2 279 3300
>>>
>>> Time zone: GMT+2
>>>
>>> Helsinki Office
>>> Eteläranta 10
>>> FI-00130 Helsinki
>>> FINLAND
>>>
>>> Turku Office
>>> Kauppiaskatu 5 A
>>> FI-20100 Turku
>>> FINLAND
>>>
> 

Re: Copy triples in named graphs

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Right, so construct where (short form) also returns empty set:

curl -X POST --data-binary "CONSTRUCT WHERE {GRAPH ?g {?s ?p ?o}} limit 
5" -H 'Content-Type: application/sparql-query' http://localhost:3030/ds


On 09/11/2020 14.32, Martynas Jusevičius wrote:
> Your query is a SELECT so it will return a result set, not a graph
> (triples or quads).
>
> I don't think there is a standard way to retrieve quads with SPARQL
> 1.1 query, but Jena supports an extended CONSTRUCT:
> https://jena.apache.org/documentation/query/construct-quad.html
>
> The quad store should work though, as you have shown: curl -H "Accept:
> application/n-quads"  http://localhost:3030/ds
> Not sure why it doesn't for you.
>
> On Mon, Nov 9, 2020 at 1:24 PM Mikael Pesonen
> <mi...@lingsoft.fi> wrote:
>>
>> Yes, selecting data returns JSON from a graph:
>>
>> curl -X POST --data-binary "select * WHERE{GRAPH ?g {?s ?p ?o}} limit 5"
>> -H 'Content-Type: application/sparql-query' http://localhost:3030/ds
>>
>>
>> Asking for n-quads returns application/sparql-results+xml
>>
>> curl -H "Accept: application/n-quads" -X POST --data-binary "select *
>> WHERE{GRAPH ?g {?s ?p ?o}} limit 5" -H 'Content-Type:
>> application/sparql-query' http://localhost:3030/ds
>>
>> BR,
>> Mikael
>>
>> On 09/11/2020 13.50, Martynas Jusevičius wrote:
>>> Are you sure you have named graphs in that dataset?
>>>
>>> On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
>>> <mi...@lingsoft.fi> wrote:
>>>> Hi,
>>>>
>>>> this command returns triplets although content-type is set as requested:
>>>>
>>>> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
>>>>
>>>> Wondering what I'm doing wrong here?
>>>>
>>>> -Mikael
>>>>
>>>>
>>>> On 15/10/2020 18.36, Andy Seaborne wrote:
>>>>> On 15/10/2020 13:45, Mikael Pesonen wrote:
>>>>>> Hi,
>>>>>>
>>>>>> is it possible to copy all data from one Jena instance to other which
>>>>>> is running and containing data already?
>>>>> Yes - pull the data out of one store (GET) and push it into another POST.
>>>>>
>>>>> See the thread "Streaming data to Fuseki"
>>>>>
>>>>>> So I want to dump all NQuads (triples in named graphs) in one db and
>>>>>> insert them into other running db without affecting existing data.
>>>>> POST = "add into"
>>>>>
>>>>>
>>>>> N-Quads will miss prefixes, if that matters.
>>>>>
>>>>>> All I know is sparql construct which doesn't work here I think.
>>>>>>
>>>>>> Br,
>>>>>> Mikael
>>>>>>
>>>>>>
>>>> --
>>>> Lingsoft - 30 years of Leading Language Management
>>>>
>>>> www.lingsoft.fi
>>>>
>>>> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
>>>>
>>>> Mikael Pesonen
>>>> System Engineer
>>>>
>>>> e-mail: mikael.pesonen@lingsoft.fi
>>>> Tel. +358 2 279 3300
>>>>
>>>> Time zone: GMT+2
>>>>
>>>> Helsinki Office
>>>> Eteläranta 10
>>>> FI-00130 Helsinki
>>>> FINLAND
>>>>
>>>> Turku Office
>>>> Kauppiaskatu 5 A
>>>> FI-20100 Turku
>>>> FINLAND
>>>>
>> --
>> Lingsoft - 30 years of Leading Language Management
>>
>> www.lingsoft.fi
>>
>> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
>>
>> Mikael Pesonen
>> System Engineer
>>
>> e-mail: mikael.pesonen@lingsoft.fi
>> Tel. +358 2 279 3300
>>
>> Time zone: GMT+2
>>
>> Helsinki Office
>> Eteläranta 10
>> FI-00130 Helsinki
>> FINLAND
>>
>> Turku Office
>> Kauppiaskatu 5 A
>> FI-20100 Turku
>> FINLAND
>>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Your query is a SELECT so it will return a result set, not a graph
(triples or quads).

I don't think there is a standard way to retrieve quads with SPARQL
1.1 query, but Jena supports an extended CONSTRUCT:
https://jena.apache.org/documentation/query/construct-quad.html

The quad store should work though, as you have shown: curl -H "Accept:
application/n-quads"  http://localhost:3030/ds
Not sure why it doesn't for you.

On Mon, Nov 9, 2020 at 1:24 PM Mikael Pesonen
<mi...@lingsoft.fi> wrote:
>
>
> Yes, selecting data returns JSON from a graph:
>
> curl -X POST --data-binary "select * WHERE{GRAPH ?g {?s ?p ?o}} limit 5"
> -H 'Content-Type: application/sparql-query' http://localhost:3030/ds
>
>
> Asking for n-quads returns application/sparql-results+xml
>
> curl -H "Accept: application/n-quads" -X POST --data-binary "select *
> WHERE{GRAPH ?g {?s ?p ?o}} limit 5" -H 'Content-Type:
> application/sparql-query' http://localhost:3030/ds
>
> BR,
> Mikael
>
> On 09/11/2020 13.50, Martynas Jusevičius wrote:
> > Are you sure you have named graphs in that dataset?
> >
> > On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
> > <mi...@lingsoft.fi> wrote:
> >>
> >> Hi,
> >>
> >> this command returns triplets although content-type is set as requested:
> >>
> >> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
> >>
> >> Wondering what I'm doing wrong here?
> >>
> >> -Mikael
> >>
> >>
> >> On 15/10/2020 18.36, Andy Seaborne wrote:
> >>>
> >>> On 15/10/2020 13:45, Mikael Pesonen wrote:
> >>>> Hi,
> >>>>
> >>>> is it possible to copy all data from one Jena instance to other which
> >>>> is running and containing data already?
> >>> Yes - pull the data out of one store (GET) and push it into another POST.
> >>>
> >>> See the thread "Streaming data to Fuseki"
> >>>
> >>>> So I want to dump all NQuads (triples in named graphs) in one db and
> >>>> insert them into other running db without affecting existing data.
> >>> POST = "add into"
> >>>
> >>>
> >>> N-Quads will miss prefixes, if that matters.
> >>>
> >>>> All I know is sparql construct which doesn't work here I think.
> >>>>
> >>>> Br,
> >>>> Mikael
> >>>>
> >>>>
> >> --
> >> Lingsoft - 30 years of Leading Language Management
> >>
> >> www.lingsoft.fi
> >>
> >> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
> >>
> >> Mikael Pesonen
> >> System Engineer
> >>
> >> e-mail: mikael.pesonen@lingsoft.fi
> >> Tel. +358 2 279 3300
> >>
> >> Time zone: GMT+2
> >>
> >> Helsinki Office
> >> Eteläranta 10
> >> FI-00130 Helsinki
> >> FINLAND
> >>
> >> Turku Office
> >> Kauppiaskatu 5 A
> >> FI-20100 Turku
> >> FINLAND
> >>
>
> --
> Lingsoft - 30 years of Leading Language Management
>
> www.lingsoft.fi
>
> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
>
> Mikael Pesonen
> System Engineer
>
> e-mail: mikael.pesonen@lingsoft.fi
> Tel. +358 2 279 3300
>
> Time zone: GMT+2
>
> Helsinki Office
> Eteläranta 10
> FI-00130 Helsinki
> FINLAND
>
> Turku Office
> Kauppiaskatu 5 A
> FI-20100 Turku
> FINLAND
>

Re: Copy triples in named graphs

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Yes, selecting data returns JSON from a graph:

curl -X POST --data-binary "select * WHERE{GRAPH ?g {?s ?p ?o}} limit 5" 
-H 'Content-Type: application/sparql-query' http://localhost:3030/ds


Asking for n-quads returns application/sparql-results+xml

curl -H "Accept: application/n-quads" -X POST --data-binary "select * 
WHERE{GRAPH ?g {?s ?p ?o}} limit 5" -H 'Content-Type: 
application/sparql-query' http://localhost:3030/ds

BR,
Mikael

On 09/11/2020 13.50, Martynas Jusevičius wrote:
> Are you sure you have named graphs in that dataset?
>
> On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
> <mi...@lingsoft.fi> wrote:
>>
>> Hi,
>>
>> this command returns triplets although content-type is set as requested:
>>
>> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
>>
>> Wondering what I'm doing wrong here?
>>
>> -Mikael
>>
>>
>> On 15/10/2020 18.36, Andy Seaborne wrote:
>>>
>>> On 15/10/2020 13:45, Mikael Pesonen wrote:
>>>> Hi,
>>>>
>>>> is it possible to copy all data from one Jena instance to other which
>>>> is running and containing data already?
>>> Yes - pull the data out of one store (GET) and push it into another POST.
>>>
>>> See the thread "Streaming data to Fuseki"
>>>
>>>> So I want to dump all NQuads (triples in named graphs) in one db and
>>>> insert them into other running db without affecting existing data.
>>> POST = "add into"
>>>
>>>
>>> N-Quads will miss prefixes, if that matters.
>>>
>>>> All I know is sparql construct which doesn't work here I think.
>>>>
>>>> Br,
>>>> Mikael
>>>>
>>>>
>> --
>> Lingsoft - 30 years of Leading Language Management
>>
>> www.lingsoft.fi
>>
>> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
>>
>> Mikael Pesonen
>> System Engineer
>>
>> e-mail: mikael.pesonen@lingsoft.fi
>> Tel. +358 2 279 3300
>>
>> Time zone: GMT+2
>>
>> Helsinki Office
>> Eteläranta 10
>> FI-00130 Helsinki
>> FINLAND
>>
>> Turku Office
>> Kauppiaskatu 5 A
>> FI-20100 Turku
>> FINLAND
>>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Copy triples in named graphs

Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Are you sure you have named graphs in that dataset?

On Mon, Nov 9, 2020 at 12:42 PM Mikael Pesonen
<mi...@lingsoft.fi> wrote:
>
>
> Hi,
>
> this command returns triplets although content-type is set as requested:
>
> curl -H "Accept: application/n-quads"  http://localhost:3030/ds
>
> Wondering what I'm doing wrong here?
>
> -Mikael
>
>
> On 15/10/2020 18.36, Andy Seaborne wrote:
> >
> >
> > On 15/10/2020 13:45, Mikael Pesonen wrote:
> >> Hi,
> >>
> >> is it possible to copy all data from one Jena instance to other which
> >> is running and containing data already?
> >
> > Yes - pull the data out of one store (GET) and push it into another POST.
> >
> > See the thread "Streaming data to Fuseki"
> >
> >> So I want to dump all NQuads (triples in named graphs) in one db and
> >> insert them into other running db without affecting existing data.
> >
> > POST = "add into"
> >
> >
> > N-Quads will miss prefixes, if that matters.
> >
> >>
> >> All I know is sparql construct which doesn't work here I think.
> >>
> >> Br,
> >> Mikael
> >>
> >>
>
> --
> Lingsoft - 30 years of Leading Language Management
>
> www.lingsoft.fi
>
> Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
>
> Mikael Pesonen
> System Engineer
>
> e-mail: mikael.pesonen@lingsoft.fi
> Tel. +358 2 279 3300
>
> Time zone: GMT+2
>
> Helsinki Office
> Eteläranta 10
> FI-00130 Helsinki
> FINLAND
>
> Turku Office
> Kauppiaskatu 5 A
> FI-20100 Turku
> FINLAND
>