Difference between revisions of "ConvertToDBScript"

From Protege Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Script for converting an OWL file to the DB backend =
 
= Script for converting an OWL file to the DB backend =
  
'''This ant script allows you to convert an OWL file to the database backend.'''
+
'''This ant script allows you to convert an OWL file to the database backend''' (<code>streaming or non-streaming</code>). In the configuration file you have to specify the OWL file to convert, the database connection information, and the conversion mode. The configuration file (<code>convert.properties</code>) is documented and straightforward to use.
  
  
Line 7: Line 7:
  
  
'''Download''' the [http://smi-protege.stanford.edu/svn/*checkout*/dev-plugins/trunk/convertToDB/bin/convertOWL-2-DB.zip zip archive] with the script from [http://smi-protege.stanford.edu/svn/*checkout*/dev-plugins/trunk/convertToDB/bin/convertOWL-2-DB.zip here].
+
'''Download''' the [http://smi-protege.stanford.edu/svn/dev-plugins/trunk/convertToDB/bin/convertOWL-2-DB.zip zip archive] with the script from [http://smi-protege.stanford.edu/svn/dev-plugins/trunk/convertToDB/bin/convertOWL-2-DB.zip here].
  
  
Line 13: Line 13:
 
# Unzip the archive to a directory, e.g. <code>convertOWL-2-db</code>.
 
# Unzip the archive to a directory, e.g. <code>convertOWL-2-db</code>.
 
# Rename <code>convert.properties.template</code> to <code>convert.properties</code> and edit the property values in the file (this is how you specify the input arguments for the conversion).
 
# Rename <code>convert.properties.template</code> to <code>convert.properties</code> and edit the property values in the file (this is how you specify the input arguments for the conversion).
# To run the script, you will need [http://ant.apache.org/ ant]. To run, start a console, change to the directory where you copied the 3 files and type <code>ant</code> in the console.
+
# To run the script, you will need [http://ant.apache.org/ ant]. To run, start a console, change to the directory where you unzipped the files (e.g., <code>convertOWL-2-DB</code>) and type <code>ant</code> in the console.
  
  
The '''source code''' of the converter is available in the [http://smi-protege.stanford.edu/svn/*checkout*/dev-plugins/trunk/convertToDB/src/edu/stanford/smi/protegex/util/ConvertToDb.java SVN repository].
+
The '''source code''' of the converter is available in the [http://smi-protege.stanford.edu/svn/dev-plugins/trunk/convertToDB/ SVN repository].

Latest revision as of 15:29, August 7, 2012

Script for converting an OWL file to the DB backend

This ant script allows you to convert an OWL file to the database backend (streaming or non-streaming). In the configuration file you have to specify the OWL file to convert, the database connection information, and the conversion mode. The configuration file (convert.properties) is documented and straightforward to use.


Note You can also make this conversion using the Protege user interface. We have a step by step guide here. However, if for some reason you do not want to make this conversion in the UI (for example, it takes too long and you want to do it over night, etc.), or this is part of a bigger ant script, then you should use this script.


Download the zip archive with the script from here.


To use the OWL to DB conversion script:

  1. Unzip the archive to a directory, e.g. convertOWL-2-db.
  2. Rename convert.properties.template to convert.properties and edit the property values in the file (this is how you specify the input arguments for the conversion).
  3. To run the script, you will need ant. To run, start a console, change to the directory where you unzipped the files (e.g., convertOWL-2-DB) and type ant in the console.


The source code of the converter is available in the SVN repository.