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
Sun Feb 8 23:04:11 PST 2009


Hi Martin,
Thank you for your quick help.
Yes, I put the JAR in ".../plugins/edu.stanford.smi.protegex.owl" .
As your suggestion, now I will try to use GUI before invoking via code.

Thank you!
Truong Hien


Martin O'Connor wrote:
> You mention that you put the JAR with your custom built-in in ".../plugins". Do you mean ".../plugins/edu.stanford.smi.protegex.owl"? If not, make sure to put it there.
>
> In either case, try to invoke the built-in from the GUI before trying via code. Define a rule that invokes the built-in and then run it interactively. 
>
> Martin
>
> ----- Original Message -----
> From: "Truong Thi Thu Hien" <truong.hien at lab.ntt.co.jp>
> To: protege-owl at lists.stanford.edu
> Sent: Sunday, February 8, 2009 10:36:48 PM GMT -08:00 US/Canada Pacific
> Subject: [protege-owl] SWRL Builtin: Can not call custom builtin!
>
> Hi everyone,
>
> I spent so much time on following problem, and now is being overload 
> with it. Hope to get any recommend from you.
>
> 1. I define time ontology with "inside" builtin to make comparison of 
> time that whether one point of time is inside of one interval or not. 
> The definition is in time.owl file:
> <?xml version="1.0"?>
> <rdf:RDF 
>   xml:base="http://time.owl">
>   <owl:Ontology rdf:about=""/>
>   ......
>   <swrl:Builtin rdf:ID="inside"/>
> </rdf:RDF>
> In fact, I load every ontology from local position (e.g. C:/time.owl)
>
> 2. I have another ontology describe events (event.owl) and every event 
> has "hasTime" property. This ontology import time.owl with prefix "time"
> 3. Now I define the SWRL rule:
> hasTime(?e1, ?t1) ^ hasTime(?e2, ?t2) ^ time:inside(?t1, t?2) -> 
> hasRelation(?e1,?e2)
> 4. I implement the inside function in package 
> edu.standford.protegex.owl.swrl.bridge.builtins.time ;   To fix bug 
> occur, I let inside function always return true.
> 5. I create builtin Atom by BuiltIn Bridge API as following:
>
>                         SWRLBuiltin insideBuiltin = 
> factory.getBuiltin("time:inside");
>                         List arguments = new ArrayList();
>                         arguments.add(t1);
>                         arguments.add(t2);
>                         SWRLBuiltinAtom builtinAtom = 
> factory.createBuiltinAtom(insideBuiltin, arguments.iterator());
>                         body.append(builtinAtom);
>
> 6. When I run the Jess rule engine with bridge.infer(), I got the error:
> .......error invoking built-in from Jess: unresolved built-in class for 
> prefix 'time' in rule 'Rule-1' .....
>
> I guess I met the problem in calling inside builtin or my SWRL rule is 
> wrong?, but I can not find what is exactly wrong. I built builtin into 
> .jar and put it in .../plugins as API manual.
>
> Hope someone help me!
> Thank you in advance!
>
> Truong Hien
>
>
>
>
> _______________________________________________
> 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