As Scott indicates it could be that some functions are not registered and thus 
the SPIN RDF syntax isn't converted properly. I would recommend to start with 
one of the examples in the SPIN API and exchange the RDF models there etc. In 
particular, those use the following first line to init all:
                
                // Register system functions (such as sp:gt (>))
                SPINModuleRegistry.get().init();

Holger


On Jun 21, 2011, at 12:32 AM, Alison Callahan wrote:

> Hello Scott and Holger,
> Thanks for your previous replies.
> Using TopBraid Composer 3.5.0 I have successfully used the '+' operator in 
> test SPARQL queries and also in a spin:rule, which adds new triples when I 
> run inferences in TBC. However, when I load the same RDF SPIN file containing 
> this rule using the TopBraid SPIN API 1.2.0 and run the inferences using the 
> SPINInferences.run() method with the following signature,
> 
> public static int run(com.hp.hpl.jena.rdf.model.Model queryModel, 
> com.hp.hpl.jena.rdf.model.Model newTriples, SPINExplanations explanations, 
> List<SPINStatistics> statistics, boolean singlePass, ProgressMonitor monitor)
> 
> no new triples are added to the newTriples model and the following WARN 
> message is printed:
> 
> WARN [main] (E_Function.java:70) - URI <http://spinrdf.org/sp#add> has no 
> registered function factory
> 
> The SPIN RDF file imports http://spinrdf.org/spin as well as my ontology, 
> which describes the classes/object properties/data properties used in the 
> spin:rule. Why doesn't the '+' operator work when I load this RDF as a model 
> using the TopBraid SPIN API and Jena?
> 
> Thanks,
> 
> Alison
> 
> On Wed, Jun 15, 2011 at 7:07 PM, Holger Knublauch <[email protected]> 
> wrote:
> The functions from the sp: namespace are just the URIs used by the SPIN RDF 
> syntax to represent the SPARQL built-ins. Please use + etc as Scott suggested 
> instead.
> 
> Holger
> 
> 
> On Jun 16, 2011, at 1:32 AM, Alison Callahan wrote:
> 
>> Hello all,
>> 
>> I am trying to execute a SPARQL query in like the one below TopBraid 
>> Composer 3.5.0. The query includes the sp:add() function as follows:
>> 
>> SELECT ?sum
>> WHERE {
>>         ....
>>         [some SPARQL to get ?numberone and ?numbertwo]
>>         .....
>>      ?numberone test:has-value ?nonevalue .
>>      ?numbertwo rule-test:has-value ?ntwovalue .
>>      LET(?sum := sp:add(?nonevalue, ?ntwovalue)) .
>> }
>> 
>> The problem is that when I execute this query, the returned ?sum variable is 
>> empty. 'test:has-value' is a datatype property I defined in the test 
>> ontology I am using to play around.
>> 
>> Any help is appreciated, thanks,
>> 
>> Alison
>> 
>> 
>> -- 
>> 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
> 

-- 
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