Hi Jeff,

On Dec 7, 2009, at 10:47 AM, Schmitz, Jeffrey A wrote:

> I'm trying to update to the latest TBC and SPIN libraries and had the 
> following questions pertaining to changes in the SPIN API:
> 
> 1. The QueryWrapper constructor has changed and I'm not sure what to pass in 
> for the statement and thisUnbound parameters:
> 
> QueryWrapper(Query query, String text, org.topbraid.spin.model.Query 
> spinQuery, String label, Statement statement, boolean thisUnbound)

Sorry I need to improve documentation of this class. The Statement is the 
triple that has the query as object, e.g.

        my:Class spin:rule ?query

This is needed later for determining the order of rules in the execution (which 
has changed in SPIN 1.1, see below).

> 
> 2. In the org.topbraid.spin.vocabulary.SPIN class I used to use the below 
> function:
> 
>        public static int getRuleIndex(Resource rule) {
>                Statement s = rule.getProperty(SPIN.ruleIndex);
>                if(s != null && s.getObject().isLiteral()) {
>                        return s.getInt();
>                }
>                else {
>                        return 100000;
>                }
> 
> After updating my SPIN library it's now gone.  However, this might have been 
> something I added to my local copy.  If not, is there an alternate function I 
> can use now?

I have removed the spin:ruleIndex property with SPIN 1.1 in favor of 
spin:nextRuleProperty. Basically you need to group together all rules that 
should be executed before another group, and use a dedicated spin:RuleProperty 
for each group. See "Controlling execution order" under 
http://spinrdf.org/spin.html#spin-rules.

Holger

--

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