Difference between revisions of "OntoBase"

From Protege Wiki
Jump to: navigation, search
(Extending database support)
(Installation)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Plugin
 
{{Plugin
|Description=OntoBase is a plug-in that allows Protégé to be used as "Model" and "View" for simple database applications. OntoBase can be simply “snapped on” any relational database to provide access to data, virtually without any programming.
+
|Description=OntoBase can be connected to any relational database- providing access to data, virtually without any programming
 
|PluginType=Tab Widget
 
|PluginType=Tab Widget
 
|PluginType2=Import
 
|PluginType2=Import
 
|ForApplication1=Protege-Frames
 
|ForApplication1=Protege-Frames
|Screenshot=ontobase.jpg
+
|Screenshot=Ontobase.png
|HomepageURL=http://www.ontospace.net
+
|HomepageURL=http://code.google.com/p/ontobase/
 
|DeveloperID1=Len Yabloko
 
|DeveloperID1=Len Yabloko
|LastUpdated=October 26, 2008
+
|LastUpdated=March 14, 2009
 
|Topic4=Query
 
|Topic4=Query
 
|Topic5=Import
 
|Topic5=Import
 
|Topic6=Export
 
|Topic6=Export
 
|License=MIT License
 
|License=MIT License
|Affiliation1=OntoSpace
+
|Affiliation1=Next Generation Software
 
}}
 
}}
 
<div style="float:left;">
 
<div style="float:left;">
Line 19: Line 19:
 
=== Description ===
 
=== Description ===
  
OntoBase is a plug-in that turns any relational database into ontology. You can define new classes by mapping slots to columns of one or more tables. It allows Protégé to be used as "Model" and "View" for simple database applications. In its current form OntoBase can be simply “snapped on” any relational database to provide access to data, virtually without any programming.
+
OntoBase automatically generates ontology grounded in database (by means of Protégé API using frames and facets). User can then compose new classes from columns of one or more tables.
  
 
=== Installation ===
 
=== Installation ===
Line 26: Line 26:
 
To make sure Protege loads with correct JVM change following line in protege.lax file
 
To make sure Protege loads with correct JVM change following line in protege.lax file
  
<pre><nowiki>lax.nl.current.vm=C:\\Program Files\\Java\\jre1.6.0_04\\bin\\java.exe</nowiki></pre>
+
<pre><nowiki>lax.nl.current.vm=C:\\Program Files\\Java\\jre6\\bin\\java.exe</nowiki></pre>
  
1) Extract OntoBase_X.X.X.zip into Protege installation root directory.
+
1) Extract downloaded TabPlugin.zip into Protege installation root directory.
  
 
2) Open New Project using Protege files(.pont and .pins) or XML file
 
2) Open New Project using Protege files(.pont and .pins) or XML file
Line 53: Line 53:
 
http://download.microsoft.com/download/b/4/7/b4761c5f-2d80-40dc-aa86-0795c70893e8/Download_SQL_JDBC_Driver_12.htm
 
http://download.microsoft.com/download/b/4/7/b4761c5f-2d80-40dc-aa86-0795c70893e8/Download_SQL_JDBC_Driver_12.htm
  
 +
Note: you can also use the drivers from Ontobase source repository:
 +
http://code.google.com/p/ontobase/source/browse/trunk/com.ngs.ontobase.protege/lib/driver0.jar
  
 
5) Wait until connection is established and then click on "run" icon.  
 
5) Wait until connection is established and then click on "run" icon.  
Line 58: Line 60:
 
Note: If import does not start in a few moments or if it later stops before reaching 100%, then you may need to adjust application memory allocation by editing following line in protege.lax file
 
Note: If import does not start in a few moments or if it later stops before reaching 100%, then you may need to adjust application memory allocation by editing following line in protege.lax file
  
<pre><nowiki>lax.nl.java.option.java.heap.size.initial=100000000</nowiki></pre>
+
<pre><nowiki>lax.nl.java.option.java.heap.size.max=1128000000</nowiki></pre>
  
 
The protege.lax file is located in the root directory of your Protege installation
 
The protege.lax file is located in the root directory of your Protege installation
Line 67: Line 69:
 
<pre><nowiki>
 
<pre><nowiki>
 
:THING
 
:THING
    :SYSTEM-CLASS
+
  :SYSTEM-CLASS
     .TUPLE
+
  :TYPE
     ~STREAM
+
    :ACTION
     @GROUND
+
     :TUPLE.
    =SERVICE
+
     __:SERVICE
 +
    ___:STREAM
 +
     __db.:GROUND
 
</nowiki></pre>
 
</nowiki></pre>
  
 
Note: All top level classes (except ~STREAM) should have sub-classes corresponding to each table in the database.
 
Note: All top level classes (except ~STREAM) should have sub-classes corresponding to each table in the database.
  
 +
7) To test generated ontology select any sub-class of @GROUND corresponding to a table and press "Create Instance" button inside OntoBase tab. You should get a popup form for entering value(s) of the table's primary key columns. Fill-in the values and close the popup- this should result in fetching a single row from the table as Protege instance. You can view/edit the instance- all changes will be automatically saved to database.
  
7) To test generated "ground" ontology simply select any sub-class of @GROUND (each corresponding to a table) and press "create" button on OntoBase tab. You should see a popup asking for primary key of the table. Fill-in the values and close the popup - this should result in fetching a requested row from the table in a form of Protege instance. You can view/edit the instance - all changes will be automatically saved to database.
 
  
 +
8) Now select a sub-class of =SERVICE corresponding to a database table and press OntoBase "Create Instance" button. Then simply follow instructions provided by OntoBase in each newly created class documentation (after reading you can clear or replace it).
  
8) Now you are ready to use OntoBase for defining entities and relations. To begin find and select a sub-class of =SERVICE that will be used for "seeding" new service. Seed name must always begin with "=" and correspond to a database table containing resulting "output" of some service. With the seed selected in Protege class browser press OntoBase "create" button.
+
=== Extending ===
If everything is normal you should see a dialog window asking to use existing entity name (by selecting and pressing "Ok") or to create a new one (by pressing "Cancel"). Then simply follow instructions provided by OntoBase in each newly created class documentation (after reading you can clear or replace it).
 
  
 +
Support for database engines can be added or extended by implementing new JDBC protocol adapters. OntoBase distribution now includes Java sources for MySql, Oracle and MS SQL adapters used by ONTOBaseTab.
  
=== Extending database support ===
+
Changing or adding functionality is easy:
  
 +
- connect to open source repository at http://code.google.com/p/ontobase/source/checkout
  
 
+
- create subclass of Metadata.java with exactly the same name as the part of JDBC url that follows "jdbc:" as "postgresql" in  
Support for database engines can be added or extended by implementing new JDBC protocol adapters. OntoBase distribution now includes Java sources for MySql 5, Oracle 11 and MS SQL 2005 adapters used by ONTOBaseTab.
 
 
 
You can download connectors separately at http://projects.semwebcentral.org/projects/ontobase/
 
 
 
Create new class extending "generic" with exactly the same name as the part of JDBC url that follows "jdbc:" as in  
 
  
 
<pre><nowiki>
 
<pre><nowiki>
 
jdbc:postgresql://host/database
 
jdbc:postgresql://host/database
 
</nowiki></pre>
 
</nowiki></pre>
 
Then simply compile Java source using JDK 1.5 (or higher) and place resulting .class file(s) in corresponding directory structure, for example:
 
 
<pre><nowiki>
 
Protege installation dir/plugins/com/ngs/postgresql.class
 
</nowiki></pre>
 
 
 
 
Hope this helps :-)
 
 
I can find a screencast at http://www.ontospace.net/demodownloads.html
 
 
<pre><nowiki>If you have any problems or questions contact support@ontospace.net</nowiki></pre>
 
 
=== Extending database support ===
 
 
 
 
Support for database engines can be added or extended by implementing new JDBC protocol adapters. OntoBase distribution now includes Java sources for MySql 5, Oracle 11 and MS SQL 2005 adapters used by ONTOBaseTab.
 
 
You can download connectors separately at http://projects.semwebcentral.org/projects/ontobase/
 
 
Create new class extending "generic" with exactly the same name as the part of JDBC url that follows "jdbc:" as in
 
 
jdbc:postgresql://host/database
 
 
Then simply compile Java source using JDK 1.5 (or higher) and place resulting .class file(s) in corresponding directory structure, for example:
 
 
Protege installation dir/plugins/com/ngs/postgresql.class
 

Latest revision as of 07:21, March 2, 2011

OntoBase

by Len Yabloko

Screenshot

Type Tab Widget, Import
Author(s) Len Yabloko
Last Update March 14, 2009
License MIT License
Homepage OntoBase website
For Application
Topic(s)
Affiliation

OntoBase can be connected to any relational database- providing access to data, virtually without any programming

Versions & Compatibility

This section lists available versions of OntoBase.

VersionCompatible withDependencies
OntoBase 3.4.2Protege-Frames 3.4
OntoBase 3.4.1Protege-Frames 3.4
Protege Client-Server 3.4
Protege-OWL 3.4
OntoBase 3.4.0Protege-Frames 3.4.4
OntoBase 3.3.7Protege-Frames 3.3.1
OntoBase 3.3.6Protege-Frames 3.3.1
OntoBase 3.3.5Protege-Frames 3.3.1
OntoBase 3.3.4Protege-Frames 3.3.1
OntoBase 3.3.3Protege-Frames 3.3.1
OntoBase 3.3.2Protege-Frames 3.4.4
OntoBase 0.3.3Protege-Frames 3.2.1

If you click on the button below to add a new version of OntoBase, you will be asked to define a page title for the new version. Please adhere to the naming convention of OntoBase X.X.X when you define the new page!

Changelog

VersionChanges in this version
OntoBase 3.4.2GUI improovements and bug fixes
OntoBase 3.4.1Compatible with Protege 3.4 OWL and RDF backend
OntoBase 3.4.0tested with Protege-Frames 3.4.4 (build 579)
OntoBase 3.3.7Improved user dialog and performance
OntoBase 3.3.6- automatically generate SQL joins
OntoBase 3.3.5-Automatically switching between several connected databases;

-Improved data access performance using separate Java thread;

-Automatic synchronization of ontology with source databases upon loading of the project;
OntoBase 3.3.4Support for PostgreSQL added.
OntoBase 3.3.3Support for database engines can now be added/extended
OntoBase 3.3.2full read/write access to Oracle, Microsoft SQL and MySQL
OntoBase 0.3.3see page for more details


More Details

Description

OntoBase automatically generates ontology grounded in database (by means of Protégé API using frames and facets). User can then compose new classes from columns of one or more tables.

Installation

The ONTOBaseTab can work with "basic" or "full" installation of Protege 3.x running in JRE 1.5 or higher. To make sure Protege loads with correct JVM change following line in protege.lax file

lax.nl.current.vm=C:\\Program Files\\Java\\jre6\\bin\\java.exe

1) Extract downloaded TabPlugin.zip into Protege installation root directory.

2) Open New Project using Protege files(.pont and .pins) or XML file

3) Go to Project->Configure and check ONTOBaseTab box.

4) When OntoBase window appears enter JDBC address of database and click connect button.
Following are some examples of JDBC database URLs:

jdbc:oracle:thin:@machine_name:port_number:instance_name
jdbc:mysql://host_name:port/dbname 

Note: JDBC driver corresponding to entered URL must be provided either by placing it directly in Protege root directory under name driver0.jar (or driver1.jar, driver2.jar), or by placing it in location specified in following line of protege.lax file

lax.class.path=protege.jar;...;dbdrivers/sqljdbc.jar; dbdrivers/ojdbc6.jar; dbdrivers/mysql-connector-java-5.1.6-bin.jar...

Drivers tested with OntoBase:

http://dev.mysql.com/downloads/connector/j/5.1.html

http://download.oracle.com/otn/utilities_drivers/jdbc/111060/lib/ojdbc6.jar

http://download.microsoft.com/download/b/4/7/b4761c5f-2d80-40dc-aa86-0795c70893e8/Download_SQL_JDBC_Driver_12.htm

Note: you can also use the drivers from Ontobase source repository: http://code.google.com/p/ontobase/source/browse/trunk/com.ngs.ontobase.protege/lib/driver0.jar

5) Wait until connection is established and then click on "run" icon.

Note: If import does not start in a few moments or if it later stops before reaching 100%, then you may need to adjust application memory allocation by editing following line in protege.lax file

lax.nl.java.option.java.heap.size.max=1128000000

The protege.lax file is located in the root directory of your Protege installation


6) After import of database schema is finished OntoBase will re-load and check sign will appear next to imported url. At this point Protege project will contain "ground" ontology generated by OntoBase with four top level classes:

:THING
  :SYSTEM-CLASS
  :TYPE
     :ACTION
     :TUPLE.
     __:SERVICE
     ___:STREAM
     __db.:GROUND

Note: All top level classes (except ~STREAM) should have sub-classes corresponding to each table in the database.

7) To test generated ontology select any sub-class of @GROUND corresponding to a table and press "Create Instance" button inside OntoBase tab. You should get a popup form for entering value(s) of the table's primary key columns. Fill-in the values and close the popup- this should result in fetching a single row from the table as Protege instance. You can view/edit the instance- all changes will be automatically saved to database.


8) Now select a sub-class of =SERVICE corresponding to a database table and press OntoBase "Create Instance" button. Then simply follow instructions provided by OntoBase in each newly created class documentation (after reading you can clear or replace it).

Extending

Support for database engines can be added or extended by implementing new JDBC protocol adapters. OntoBase distribution now includes Java sources for MySql, Oracle and MS SQL adapters used by ONTOBaseTab.

Changing or adding functionality is easy:

- connect to open source repository at http://code.google.com/p/ontobase/source/checkout

- create subclass of Metadata.java with exactly the same name as the part of JDBC url that follows "jdbc:" as "postgresql" in

jdbc:postgresql://host/database