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
Sun Feb 8 22:36:48 PST 2009

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"?>
  <owl:Ontology rdf:about=""/>
  <swrl:Builtin rdf:ID="inside"/>
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) -> 
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 = 
                        List arguments = new ArrayList();
                        SWRLBuiltinAtom builtinAtom = 
factory.createBuiltinAtom(insideBuiltin, arguments.iterator());

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

More information about the protege-owl mailing list