G11NToolKit Development Environment

Information on Development of G11NToolKit.

G11NToolKit Development Environment

The G11NToolKit contains classes written using Java, build files written in Ant form, process control files written in Ant form, documentation in HTML form, libraries of code that the tool kit depends upon, and miscellaneous files for support and execution of the tool kit. All development files for the tool kit are maintained in the following directory structure:

G11NToolKit
the main directory
G11NToolKit\bin
the directory that contains executable files that are not compiled. Files such as .bat files or script files that are used at execution time for the tool kit.
G11NToolKit\build
the build directory used as a work area to assemble the compiled classes. The compiled classes are then used to make the distribution files that placed in the lib directory.
G11NToolKit\build\classes
the directory structure that contains the package directories with the compiled classes.
G11NToolKit\build\lib
the build directory that contains the jar files made from the compiled classes. These jar files plus other files may be needed in the distribution lib directory.
G11NToolKit\Design
contains design information for the tool kit. These are mainly working documents used during the design and implementation phases of the tool kit classes.
G11NToolKit\Doc
contains the documentation for the tools. This area contains all the documentation for all the tools. Documentation is written using HTML in a series of connected pages. There is information about each tool and about each class or macro that can be used in the further development of the tools or in the development of new tools. Some of the documentation is generated and stored in the following structure:
\Doc\classes
contains the JavaDoc generated information for the tools and the supporting classes. The files in this directory and its sub-directories will be deleted each time the JavaDoc utility program is run to generate a new set of files.
G11NToolKit\etc
the directory that contains miscellaneous files that are needed for either development or support of execution that are not considered source code of the tool kit.
G11NToolKit\extensions
the directory that contains the directory structure and some basic files that are needed for the tool kit extensions support. This is the directory structure that the user will need to install any extension code they develop.
G11NToolKit\L10NProcess
the directory that contains process control files for the recommended localization process for the tool kit.
G11NToolKit\lib
the directory containing all the files that are needed for distribution of the tool kit. The files in lib are intended to be used for execution of the tool kit classes and not modification of the classes.
G11NToolKit\src
a set of directories containing the source code for the classes in the tool kit. Each directory in src contains a different package.
G11NToolKit\test
a set of test cases intended to prove that the basic tool kit code is working. These are not comprehensive test cases but just enough to test each of the tokenizers and detokenizers with a few variations in source file coding styles.

Return to:   Top of page

License Information

Certain wording must be included in all source files in the G11NToolKit regardless of their content or type. This wording is placed in the file generally as a comment. Following are the format and wordings to use in various types of files. This wording is mandatory in all files unless the file format will not accept comments.

The License Agreement being used for the G11NToolKit project can be viewed by clicking the link in this line.

For HTML files place this comment after the !DOCTYPE line in the file. Replace the place holder values, year and author-company, with appropriate values.

	<!-- Copyright (c) year author-company. All rights reserved.
			 This program is free software; you can redistribute it and/or modify it under the
			 terms of the GNU General Public License as published by the Free Software Foundation;
			 either version 2 of the License, or (at your option) any later version.

			 This program is distributed in the hope that it will be useful, but WITHOUT ANY
			 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
			 PARTICULAR PURPOSE. See the GNU General Public License for more details.

			 See http://g11ntoolkit.sourceforge.net/licenseGPL.html.
	-->
	

For a cascading style sheet file place the following comment at the beginning of the file. Replace the place holders, file-name, author-name, author-email, author-company, and year, with appropriate values.

	/* file-name Style Sheet
		 author author-name, author-email, author-company. Copyright (C) year, author-company.
		 All rights reserved.

		 This program is free software; you can redistribute it and/or modify it under the terms
		 of the GNU General Public License as published by the Free Software Foundation; either
		 version 2 of the License, or (at your option) any later version.

		 This program is distributed in the hope that it will be useful, but WITHOUT ANY
		 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
		 PARTICULAR PURPOSE. See the GNU General Public License for more details.

		 See http://g11ntoolkit.sourceforge.net/licenseGPL.html.*/
	

For a Java Source file place the following lines in the class header JavaDoc comment for each class including inner classes. These lines should go immediately after the author tag. Replace the place holder values, year and author-company, with appropriate values.

		* <br/>Copyright &copy; year, author-company. All rights reserved.
		* <p>This program is free software; you can redistribute it and/or modify it under
			the terms of the GNU General Public License as published by the Free Software
			Foundation; either version 2 of the License, or (at your option) any later
			version.</p>
		* <p>This program is distributed in the hope that it will be useful, but WITHOUT
			ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
			PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
		* <p>See <a href="http://g11ntoolkit.sourceforge.net/licenseGPL.html">License
			Agreement</a>.</p>
	

For an Ant file place the following comment near the beginning of the file, probably following the version tag. Replace the place holders, author-name, author-email, author-company, and year, with appropriate values.

	<!-- author author-name, author-email, author-company. Copyright (C) year, author-company. All rights reserved.

			 This program is free software; you can redistribute it and/or modify it under the
			 terms of the GNU General Public License as published by the Free Software Foundation;
			 either version 2 of the License, or (at your option) any later version.

			 This program is distributed in the hope that it will be useful, but WITHOUT ANY
			 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
			 PARTICULAR PURPOSE. See the GNU General Public License for more details.

			 See http://g11ntoolkit.sourceforge.net/licenseGPL.html.
	-->
	

For a .xsl file place the following comment near the beginning of the file making sure that it follows the ?xml tag. Replace the place holders, author-name, author-email, author-company, and year, with appropriate values.

	<!-- author author-name, author-email, author-company. Copyright (C) year, author-company. All rights reserved.

			 This program is free software; you can redistribute it and/or modify it under the
			 terms of the GNU General Public License as published by the Free Software Foundation;
			 either version 2 of the License, or (at your option) any later version.

			 This program is distributed in the hope that it will be useful, but WITHOUT ANY
			 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
			 PARTICULAR PURPOSE. See the GNU General Public License for more details.

			 See http://g11ntoolkit.sourceforge.net/licenseGPL.html.
	-->
	

For a .bat file place the following comment lines near the beginning of the file. Replace the place holders, author-name, author-email, author-company, and year with appropriate values.

	REM author author-name, author-email, author-company. Copyright (C) year, author-company.
	REM All rights reserved.

	REM This program is free software; you can redistribute it and/or modify it under the
	REM terms of the GNU General Public License as published by the Free Software Foundation;
	REM either version 2 of the License, or (at your option) any later version.

	REM This program is distributed in the hope that it will be useful, but WITHOUT ANY
	REM WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
	REM PARTICULAR PURPOSE. See the GNU General Public License for more details.

	REM See http://g11ntoolkit.sourceforge.net/licenseGPL.html.
	

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

	Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with
	ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are
	welcome to redistribute it under certain conditions; type 'show c' for details.
	

The hypothetical commands show w and show c should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than show w and show c; they could even be mouse-clicks or menu items -- whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

	Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
	(which makes passes at compilers) written by James Hacker.

	signature of Ty Coon, 1 April 1989
	Ty Coon, President of Vice
	

Return to:   Top of page

Java Code Development

The Java code is developed for JDK 1.4.1_05 (see the Java Class Guide for any class specific dependencies).

The latest version of the source code for the tool kit is maintained in the G11NToolKit SourceForge.net CVS system. If changes are to be made to the source code it must be checked out from the CVS system changed and checked back in and committed. See the specific CVS documentation for SourceForge.net to see how to manage the CVS system.

All source code in the G11NToolKit will contain appropriate JavaDoc comments for all classes, data, and methods. This information will be kept current by whoever changes the code. There are no exceptions to this since we need to make sure the code is easily understood by any one who needs it.

Return to:   Top of page

Building the Tools

In the G11NToolKit directory is a file named build.xml that is used to compile all the classes, make the Jar file, make the class documentation, and make the distribution files. It contains rules for when to make each class file so that only the changed class files are compiled. build.xml is intended for use with the Ant tool in a Windows environment. It must be run with the G11NToolKit directory set as the current directory. All path references in build.xml are relative to the G11NToolKit directory.

To build the complete tool kit from the beginning run ant with no input parameters. This will delete all build and distribution files then compile the source code, make the jar file, compile the class documentation, and create the distribution files.

To perform smaller build steps look at the build.xml file. There are many targets that are used to perform various tasks in the build cycle that can be used independently.

There are two ways to get the whole tool kit installed on your machine: 1) unzip all the distribution files manually or 2) use the install procdure. It is easiest to use the install procedure. Once the whole tool kit is installed on your machine there are some useful install targets to use for development work:

all (this is the default target if you don't choose any other target)
  • deletes all build files
  • compiles all source files
  • creates the Javadoc files for all source files
  • makes all the distribution files
    • source
    • development
    • documentation
    • binary
    • extensions
    • test cases
  • makes the install distribution file
  • unzips the install distribution file into the users tool kit install directory (environment variable G11NTOOLKIT_DIR)

    Note: this does not install the tool kit. It only makes things ready to run the install in the user installation directory.

installbin
  • compiles source code if needed
  • installs the binary distribution file in the user installation directory
installdist
  • compiles source code if needed
  • makes the Javadoc files for all source files
  • makes all the distribution files
  • makes the install file
  • unzips the install distribution file into the users tool kit install directory (environment variable G11NTOOLKIT_DIR)

    Note: this does not install the tool kit. It only makes things ready to run the install in the user installation directory.

installdoc
  • makes the Javadoc files for all source files
  • makes the documentation distribution file
  • unzips the documentation distribution file into the user installation directory
installext
  • makes the extensions distribution file
  • unzips the extensions distribution file into the user installation directory
installtest
  • makes the test case distribution file
  • unzips the test case distribution file into the user installation directory

Return to:   Top of page

G11NToolKit Distribution

CVS is used to store the copy of source code used by the development team, the developed tool kit is released in several zip files when a stable version is available. Downloadable versions of the tool kit are made available using the SourceForge.net Download Services network. Files are placed on the download servers through the File Release System. This is a much more convenient way to distribute the tool kit to the general public.

The build.xml file will create the distribution files in a directory structure under the G11NToolKit main directory. The main distribution directory file will be named G11NToolKit-version, where version is replaced by something like 1.0.1. Within the G11NToolKit-version directory will be a directory named dist that will contain the zip files that will be loaded into the SourceForge.net File Release system. No other files will be distributed in this way.

Return to:   Top of page

G11NToolKit Documentation

The tool kit documentation can be found in CVS as well as in the file releases made available by the G11NToolKit project. The documentation is also available on the G11NToolKit web site. The tool kit does not use the DocManager facility of SourceForge.net

Return to:   Top of page

by Bill Rich