Adding New Datamodel Objects To Jalview

There are some basic requirements for all Jalview datamodel objects. None of them are mandatory, but each one makes it easier to integrate a new datamodel object into Jalview.

The primary requirement of classes within jalview.datamodel is that all class implementations must be byte-code compatible with a java 1.1 runtime environment. This is an imposition from the Jalview applet, which is dependent on the core jalview.datamodel package. It is possible to include dependencies to objects which are not available to the JRE1.1 environment, providing you ensure that a test is made at run-time to decide if these dependencies are followed within any particular method. But generally, it is best to stick to 1.1 coding style - that is no generics, no fancy Iterators or use of specific JRE object methods and interfaces introduced after 1.1 (such as the get method for java.util.Vector).

Steps for integrating a new class into the datamodel

  1. Implement in Java 1.1 compatible source.
  2. Implement copy constructors for the benefit of any datamodel classes that reference it: