Generating a serialized graph with baseURI using CONSTRUCT

18 views
Skip to first unread message

Jan Voskuil

unread,
Dec 2, 2019, 7:34:00 AM12/2/19
to TopBraid Suite Users
Hi,
The "# baseURI: " directive is typically generated by TBC.
Often, one inserts the directive manually so that you can use or edit the serialized graph inside TBC.

We generate serialized versions and copies of graphs using CONSTRUCT queries.
But something like "# baseURI: http://example.org/mygraph_v1.1" cannot be generated in that way.

Is there a trick to achieve the goal over generating a serialized graph that is directly useable in TBC? -Jan

dprice

unread,
Dec 2, 2019, 7:53:49 AM12/2/19
to topbrai...@googlegroups.com

On 2 Dec 2019, at 12:34, Jan Voskuil <jan.v...@taxonic.com> wrote:

Hi,
The "# baseURI: " directive is typically generated by TBC.
Often, one inserts the directive manually so that you can use or edit the serialized graph inside TBC.

We generate serialized versions and copies of graphs using CONSTRUCT queries.

Technically, that’s not possible as far as I know. CONSTRUCT alone cannot create a stored, named graph. It creates inferred triples in an in-memory graph (a graph with no encoding). The management of the graph (and encoding) into which the triples are saved has to happen outside of the CONSTRUCT, by whatever processes also executes the SPARQL. 

Note the wording in the spec where it says “returns” (i.e. the calling process has to do something more with that graph in order to store it as TTL, RDF/XML, JSON-LD, etc):

16.2 CONSTRUCT

The CONSTRUCT query form returns a single RDF graph specified by a graph template


But something like "# baseURI: http://example.org/mygraph_v1.1" cannot be generated in that way.

Is there a trick to achieve the goal over generating a serialized graph that is directly useable in TBC? -Jan

Writing a script I guess …. hardly a trick though.

Cheers,
David


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/c5fc50f7-1466-48d3-9c75-cb48468cdc78%40googlegroups.com.


Jan Voskuil

unread,
Dec 2, 2019, 8:15:50 AM12/2/19
to topbrai...@googlegroups.com

Thanks David, this clarifies the matter, we’ll have a look at scripting options. Best, -j

Sjoerd Rongen

unread,
Dec 3, 2019, 7:13:18 AM12/3/19
to TopBraid Suite Users

It seems that when you use SPARQL motion to create a file it automatically adds this baseURI statement as well, just as when manually creating the file. This would mean that it is not something that requires special attention.

Op maandag 2 december 2019 14:15:50 UTC+1 schreef Jan Voskuil:

Thanks David, this clarifies the matter, we’ll have a look at scripting options. Best, -j

 

 

From: topbrai...@googlegroups.com <topbrai...@googlegroups.com> On Behalf Of dprice
Sent: 02 December 2019 13:54
To: topbrai...@googlegroups.com
Subject: Re: [topbraid-users] Generating a serialized graph with baseURI using CONSTRUCT

 

 



On 2 Dec 2019, at 12:34, Jan Voskuil <jan.v...@taxonic.com> wrote:

 

Hi,

The "# baseURI: " directive is typically generated by TBC.

Often, one inserts the directive manually so that you can use or edit the serialized graph inside TBC.

 

We generate serialized versions and copies of graphs using CONSTRUCT queries.

 

Technically, that’s not possible as far as I know. CONSTRUCT alone cannot create a stored, named graph. It creates inferred triples in an in-memory graph (a graph with no encoding). The management of the graph (and encoding) into which the triples are saved has to happen outside of the CONSTRUCT, by whatever processes also executes the SPARQL. 

 

Note the wording in the spec where it says “returns” (i.e. the calling process has to do something more with that graph in order to store it as TTL, RDF/XML, JSON-LD, etc):

 

16.2 CONSTRUCT

The CONSTRUCT query form returns a single RDF graph specified by a graph template



But something like "# baseURI: http://example.org/mygraph_v1.1" cannot be generated in that way.



Is there a trick to achieve the goal over generating a serialized graph that is directly useable in TBC? -Jan

 

Writing a script I guess …. hardly a trick though.

 

Cheers,

David



--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages