Hi Brice,

one option is to use SPARQLMotion using the SPR ontology and functions:

http://spinrdf.org/spr.html#aggregateCol

Basically you need to first create a SPIN result set (sml:CreateSPINResultSet), 
then run the aggregation function (e.g. using sml:ApplyConstruct) over the 
result set. This allows you to do arbitrary post-processing of other SPARQL 
result sets, but you will need to define your own spr:Aggregator first. Not 
exactly out of the box yet, but very generic, and you can extract this SM 
snippet into a helper function for future use.

Regards,
Holger


On Jun 28, 2010, at 7:17 PM, Brice Sommacal wrote:

> Hello, 
> 
> I would like to create a custom label for a specific class.
> 
> The following sparql query create several new displayName for ?assoc because 
> the property named is:association__rolePLayer is composed by sevarl instances.
> 
> CONSTRUCT {
>     ?assoc isPF:displayName ?newLabel .
> }
> WHERE {
>     ?assoc a is:ASSOCIATION .
>     ?assoc is:association__associationType ?assocType .
>     ?assocType rdfs:label ?assocTypeLabel .
>     ?assoc is:association__rolePlayer ?assocRolePlayer .
>     ?assocRolePlayer isPF:displayName ?displayName .
>     ?assocRolePlayer is:rolePlayer__associationRoleType ?roleType .
>     ?roleType rdfs:label ?roleTypeLabel .
>     ?assocRolePlayer is:rolePlayer__topic ?topic .
>     ?topic isPF:displayName ?topicTypeLabel .
>     LET (?newLabel := fn:concat(?assocTypeLabel, "-", ?displayName)) .
> }
> 
> Instead of that, I would like to create only ONE new displayName with the 
> concatenation of all the displayName from RolePlayer. 
> 
> I tried to work around with iterateOverSelect and sml:appendText; but nothing 
> came up yet. 
> 
> Is there a simple way to make it work?
> 
> Hope I'm enough clear, 
> THanks for any information you have, 
> 
> BR, 
> 
> 
> 
> Brice
> 
> -- 
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to