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!

Martin O'Connor martin.oconnor at stanford.edu
Thu Feb 12 14:39:50 PST 2009


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




More information about the protege-owl mailing list