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>

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.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] <mailto:[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.

Reply via email to