Hi Hamid,
To get Turtle from the SPARQL endpoint, use a CONSTRUCT query. In the simple
case where you want to return the whole graph, use this query:
CONSTRUCT WHERE { ?s ?p ?o }
You can try this by going to /tbl/sparql, pasting the query into the form,
choosing your asset collection from the dropdown, and checking the “Include
imports” box.
A corresponding curl command would be something like this (assuming an asset
collection called “t1” and EDG Studio):
curl -d default-graph-uri=urn:x-evn-master:t1 \
-d "query=CONSTRUCT WHERE { ?s ?p ?o }” \
-d with-imports=true \
-d format=turtle \
http://localhost:8083/tbl/sparql
Hope that helps,
Richard
> On 12 Oct 2023, at 20:46, Hamid Abdirad <[email protected]> wrote:
>
> Hi all,
> I want to export/download the content of collections (with imports included)
> using the web api endpoints of Topbraid EDG. The ultimate objective is to use
> the exported collections in other solutions that may use open source modules
> (like rdflib and pyshacl in python, or dotNetRDF in C# or ...) - so a
> RDF/Turtle - or a TRIG file - with imports is ideal.
>
> Current challenges:
> (1) tbs/exportRDFFile endpoint does not include imports in the response. So
> included graphs/ontologies are not found in the response.
>
> (2) /sparql endpoint, when used with "SELECT" queries, includes imported
> triples in the response but I am afraid the content and currently supported
> formats require a lot of post-processing that can affect the final ttl output
> (this endpoint does not readily provide a ttl output. a csv file can be
> exported but requires a lot of post-processing).
>
> Any suggestions or guidance is much appreciated.
> Thank you
> Hamid
>
> --
> The topics of this mailing list include TopBraid EDG and related technologies
> such as SHACL.
> To post to this group, send email to [email protected]
> ---
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/58889701-e82e-4308-97db-c4dd616f6466n%40googlegroups.com.
--
The topics of this mailing list include TopBraid EDG and related technologies
such as SHACL.
To post to this group, send email to [email protected]
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/286F647D-FA22-49C1-9441-3589E16CFF71%40topquadrant.com.