edu.mssm.crover.tools.tissue
Class TissueInfo_JDBCImpl

java.lang.Object
  |
  +--edu.mssm.crover.tools.tissue.TissueInfo_JDBCImpl
All Implemented Interfaces:
TissueInfo

public class TissueInfo_JDBCImpl
extends java.lang.Object
implements TissueInfo

Provides access to tissue information for sequences. This interface is implemented with a JDBC-aware class that connects to a database and retrieves the requested information. The database is loaded with information with DbEstParser, from the dbEst division of genbank. The following properties are obtained through CLI and alter the behaviour of this class: tissueinfo.table.name Name of the tissueinfo table. tissueinfo.column.length.ac Length of the accession code column in the tissueinfo table. tissueinfo.column.length.ac Length of the tissue column in the tissueinfo table. tissueinfo.column.length.ac Length of the organism column in the tissueinfo table.


Field Summary
protected static int AC_COLNUM
           
static boolean DEBUG
           
 java.lang.String TI_SEQ_TABLENAME
          Name for table (ac,toKey)
 java.lang.String TI_TO_TABLENAME
          Name for table (toKey, Tissue, Organism)
 java.lang.String TI_TOKEYID_SEQNAME
           
protected static int TISSUE_COLNUM
           
 
Method Summary
 void addInfo(java.lang.String ac, java.lang.String tissue, java.lang.String organism)
          Add a new tissue information to TissueInfo.
 void begin()
          Notifies this class that a batch of interaction now begin.
 void destroy()
          Destroy all TissueInfo data and tables.
 void empty()
          Empty TissueInfo.
 void end()
          Notifies this class that a batch of interaction now ends.
protected  void finalize()
           
 TissueDetails getDetails(java.lang.String ac)
          Return the tissue information associated with a sequence accession code.
static TissueInfo_JDBCImpl getInstance()
           
 java.lang.String getOrganism(java.lang.String ac)
          Return the organism associated with a sequence accession code.
 java.lang.String getTissue(java.lang.String ac)
          Return the tissue information associated with a sequence accession code.
 java.lang.String[] getTissues(java.lang.String[] ac)
          Return the tissue information associated with a sequence accession code.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG

TI_SEQ_TABLENAME

public final java.lang.String TI_SEQ_TABLENAME
Name for table (ac,toKey)


TI_TO_TABLENAME

public final java.lang.String TI_TO_TABLENAME
Name for table (toKey, Tissue, Organism)


TI_TOKEYID_SEQNAME

public final java.lang.String TI_TOKEYID_SEQNAME

AC_COLNUM

protected static int AC_COLNUM

TISSUE_COLNUM

protected static int TISSUE_COLNUM
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
java.lang.Throwable

getInstance

public static TissueInfo_JDBCImpl getInstance()
                                       throws TissueInfoNotAvailableException
TissueInfoNotAvailableException

begin

public void begin()
           throws TissueInfoNotAvailableException
Notifies this class that a batch of interaction now begin. Allows specific optimization to be performed.

Specified by:
begin in interface TissueInfo
TissueInfoNotAvailableException

end

public void end()
         throws TissueInfoNotAvailableException
Notifies this class that a batch of interaction now ends. Allows specific optimization to be performed.

Specified by:
end in interface TissueInfo
TissueInfoNotAvailableException

destroy

public void destroy()
             throws TissueInfoNotAvailableException
Destroy all TissueInfo data and tables. Subsequent use of methods of this instance will raise TissueInfoNotAvailableException exceptions.

Specified by:
destroy in interface TissueInfo
TissueInfoNotAvailableException

empty

public void empty()
           throws TissueInfoNotAvailableException
Empty TissueInfo. All data previously stored in TissueInfo is removed.

Specified by:
empty in interface TissueInfo
TissueInfoNotAvailableException

getTissue

public java.lang.String getTissue(java.lang.String ac)
                           throws TissueInfoNotAvailableException
Return the tissue information associated with a sequence accession code.

Specified by:
getTissue in interface TissueInfo
Returns:
the tissue information or null if ac is not found in TissueInfo
TissueInfoNotAvailableException

getDetails

public TissueDetails getDetails(java.lang.String ac)
                         throws TissueInfoNotAvailableException
Return the tissue information associated with a sequence accession code.

Specified by:
getDetails in interface TissueInfo
Returns:
the tissue information or null if ac is not found in TissueInfo
TissueInfoNotAvailableException

getTissues

public java.lang.String[] getTissues(java.lang.String[] ac)
                              throws TissueInfoNotAvailableException
Return the tissue information associated with a sequence accession code.

Specified by:
getTissues in interface TissueInfo
Returns:
An array of tissue information or nulls when the corresponding ac is not found in TissueInfo
TissueInfoNotAvailableException

getOrganism

public java.lang.String getOrganism(java.lang.String ac)
                             throws TissueInfoNotAvailableException
Return the organism associated with a sequence accession code.

Specified by:
getOrganism in interface TissueInfo
Returns:
the organism information or null if ac is not found in TissueInfo
TissueInfoNotAvailableException

addInfo

public void addInfo(java.lang.String ac,
                    java.lang.String tissue,
                    java.lang.String organism)
             throws TissueInfoNotAvailableException
Add a new tissue information to TissueInfo. Silently ignores duplicate information.

Specified by:
addInfo in interface TissueInfo
TissueInfoNotAvailableException

main

public static void main(java.lang.String[] args)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.