< 

Introduction for Developers

< 

Table of Contents

< 

Documents


Files and Setup

Create a new directory for your WordHoard development work. Download the following files and place them in the new development directory.

  • Java source code. This zip archive contains all of the Java source code files for WordHoard. Expand the archive and place the resulting src directory inside your development directory.
  • Raw data files. This large zip archive contains all of the raw data files for the four corpora on the main public WordHoard site. This includes the text and tagging data for all of the works. Expand the archive and place the resulting data directory inside your development directory. These files are used to build the static object model database.
  • Static database files. This very large zip archive contains the MySQL binary database files for the current build of the static object model database (the one used by the WordHoard client with all the text and tagging data). Expand the archive and place the resulting wordhoard directory inside your development directory. You will move this directory into your MySQL data directory later (see Installing the Database). Note that it is possible to build this database from the raw data files, and we will discuss how to do this in the chapter Building the Static Object Model. This takes a long time, however, so to help you get started more quickly, we have included this pre-built copy of the database.
  • Third party libraries. This zip archive contains third party libraries (jar files) used by WordHoard. Expand the archive and place the resulting lib directory inside your development directory.
  • Third party libraries for non-MAC OS X systems. This zip archive contains libraries (jar files and zip files) needed to recompile the WordHoard source on systems other than MAC OS X. These extra libraries should be placed with the other third party libraries in the lib directory inside inside your development directory.
  • Server files. This zip archive contains the files needed for running and testing the WordHoard server during development. Expand the archive and place the resulting server directory inside your development directory.
  • Shell scripts. This zip archive contains various useful UNIX shell scripts. Expand the archive and place the resulting scripts directory inside your development directory.
  • Miscellaneous files. Expand this zip archive and place the resulting misc directory inside your development directory.
  • HTML source for this manual. Expand this zip archive and place the resulting userman directory inside your development directory.
  • Ant build script. Save this file as build.xml in your development directory.
  • UNIX setup script. Save this file as setup in your development directory.

After you have downloaded all of these files, open the setup file. At the top of the file there are several statements which define important environment variables:

  • MYSQL_ROOT_USERNAME = MySQL root username.
  • MYSQL_ROOT_PASSWORD = MySQL root password.
  • MYSQL_BIN = Path to the directory containing the MySQL client and utility programs.
  • MYSQL_DATA = Path to the MySQL data directory.
  • ANT_HOME = Path to the Ant home directory.
  • CODEBASE = HTTP URL for deployed client directory.
  • HOMEPAGE = HTTP URL for deployed user manual.

Change the values of these variables to the ones you use. The root account is the one you use to manage your MySQL system. It must be granted all privileges on everything. See the MySQL manual for details.

When we want to work on WordHoard, we open a new terminal window, change to our development directory, and execute the following command:

source setup

Our setup file defines the environment variables discussed above, sets up our classpath, and defines a large number of aliases that make our work go faster. Other developers, of course, will want to customize their own environments, and developers on other platforms will almost certainly need to make changes to the setup file.

Some of our more useful and frequently used aliases include the following:

  • mysql-start. Starts MySQL.
  • mysql-stop. Stops MySQL.
  • mysql. Runs the MySQL command line client with the root username and password.
  • b. Runs Ant. Used to build the source code.
  • start. Starts the WordHoard server.
  • stop. Stops the WordHoard server.
  • r. Runs the WordHoard client.

We will use these aliases in the examples in the following chapters. To see their definitions, look in the setup file. You may need to change the definitions on your system to get them to work right.


< 

Introduction for Developers

< 

Table of Contents

< 

Documents