Skip to content

lenyabloko/ontobase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

=== Description ===

OntoBase can be simply “snapped on” any relational database to provide access to data, virtually without any programming.

=== Installation ===

The ONTOBaseTab can work with "basic" or "full" installation of Protege 3.x, but it requires JDK 5 or higher.

1) Extract OntobaseTab.zip into Protege installation root directory.

Note: To make sure Protege loads with correct JVM - change the following line in protege.lax file which is located in the root directory

lax.nl.current.vm=C:\\Program Files\\Java\\jre1.6.0_04\\bin\\java.exe

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

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


=== Use ===

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

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


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.initial=100000000

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
     :QUERY
     :TUPLE.
     _:STREAM
     __:SERVICE
     __db.:GROUND
    
Note: If the import worked correctly all top level classes (except _:STREAM) should have sub-classes corresponding to each table in the database.

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


*8.* To fetch multiple rows select a sub-class of __:SERVICE corresponding to a database table and press OntoBase "Load data" button. Then simply follow instructions provided by OntoBase.

Note: The 'Documentation' field of each class created in OntoBaseTab will contain some additional instructions (after reading you can clear or replace it).


*9.* Changing or adding support for database engines is possible: 

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

- inside com.ngs.ontobase.protege package find or create a subclass of Metadata.java using as name the part of JDBC url that follows "jdbc:" as, for example, "postgresql" in: 

jdbc:postgresql://host/database

In this example the name of Metadata subclass should be postgresql.java
(you must use lower case, despite normal Java coding convention).
If you have any problems or questions contact support@ontospace.net

Releases

No releases published

Packages

No packages published