Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

StepExample
  1. If you created your own HSQLDB dictionaries for use with a previous release of cTAKES and you plan to use those dictionaries with cTAKES 4.0, you must convert your dictionaries to be compatible with cTAKES 4.0. The dictionaries installed in the preceding section do not need to be converted.
No example
2.  If your dictionary's .properties file sets your dictionary's database to be read-only, you need to change it before you can convert it.
  • Suggested: make a copy of your database directory for use with 4.0, so that the filename.properties and filename.script and any other files in that directory are duplicated, where filename is dependent on what you named your database
  • locate Locate the filename.properties file for your database
  • remove these linesRemove these lines, if present:

      readonly=true 
      files_readonly=true

  • save Save the filename.properties file
 

3.  Open the database with the 1.8 hsqldb jar:

Locate the 1.8 hsqldb jar that you used when you created the database (for example, <CTAKES_HOME>/lib/hsqldb-1.8.0.10.jar if you used the cTAKES 3.2.2 convenience binary)

If you need to, you can download it from Maven Central at:

http://central.maven.org/maven2/org/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar

Open the HSQLDB manager GUI for version 1.8. For example, if your 1.8 jar is in C:\Apps\hsqldb\, you would enter this command:

java -cp  C:\Apps\hsqldb\hsqldb-1.8.0.10.jar   org.hsqldb.util.DatabaseManager

Connect to your database, by entering the appropriate URL and pressing the Ok button.

For example, if you are on Windows and your dictionary's.properties file is

C:\cTAKES_3\resources\org\apache\ctakes\dictionary\lookup\fast\customdict\custom.properties

you could enter the following for the URL

jdbc:hsqldb:\cTAKES_3\resources\org\apache\ctakes\dictionary\lookup\fast\customdict\custom

 

 

4.  Using HSQLDB 1.8, in the upper right pane, enter SET SCRIPTFORMAT TEXT and press the Execute button.

After the update count appears, go to the next step.

 

5. Using HSQLDB 1.8, in the upper right pane, enter SHUTDOWN COMPACT and press the Execute button.

After the update count appears, exit the Database Manager GUI.

 

56. Now do same with hsqldb 2.3.4 jar - open the HSQLDB 2.3.4 database manager GUI:

java  -cp C:\apache-ctakes-4.0.0\lib\hsqldb-2.3.4.jar   org.hsqldb.util.DatabaseManager

Connect to your database, by entering the appropriate URL and pressing the Ok button.

In the upper right pane, enter SHUTDOWN COMPACT and press the Execute button.

Exit the Database Manager GUI.

 

67. Verify the filename.properties file for your database contains version=2.3.4

If it doesn't, make sure

   the  .properties  file does not have  readonly=true

   the  .properties  file does not have  files_readonly=true

   you used hsqldb-2.3.4.jar when instructed to

 

78. Suggested: Set your dictionary's database to be read-only, by adding readonly=true to the filename.properties file.

 
89. Repeat the above steps for each of your dictionaries that you had created for use with a previous release of cTAKES. 

...