Appendice: Developing with Transmorpher

This appendice is targeted to those who want to program with Transmorpher. The installation procedure is that decribed above

Applying the test suite

In order to apply the test suite, you will need junit and ant. Just go to the script directory and apply:

$ sh ant test

Compiling Transmorpher

In order to re-compile transmorpher you will need a Java compiler and ant. Just go to the script directory and apply:

$ sh ant compile
or, if you want to use this compiled code in a regular way:
$ sh ant jar

Have a look at the build.xml file for more options or type:

$ sh ant usage
Buildfile: build.xml

init:
     [echo] Transmorpher build for version 0-9-10running of 11/10/2002

usage:
     [echo] sh ant _target_ _options_
     [echo] 
     [echo] usage: this message
     [echo] init: sets necessary variables
     [echo] compile: incrementaly compiles sources
     [echo] compileall: recompiles all sources
     [echo] jar: archives compiled code
     [echo] test: performs unit tests
     [echo] updatetests: update the tests skeletons
     [echo] javadoc: generates documentation
     [echo] update: update the CVS repository
     [echo] commit: 
     [echo] prepare: prepare the base for a release (VERSION variable set)
     [echo] mark: set the tag on the version in the CVS base 
     [echo] image: prepage the release directory
     [echo] package: create compressed releases
     [echo] tidy: suppresses temporary files
     [echo] ttask: test Transmorpher as a Ant task
     [echo] release: releases a new version
     [echo] cdrom: prepare the CDROM image for INRIA
     [echo] clean: clean-up the release directory
     [echo] 
     [echo]  -Dversion=0-9-10running

BUILD SUCCESSFUL

Total time: 5 seconds

Extending Transmorpher

Transmorpher can be extended by adding new implementations of Transmorpher components. The "theoretical" way to proceed is described in the Extension API subsections.

Extensions share a parameter attribute that they can access for getting the value of their parameters through the fr.fluxmedia.transmorpher.Utils.Parameters interface.

The extensions must be declared for being taken into account by Transmorpher.This declaration can be made either by providing the full class name of the extension:

<call type="my.class.path.Extension"/> or by declaring the extension: <defextern name="ext" class="my.class.path.Extension" type="call"/> ... <call type="ext"/>

You are encouraged to take inspiration from the standard implementations found in the stdlib package and the contributed modules described here.

Manipulating Transmorpher

Transmorpher can be manipulated, e.g., for embedding in other software, through the manipulation API.

Good example of manipulation can be found in the sources of Transmorpher. The API has been briefly described in this manual. Some more information can be found in the javadoc and the sources.

Next chapter: Contributed modules


http://transmorpher.gforge.inria.fr/refman/dev.html

Feel free to comment to Jérôme:Euzenat#inrialpes:fr, $Id: dev.html,v 1.4 2005/10/25 13:34:00 euzenat Exp $