TissueInfo API 20091124110011

edu.mssm.crover.tools.tissue
Class TissueInfoNullsJDBCImpl

java.lang.Object
  extended by edu.mssm.crover.tools.tissue.TissueInfoNullsJDBCImpl

public final class TissueInfoNullsJDBCImpl
extends Object

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.null.name Name of the tiNull table. tissueinfo.column.length.ac Length of the accession code column in the tissueinfo table. tissueinfo.column.length.rawtissue Length of the tissue column in the tissueinfo table. tissueinfo.column.length.curatedtissue Length of the tissue column in the tissueinfo table. tissueinfo.column.length.organism Length of the organism column in the tissueinfo table.


Field Summary
protected static int AC_COLNUM
          The column index for the accession code.
protected static int CTISSUE_COLNUM
          The column index for the curated tissue.
protected static int RTISSUE_COLNUM
          The column index for the raw tissue.
 
Method Summary
 void addInfo(String ac, String organism, String rawTissue, String curatedTissue)
          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()
          Clean up.
 String getCuratedTissue(String ac)
          Return the tissue information associated with a sequence accession code.
 String[] getCuratedTissues(String[] ac)
          Return the tissue information associated with a set of sequence accession codes.
 NullTissueDetails getDetails(String ac)
          Return the tissue information associated with a sequence accession code.
static TissueInfoNullsJDBCImpl getInstance()
          Gets an instance of this class.
 String getOrganism(String ac)
          Return the organism associated with a sequence accession code.
 String getRawTissue(String ac)
          Return the tissue information associated with a sequence accession code.
 String[] getRawTissues(String[] ac)
          Return the tissue information associated with a set of sequence accession codes.
static void main(String[] args)
          Main method.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AC_COLNUM

protected static final int AC_COLNUM
The column index for the accession code.

See Also:
Constant Field Values

RTISSUE_COLNUM

protected static final int RTISSUE_COLNUM
The column index for the raw tissue.

See Also:
Constant Field Values

CTISSUE_COLNUM

protected static final int CTISSUE_COLNUM
The column index for the curated tissue.

See Also:
Constant Field Values
Method Detail

finalize

protected void finalize()
                 throws Throwable
Clean up.

Overrides:
finalize in class Object
Throws:
Throwable - if an Exception occurs.

getInstance

public static TissueInfoNullsJDBCImpl getInstance()
                                           throws TissueInfoNotAvailableException
Gets an instance of this class.

Returns:
the instance
Throws:
TissueInfoNotAvailableException - if the database is unavailable

begin

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

Throws:
TissueInfoNotAvailableException - if the database is unavailable

end

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


destroy

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

Throws:
TissueInfoNotAvailableException - if the database is unavailable

empty

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

Throws:
TissueInfoNotAvailableException - if the database is unavailable

getRawTissue

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

Parameters:
ac - The accession code
Returns:
the raw tissue information
Throws:
TissueInfoNotAvailableException - if the database is unavailable

getCuratedTissue

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

Parameters:
ac - The accession code
Returns:
the curated tissue information
Throws:
TissueInfoNotAvailableException - if the database is unavailable

getDetails

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

Parameters:
ac - The accession code
Returns:
the tissue details
Throws:
TissueInfoNotAvailableException - if the database is unavailable

getRawTissues

public String[] getRawTissues(String[] ac)
                       throws TissueInfoNotAvailableException
Return the tissue information associated with a set of sequence accession codes.

Parameters:
ac - The accession codes
Returns:
the tissue information
Throws:
TissueInfoNotAvailableException - if the database is unavailable

getCuratedTissues

public String[] getCuratedTissues(String[] ac)
                           throws TissueInfoNotAvailableException
Return the tissue information associated with a set of sequence accession codes.

Parameters:
ac - The accession codes
Returns:
the tissue information
Throws:
TissueInfoNotAvailableException - if the database is unavailable

getOrganism

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

Parameters:
ac - The accession code
Returns:
the associated organism
Throws:
TissueInfoNotAvailableException - if the database is unavailable

addInfo

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

Parameters:
ac - The accession code
organism - The organism associated with the accession code
rawTissue - The raw tissue associated with the accession code
curatedTissue - The curated tissue associated with the accession code
Throws:
TissueInfoNotAvailableException - if the database is unavailable

main

public static void main(String[] args)
Main method.

Parameters:
args - The command line arguments

TissueInfo API 20091124110011

Copyright © 2001-2009 Institute for Computational Biomedicine, All Rights Reserved.