Protégé Script Console
A script console for editing macros for Protégé
The Protégé Script Console is a tab plug-in for the
Protégé ontology development platform. It provides a scripting
environment for manipulating an ontology. It is compatible with both the traditional
Protégé-Frames environment and with the
Protégé-OWL editor.
It can be used to:
- Reuse some existing functions from other scripts or Java classes.
- Write your own scripts for designing an intermediate representation of an ontology.
- Define your own functions for performing tasks such as reasoning or consistency checking.
Supported languages
The Protégé Script Console relies on Apache's
Bean Scripting Framework (BSF). Therefore, any BSF-compliant script
language can easily be integrated. So far, the following languages are supported:
Resources
- A tutorial will soon be made available. Until then, please look at the
JOT Tutorial, as the content
will be fairly similar.
- A wiki page for the Protégé
Script Console has been created on the Protégé Wiki.
The Protégé Script Console is bundled with the
"full" installation of Protégé.
The source code for the Script Console is available for download from the Protégé Subversion repository
using the following URL:
http://smi-protege.stanford.edu/repos/protege/protege-script-console/trunk/.
There is an Ant build file in /trunk and all third-party libraries required to compile the source code are located in /trunk/lib.
You can also use this nice display to browse the
code. The Javadoc is available from this page.
To activate the Script Console from within Protégé, you must first open or create a new project. In the
"Project" menu, choose "Configure..." to bring up the Configure dialog. On the tab entitle
Tab Widgets, check the box next to "ProtegeScriptTab".

The Protégé Script Console plug-in is released under the Mozilla Public License. It is provided as is. Your are free to use it, to distribute it, and to modify it. Feedback is welcome.
The Protégé Script Console plugin relies on third-party software components.
- Bean Scripting Framework (BSF) provides scripting language support within Java applications, and access to Java objects and methods;
- Jython is a Java implementation of Python;
- BSFPerl is a BSF-compliant Java implementation of Perl;
- Beanshell is a BSF-compliant Java implementation of a Java-like scripting language;
- Groovy;
- JRuby is a BSF-compliant Java implementation of Ruby.
Changelogs
Version 0.26
- Modified ant build file so that nothing is done if the JVM is not 1.4
Version 0.25
- Recompiled with Java 1.4 :-)
Version 0.24
- Fixed the ant build file so that icons are included in the jar file.
Version 0.19
- Updated BSFPerl from 0.1 to 0.2
- Updated JRuby from 0.8.0 to 0.8.1
Version 0.18
- Fixed the groovy-dependent jar files for groovy-1.0beta10.
Version 0.16
- Fixed missing ant build file.
- Updated Groovy to version 1.0-beta10
Version 0.15
Version 0.14
- Fixed the backspace that was always erasing the last character in the command, not the character before the caret.
Version 0.13
- Fixed a minor bug that made the left arrow to behave as backspace.
Version 0.12
- If the system property edu.stanford.smi.protege.script.defaultScriptLanguage is set, then it is used to determine the default scripting language. Possible values are: "jython", "perl", "beanshell", "groovy", "jruby". The default value is "jython"
- If the system property edu.stanford.smi.protege.script.defaultScriptPath is set to a value that actually points to a file, then this file is executed on startup
- Hitting backspace key deletes one character or one indentation level
- Hitting enter on a line only composed of spaces brings the cursor at the beginning of the new line (no more indentation)
Version 0.11
- Tentative fix of the stdout capture and redirection to the console
- Updated groovy to 1.0-beta9
- Updated jruby to 0.8.0 (Full support for Ruby 1.8.x grammar)
- Improved doap file (default namespace + download URL + minor cleaning)
Olivier Dameron
Last modified: Mon Jun 13 18:51:10 PDT 2005
The RDF DOAP description of this project is doap.rdf