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] How to Replace variables with SQWRLQueryAPI?

Samson Tu swt at stanford.edu
Mon Jan 7 14:02:05 PST 2008


Can't you make a new copy of the query at runtime, replace ?name with 
"Fred", and then evaluate that query? I've done that with PAL queries 
all the time in Protege Frame.

Samson

Thusitha Mabotuwana wrote:
> Sounds like you need to create your query at runtime, but unfortunately SQWRL
> doesn't have runtime support yet -
> https://mailman.stanford.edu/pipermail/protege-owl/2007-November/004444.html
> 
> 
> Quoting Ely Edison Matos <ely.matos at ufjf.edu.br>:
> 
>> Hello,
>> Suppose I have a sqwrl query like [1]:
>>
>> Person(?p) ^ hasName(?p, ?name) ^ hasSalary(?p, ?salary) -> 
>> sqwrl:select(?name, ?salary)
>>
>> This rule (and others) are stored in a OWL file (query.owl). I'm 
>> programming with Protege OWL-API. How can I use the SQWRLQuery (or 
>> SWRL Factory) to execute the rule for a specific Person individual? 
>> It means, replace the ?p with "Fred", for example, to get the ?name 
>> and ?salary of Fred?
>> I need execute rules like this for specific individuals (defined at 
>> runtime), not for all individuals from my ontology. It is possible to 
>> change the rule at runtime, but maybe there is a "easy way"...:-))
>>
>> Thanks,
>> Ely
>>
>>
>> [1] http://protege.cim3.net/cgi-bin/wiki.pl?SQWRLQueryAPI
>>
> 
> 
> 
> _______________________________________________
> 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 
> 


-- 
Samson Tu                                   email: swt at stanford.edu
Senior Research Scientist                   web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University                         fax: 1-650-725-7944




More information about the protege-owl mailing list