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] Problem with importing user-defined builtins to Protege

Kulsawasd Jitkajornwanich idealboat at hotmail.com
Sun Aug 1 17:12:58 PDT 2010


Dear Martin,
 
    I am again a student from UTA, Kulsawasd J. Your advice 
from last email is really helpful. Thank you very much again. Right now, I am 
trying to import my own built-in to Protege. However, before I did that, I gave 
Protege a test by making some changes on one of the Protege built-in operations 
and "Add" built-in is selected. What I did is that I extracted all the jar file 
from C:\Program Files\Protege_3.4.4\plugins\edu.stanford.smi.protegex.owl 
directory and looks.jar, protege.jar and unicode_panel.jar from C:\Program 
Files\Protege_3.4.4 directory (as you suggested someone in the mailing 
list). Then I made a modification on "SWRLBuiltInLibraryImpl.java" file 
,downloaded from your website http://smi-protege.stanford.edu/svn/owl/trunk/src/edu/stanford/smi/protegex/owl/swrl/bridge/builtins/swrlb/?rev=19683 (path-> 
protege: owl/trunk/src/edu/stanford/smi/protegex/owl/swrl/bridge/builtins/swrlb), 
by changing +(add symbol) to *(multiply symbol) as follows ...operationResult *= 
getArgumentAsADouble(argumentNumber, arguments);.... That means, as opposed to 
do summation, this operation will do multiplication instead. After that, I 
compiled it and I successfully got "SWRLBuiltInLibraryImpl.class" then I put 
this class file back in the directory 
C:\edu\stanford\smi\protegex\owl\swrl\bridge\builtins\swrlb to replace the old 
class file which I got from extracting jar files. 
(Note: When I extracted 
all the needed jar files to C:\ drive, the following list of directories is what 
I got:
- anltr        - jess
- arq          - junit   
- client       - junit3.8.1
- com        - org
- edu         - vocabularies
- etc          - xmlsrc
- javax
- jena ) 
 
    Then I make a jar file from all files in "EDU" folder and name 
it protege-owl.jar. After that, I put the jar file "protege-owl.jar" into the 
C:\Program Files\Protege_3.4.4\plugins\edu.stanford.smi.protegex.owl. Then I 
started Protege but when I tried "Add" built-in, it still did the same job which 
is summation not multiplication. Based on the result, I came up with 2 
assumptions in my mind.
1. The "protege-owl.jar" is not the one that will be 
actually imported to Protege.
2. "SWRLBuiltInLibraryImpl.class" is not activated when running.
 
    According to steps I did, is that the correct way we do to import 
builtins? If not, what did I do wrong & what is the right way to do? I just 
followed the steps described in your paper "A Mechanism to Define 
and Execute SWRL Built-ins in Protégé-OWL"; do you 
any other specific documentation explaining in more detail for doing that? Where 
should I put the class file "SWRLBuiltInLibraryImpl.class" into? Or the class 
file "SWRLBuiltInLibraryImpl.class" will never be activated when Protege is 
running; if so, which java file do I need to make a change and will be the 
one to be activated and worked when Protege is runing? 
 
    I am very sorry for 
disturbing you with a lot of questions. I read and carefully followed steps 
according to your papers, Protege website and other people's suggestions such as 
L M online but it still does not work even though I spend a lot of time on it 
and tried every ways possible; just to import one simple builtin. Could you 
please give me some advice so that the problem can be fixed?
 
Sincerely Thank you & 
Kindest Regards,
Kulsawasd 
J. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100802/1c48e0de/attachment.html>


More information about the protege-owl mailing list