Thanks Holger for your prompt response. Yesterday, as you adviced me, I made a SpinResultSet and then apply a construct on my results. The aggregator took in parameter was simply defined by a spr:stepFunction fn:concat. But nothing really cames up.
Do you have a complete example about spr? Afterwards, I had a look at this post: http://groups.google.fr/group/topbraid-users/browse_thread/thread/87ff402a9882abc5/ba6ea8f609f28c68?lnk=gst&q=ConcatenateText+bindbyselect#ba6ea8f609f28c68 where Scott Henninger purpose to use BindBySelect and ConcatenateText. Althought the mechanism needs several steps, I think it would be easier than using spr at the moment. I'm doing it in this way: 1 - iterateOverSelect ( to get all the instances I want to create a new label). 2 - make a bind by select to retrieve labels from the "sub-instances". [1] 3- Concatenate text 4- Bind literal variable 5- Apply construct [2]: SELECT ?displayName WHERE { ?assoc is:association__rolePlayer ?assocRolePlayer . ?assocRolePlayer isPF:displayName ?displayName . } [3] SELECT ?displayName WHERE {} The new label is well-created, but the list label (from concatenate text) is not created. Only the first label appears. I checked variables and output variables, and they are corrects. I'm not sure if I'm using ConcatenateText in a right way... Can you give me an hand on making this work? Thanks again, BR, Brice 2010/6/28 Holger Knublauch <[email protected]> > 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]<topbraid-users%[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
