Hi Holger,
Thank you.
Just to clarify so I fully understand because now I don't have a sh:in
list but I want to create one from the imports that are included in the
cGraph:
SELECT ?product
# (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result)
{
BIND(teamwork:currentMasterGraph() as ?cGraph)
GRAPH ?cGraph
{?cGraph owl:imports ?import}
GRAPH ?import{
?d a skos:Concept.
?d skos:hasTopConcept ?Concept.
?ProductT skos:broader ?Concept.
?ProductT uri:product ?product .
}
FILTER(CONTAINS(STR(?Concept),"service"))
## BIND (ui:label(?product) AS ?label) .
}GROUP BY ?product }
but I don't know how to insert that.
Thanks,
Kasia
On Thursday, June 29, 2023 at 4:36:41 PM UTC+2 Holger Knublauch wrote:
> The value of sh:in is an rdf:List. Lists consist of intermediate notes
> that are linked into a chain using rdf:first and rdf:rest. The usual trick
> to walk such chains is to use a SPARQL path expression. The following may
> work for you:L
>
> SELECT ?item
> WHERE {
> <uri> sh:in ?list .
> ?list rdf:rest*/rdf:first ?item .
> }
>
> where rdf:rest* is walking through all list elements and rdf:first fetches
> the actual value of each element.
>
> HTH
> Holger
>
>
> On 29 Jun 2023, at 2:22 pm, Kasia Kryczka <[email protected]> wrote:
>
> Hi everyone,
> I want insert a list of types to sh:in which would be :
>
> <uri>
> sh:in *(*
> * "aaa"*
> * "bbb"*
> * "ccc"*
> * ) ;*
>
> my query doesn't work :
> INSERT{
> <URI> sh:in ?product
> }
>
> WHERE {
> SELECT ?product
> # (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result)
> {
>
> BIND(teamwork:currentMasterGraph() as ?cGraph)
>
> GRAPH ?cGraph
> {?cGraph owl:imports ?import}
>
> GRAPH ?import{
> ?d a skos:Concept.
> ?d skos:hasTopConcept ?Concept.
> ?ProductT skos:broader ?Concept.
> ?ProductT uri:product ?product .
> }
> FILTER(CONTAINS(STR(?Concept),"service"))
>
> ## BIND (ui:label(?product) AS ?label) .
>
> }GROUP BY ?product }
>
> the result with concat_group is <uri>
> sh:in *(*
> * "aaa,**bbb, **ccc"*
> * ) ;*
>
> and this is not what I need.
>
> Could you give me a hint how to resolve this?
>
> Thanks,
>
> Kasia
>
>
> --
> 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/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com
>
> <https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
--
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/06dfe3ce-690c-4568-8738-46fe15f3435bn%40googlegroups.com.