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] SWRL Builtin: Can not call custom builtin!

Truong Thi Thu Hien truong.hien at lab.ntt.co.jp
Thu Feb 12 21:18:50 PST 2009


Hi,
I invoke the BuiltIn  from both the source code and GUI but get the same 
error message.
I look at the source code of Temporal BuiltIn as sample, and I don't 
understand the purpose of some variables such as  Prefix,  
TemporalLibraryName.  In my built in, I dont use such variables. Whether 
they are the reason that I can't invoke my builttin?

Hope anyone give me advice or suggestion.
Thank you!


Martin O'Connor wrote:
> The built-in definition looks fine. Are you invoking this from the GUI 
> or from code?
>
> Martin
>
>   
>>> Truong Thi Thu Hien wrote:
>>>
>>>    
>>>
>>>       
>> Hi Martin,
>> You are right. Instances which are not referred in rule will not be 
>> imported to Jess. So I modify my rule as:
>> event:Event(?e1) ^ event:Event(?e2) ^ time:Time(?t1) ^ time:Time(?t2) ^ 
>> hasTime(?e1, ?t1) ^ hasTime(?e2, ?t2) ^ time:inside(?t1, t?2) -> 
>> hasRelation(?e1,?e2)
>>
>> About invoking builtIn "inside", I check the classpath and can not find 
>> what was wrong.
>> Here is my builtIn sourcode:
>>
>> package edu.standford.protegex.owl.swrl.bridge.builtins.time;
>> import edu.stanford.smi.protegex.owl.swrl.bridge.builtins.*;
>> import edu.stanford.smi.protegex.owl.swrl.bridge.exceptions.*;
>> import edu.stanford.smi.protegex.owl.swrl.bridge.*;
>> import edu.stanford.smi.protegex.owl.swrl.exceptions.SWRLOWLUtilException;
>> import java.util.*;
>> import edu.stanford.smi.protegex.owl.model.OWLModel;
>> import edu.stanford.smi.protegex.owl.swrl.util.SWRLOWLUtil;
>>
>> public class SWRLBuiltInLibraryImpl extends AbstractSWRLBuiltInLibrary{
>>    
>>   public SWRLBuiltInLibraryImpl(){
>>       super("SWRLTimeBuiltIns");
>>   }
>>  
>>   public void reset(){}
>>  
>>   public boolean inside(List<BuiltInArgument> arguments) throws 
>> BuiltInException, SWRLOWLUtilException{
>>              return true; // to check the invoking builitin, I always 
>> return true for this builtin definition
>>                
>>   }
>>
>> I built in using Netbeans 6.5 and place  this built in in time.jar and 
>> copy it (from the dist folder ) to  plugins directory of protege 3.4 
>> beta installation. (C:\Program 
>> Files\Protege_3.4_beta\plugins\edu.stanford.smi.protegex.owl\)
>> When I run OWL+SWRL -->Jess, I still get the same error message.
>> Can you tell me what I was wrong? I read instruction 
>> http://protege.cim3.net/cgi-bin/wiki.pl?SWRLBuiltInBridge carefully but 
>> I still can find any solution for my problem.
>> Hope to get your help more.
>>
>> Thank you!
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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 
>>
>>  
>>
>>     
>
> _______________________________________________
> 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