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] SWRLQueryAPI - invalid query name

Shepherd, Michael Michael.Shepherd at xerox.com
Wed Oct 8 07:54:23 PDT 2008


 

I have a question about the SWRLQueryAPI.  I'm trying to use based on web doc http://protege.cim3.net/cgi-bin/wiki.pl?SQWRLQueryAPI.

 

So I use my code using the latest jars from build 506 and the latest jess.jar. I try to invoke the QueryEngine with a rule I created via the code.

 

                     SWRLFactory factory = new SWRLFactory(owlModel);                                

 

                     SWRLImp imp = factory.createImp("Query", "Box(?p)-> sqwrl:select(?p)");

                     

                     SQWRLResult result = queryEngine.getSQWRLResult("Query");

 

When executing the above rule in the SWRLTab in Protégé 3.4 beta, I get the results I expect (10 individual of type Box). When I execute via the API, I get the following error in the last line above:

 

Oct 7, 2008 3:30:05 PM com.xerox.packont3.SqwrlTest main

SEVERE: invalid query name 'Query'

edu.stanford.smi.protegex.owl.swrl.sqwrl.exceptions.InvalidQueryNameException: invalid query name 'Query'

       at edu.stanford.smi.protegex.owl.swrl.bridge.impl.AbstractSWRLRuleEngineBridge.getSQWRLResult(Unknown Source)

       at com.xerox.packont3.SqwrlTest.main(SqwrlTest.java:159)

edu.stanford.smi.protegex.owl.swrl.sqwrl.exceptions.InvalidQueryNameException: invalid query name 'Query'

       at edu.stanford.smi.protegex.owl.swrl.bridge.impl.AbstractSWRLRuleEngineBridge.getSQWRLResult(Unknown Source)

       at com.xerox.packont3.SqwrlTest.main(SqwrlTest.java:159)

 

Should I need to do something with the SWRLImp? The web documentation doesn't state so.

 

Thoughts?

 

Thanks!

 

 

 

~ Mike

 

Michael Shepherd
Research Technical Staff, Xerox Corporation
michael.shepherd at xerox.com <mailto:michael.shepherd at xerox.com> 
http://www.linkedin.com/in/michaelshepherd <http://www.linkedin.com/in/michaelshepherd> 
http://www.facebook.com/profile.php?id=634126333 <http://www.facebook.com/profile.php?id=634126333> 

	
See who we know in common <http://www.linkedin.com/e/wwk/6125599/> 

Want a signature like this? <http://www.linkedin.com/e/sig/6125599/> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20081008/183bd2c0/attachment.html>


More information about the protege-owl mailing list