apollo.dataadapter.chado.jdbc
Class SchemaVersion

java.lang.Object
  extended by apollo.dataadapter.chado.jdbc.SchemaVersion

public class SchemaVersion
extends java.lang.Object

Each instance of this class represents a specific Chado schema version. The class also contains a method that attempts to guess the schema version of a particular Chado database, given a connection to that database. Currently the class knows about only two Chado schema versions, called 'pre_fmb' and 'fmb'; these are successive versions of the schema used at TIGR. 'fmb' stands for FlyBase Migration Build, so the fmb schema should correspond to the Chado/GMOD cvs schema freeze. Some work may need to be done to bring this class up to speed with respect to the regular Chado release cycle.

Version:
$Revision: 1.5 $ $Date: 2004-04-27 16:59:20 $ $Author: jcrabtree $
Author:
Jonathan Crabtree

Field Summary
static SchemaVersion FMB
          Flybase migration build
static SchemaVersion PRE_FMB
          Pre-flybase migration build
protected  java.lang.String tag
          A String that uniquely identifies a Chado schema version.
 
Method Summary
 java.lang.String getAbbrevCol()
           
 java.lang.String getCvNameCol()
           
 java.lang.String getFMaxCol()
           
 java.lang.String getFMinCol()
           
 java.lang.String getObjFeatCol()
           
 java.lang.String getPKeyCol()
           
 java.lang.String getPValCol()
           
 java.lang.String getSubjFeatCol()
           
static SchemaVersion guessSchemaVersion(java.sql.Connection c)
          Attempt to determine the version of a chado schema by interrogating one or two key fields or tables.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRE_FMB

public static SchemaVersion PRE_FMB
Pre-flybase migration build


FMB

public static SchemaVersion FMB
Flybase migration build


tag

protected java.lang.String tag
A String that uniquely identifies a Chado schema version.

Method Detail

guessSchemaVersion

public static SchemaVersion guessSchemaVersion(java.sql.Connection c)
Attempt to determine the version of a chado schema by interrogating one or two key fields or tables. Hopefully it will be possible to do this in a more structured manner in future e.g., by retrieving an explicitly-stored schema version number from the database (hint, hint).

Parameters:
c - A connection to a Chado database whose schema version must be be determined.
Returns:
The predicted version of the Chado database represented by c.

getPKeyCol

public java.lang.String getPKeyCol()
Returns:
The name of the chado column formerly known as featureprop.pkey_id

getPValCol

public java.lang.String getPValCol()
Returns:
The name of the chado column formerly known as featureprop.pkey_id

getFMinCol

public java.lang.String getFMinCol()
Returns:
The name of the chado column formerly known as featureloc.fmin

getFMaxCol

public java.lang.String getFMaxCol()
Returns:
The name of the chado column formerly known as featureloc.nend

getSubjFeatCol

public java.lang.String getSubjFeatCol()
Returns:
The name of the chado column formerly known as feature_relationship.subjfeature_id

getObjFeatCol

public java.lang.String getObjFeatCol()
Returns:
The name of the chado column formerly known as feature_relationship.objfeature_id

getAbbrevCol

public java.lang.String getAbbrevCol()
Returns:
The name of the chado column formerly known as organism.abbrev

getCvNameCol

public java.lang.String getCvNameCol()
Returns:
The name of the chado column formerly known as cv.cvname

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object