Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Possible to use SQWRL in rule-body (SQWRL-QueryAPI)?

Martin O'Connor martin.oconnor at stanford.edu
Thu Oct 16 17:45:02 PDT 2008


The createImp() creation mechanism does not appear to work with the 
SQWRL query engine in the current build. I will try to fix it (though it 
may be a few weeks before a fix is released because I am out of the 
office until November). If you create the queries in the editor and 
invoke them by name the process should work.

Martin

Michael Lodemann wrote:

>Is it yet possible to use SQWRL-builtIns like sqwrl:select in the body of
>a rule in a java-program?
>
>It's because the following code ...
>
>SWRLImp imp1 = factory.createImp("test_query", "j.0:Road(?r) ->
>sqwrl:select(?r)");
>SQWRLQueryEngine queryEngine = SQWRLQueryEngineFactory.create(owlModel);
>queryEngine.runSQWRLQueries();
>
>... throws an exception at the last line.
>
>Exception:
>
>error running SQWRL queries: Jess reported an error in routine
>invokeSWRLBuiltIn
>	while executing (invokeSWRLBuiltIn "test_query"
>"http://sqwrl.stanford.edu/ontologies/built-ins/3.4/sqwrl.owl#select" 0
>false ?http://www.owl-ontologies.com/roadInstances.owl#r(0,0,-1))
>	while executing rule LHS (Node2)
>	while executing rule LHS (TECT)
>	while executing (assert
>(MAIN::http://www.owl-ontologies.com/road.owl#Road (name
>http://www.owl-ontologies.com/roadInstances.owl#r1))).
>  Message: error invoking built-in from Jess: exception thrown by built-in
>'sqwrl:select' in rule 'test_query': attempt to add data beyond the end
>of a row.
>  Program text: ( assert ( http://www.owl-ontologies.com/road.owl#Road (
>name http://www.owl-ontologies.com/roadInstances.owl#r1 ) ) )  at line 1
>in file <eval pipe>.
>
>Can one tell me how to resolve this?
>
>Thanks,
>Michael
>
>_______________________________________________
>protege-owl mailing list
>protege-owl at lists.stanford.edu
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>  
>




More information about the protege-owl mailing list