To take this one step further, EDG supports using SHACL to provide view
options in the UI.
it strikes me this is equally relevant to the serialisation of a specific
object in TTL (or anything else).
Is there an equivalent service that can do this?
One option that occurred to me would be to create a graphQL template based
on a nodeshape - then the result (currently serialised as json) could
perhaps be serialised as json-ld and ttl
This also leads to the question of how to best work with blank nodes in
SHACL
this seems to be bypassed in the UI - it does this traversal with a
function.
query: "query getSuitableViewShapes($uri: ID!) {↵ resources(uri: $uri) {↵
Is there any way of doing something similar with a user defined shape that
can traverse blank nodes?
On Thursday, 18 March 2021 at 11:43:14 UTC+11 Holger Knublauch wrote:
> On the server that hosts your namespace, can't you set up a rewrite that
> generates
>
> http://mytopbraid...:8083/tbl/sparql?query=DESCRIBE%20<XY>
>
> where you replace XY with the URL-encoded URI of the resource that was
> requested? See e.g.
>
> https://httpd.apache.org/docs/2.4/rewrite/remapping.html
>
> but this sounds like a problem someone must have solved before. Given that
> you plan to call a SWP service, how do you currently redirect the URLs to
> invoke said service?
>
> You cannot use DESCRIBE in ui:TurtleService and I am not aware of a magic
> property that would get all depending triples of the concise bounded
> description. SPARQL is not good at recursion.
>
> Holger
>
>
> On 2021-03-18 10:11 am, Steve Ray wrote:
>
> Interesting. The DESCRIBE query sounds intriguing, but I need to create
> the .ttl files so that when somebody types
>
> http://qudt.org/schema/qudt/Unit
>
> ...it resolves to the Turtle code, without using a SPARQL endpoint.
>
> Just like if you type http://qudt.org/vocab/unit/A you get the definition
> of the Ampere. (Content negotiation will give you either html or ttl
> depending on the header, so a browser yields html).
>
> Can I use DESCRIBE inside a ui:TurtleServices web service? I tried with
> ui:update, but that expects an INSERT or DELETE. Am I making this more
> complicated than it needs to be?
>
>
> Steve
>
>
>
>
> On Wed, Mar 17, 2021 at 4:08 PM Holger Knublauch <[email protected]>
> wrote:
>
>> Hi Steve,
>>
>> you could just use SPARQL DESCRIBE queries, which will compute the graph
>> for a resource including its depending blank nodes, e.g.
>>
>> DESCRIBE <http://topquadrant.com/ns/examples/geography#Country>
>> <http://topquadrant.com/ns/examples/geography#Country>
>>
>> via the SPARQL endpoint.
>>
>> Holger
>>
>>
>> On 2021-03-18 9:01 am, Steve Ray wrote:
>>
>> Hi,
>> I'm using SWP to generate a bunch of .ttl files that will be available to
>> the LinkedData community for resolving class definitions. I'm hoping to use
>> the code below that works fine for our instance data, but this code doesn't
>> do the right thing when there are bnodes (such as restriction classes).
>> This is written as a ui prototype that is a subClass of ui:TurtleServices.
>>
>> *Is there some setting to have it also serialize the bnodes*? Here's the
>> ui:prototype code:
>>
>> <*ui:group* let:*extension*=".ttl"
>>
>> let:*myGraphU*="*{=* ui:graphWithImports(*IRI*(*?graph*)) *}*"
>>
>> let:*myInstance*="*{=* *IRI*(*?instance*) *}*"
>>
>> let:*newPath*="*{=* *CONCAT*("/generatedFiles/",
>> xsd:string(*?folder*), "/") *}*">
>>
>> <*ui:debug*>
>>
>> *<span>*Inside VersionlessIndividual. Value of ?newPath is *{=*
>> ?newPath *}**</span>*
>>
>> </ui:debug>
>>
>> <*ui:dumpScope* ui:message="AAA:VersionlessIndividual, newPath= *{=*
>> ?newPath *}*"/>
>>
>> <*ui:group* let:*localName*="*{=* afn:localname(?myInstance) *}*">
>>
>> <*ui:group* let:*newFile*="*{=* *CONCAT*(?newPath, ?localName,
>> ?extension) *}*">
>>
>> <*ui:dumpResultSet* ui:message="AAA:VersionlessGraph,
>> newUnit= " ui:resultSet="*{=* *?instance* *}*"/>
>>
>> <*ui:setContext* ui:silentTransactions="true">
>>
>> <*ui:setContext* ui:queryGraph="ui:tempGraph">
>>
>> *<!-- Clear out the working graph-->*
>>
>> <*ui:update* ui:updateQuery="*{!*
>>
>> *DELETE* {
>>
>> *GRAPH* ui:tempGraph {
>>
>> ?s ?p ?o .
>>
>> } .
>>
>> }
>>
>> *WHERE* {
>>
>> ?s ?p ?o .
>>
>> } *}*"/>
>>
>> <*ui:update* ui:updateQuery="*{!*
>>
>> *INSERT* {
>>
>> *GRAPH* ui:tempGraph {
>>
>> ?myInstance ?p ?o .
>>
>> } .
>>
>> }
>>
>> *WHERE* {
>>
>> *GRAPH* ?myGraphU {
>>
>> ?myInstance ?p ?o .
>>
>> } .
>>
>> } *}*"/>
>>
>> <*ui:return*/>
>>
>> </ui:setContext>
>>
>> </ui:setContext>
>>
>> </ui:group>
>>
>> </ui:group>
>>
>> </ui:group>
>>
>>
>>
>> ...which produces the following file:
>>
>>
>> [image: image.png]
>>
>> I want all the stuff inside the [] to show up as well!
>>
>>
>>
>> Steve
>>
>>
>> --
>> 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/CAGUep85DXyHFA%3DwmgdArgZnw-k6EHPJ5AsRDwYsHBT65sU2csg%40mail.gmail.com
>>
>> <https://groups.google.com/d/msgid/topbraid-users/CAGUep85DXyHFA%3DwmgdArgZnw-k6EHPJ5AsRDwYsHBT65sU2csg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> 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/94b728c4-5723-9bf7-a406-01990f7a7b2f%40topquadrant.com
>>
>> <https://groups.google.com/d/msgid/topbraid-users/94b728c4-5723-9bf7-a406-01990f7a7b2f%40topquadrant.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAGUep872hEg4vbd8cnFczKWedgPjUTsMa%2BAhx-3cjQ5E55zkWg%40mail.gmail.com
>
> <https://groups.google.com/d/msgid/topbraid-users/CAGUep872hEg4vbd8cnFczKWedgPjUTsMa%2BAhx-3cjQ5E55zkWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>
--
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/d0f07d25-9c0d-404b-a944-0321affd7a9an%40googlegroups.com.