Yes.  The way ?this works is that it is applied to all instances of
the class.  You defined your sumFunction to be used with SPIN so that
a query defined for a class is applied to all instances of the class.

Another way to see how ?this works is to copy/paste your sumFunction
construct query into the SPARQL Tab.  Run the query then choose
instances of the class.  With each choice the constructed triple will
change so that ?this is bound to the chosen resource.  This is a good
way to edit/debug your SPIN rules.

I.e. ?this applies to a "chosen resource" and SPIN defines the "chosen
resource" to be all instance of the class the spin:rule is defined on.

-- Scott

On Mar 17, 11:35 am, "Bohms, H.M. (Michel)" <[email protected]>
wrote:
> Great, it works now.
>
> Wrt your argument issue: is that because the function works already 
> implicitly on "?this" ?
>
> Thanks for getting it to work! Michel
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Scott Henninger
> Sent: 17 March 2009 17:26
> To: TopBraid Composer Users
> Subject: [tbc-users] Re: own functions in spin:rules
>
> In terms of the sumFunction not working, there are a number of things going 
> on in the file you sent.  The most important is the type of the spin function 
> (sumFunction) is defined as owl:Class.  It needs to be spin:Function.
>
> The argument defined in  sumFunction is not necessary, as it is not used in 
> the query, but will not hurt anything.
>
> -- Scott
>
> >         But when executing: no error, but when I try to look at an 
> > individual for its derived value (totalCost of say House1):
> >         Operation Failed, Reason: Could not execute query; attempt to get a 
> > CONSTRUCT model from a slect query.
>
> This e-mail and its contents are subject to the DISCLAIMER 
> athttp://www.tno.nl/disclaimer/email.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to