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*(&quot;/generatedFiles/&quot;,
> xsd:string(*?folder*), &quot;/&quot;) *}*">
>
>     <*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.

Reply via email to