edu.mssm.crover.tools.tissue
Class TissueInfo_MemoryImpl

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

public class TissueInfo_MemoryImpl
extends java.lang.Object
implements TissueInfo

Keeps TissueInfo in memory. This class reads a file representation of TissueInfo and keeps the record in memory.


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.
 TissueDetails getDetails(java.lang.String ac)
          Return the tissue information associated with a sequence accession code.
static TissueInfo_MemoryImpl getInstance()
           
static TissueInfo_MemoryImpl getInstance(java.io.BufferedReader ti_to, java.io.BufferedReader ti_seq, java.lang.String[] organisms)
           
static TissueInfo_MemoryImpl getInstance(java.lang.String[] organisms)
          Obtains the singleton instance.
static TissueInfo_MemoryImpl getInstance(java.lang.String ti_to, java.lang.String ti_seq)
          Obtain the singleton instance.
static TissueInfo_MemoryImpl getInstance(java.lang.String ti_to, java.lang.String ti_seq, java.lang.String[] organisms)
           
 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 several sequence accession codes.
 void loadTiSeq(java.io.BufferedReader ti_seq)
          Loads a file representation of TissueInfo.
 void loadTiTo(java.io.BufferedReader ti_to)
          Loads a file representation of TissueInfo.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TissueInfo_MemoryImpl getInstance()
                                         throws java.io.IOException,
                                                TissueInfoNotAvailableException
java.io.IOException
TissueInfoNotAvailableException

getInstance

public static TissueInfo_MemoryImpl getInstance(java.lang.String[] organisms)
                                         throws java.io.IOException,
                                                TissueInfoNotAvailableException
Obtains the singleton instance. The filesnames needed to initialize this instance are taken from the properties
  • tissueinfo.path.ti_to: ti_to file.
  • tissueinfo.path.ti_seq: ti_seq file.

    java.io.IOException
    TissueInfoNotAvailableException

  • getInstance

    public static TissueInfo_MemoryImpl getInstance(java.lang.String ti_to,
                                                    java.lang.String ti_seq)
                                             throws java.io.IOException,
                                                    TissueInfoNotAvailableException
    Obtain the singleton instance.

    java.io.IOException
    TissueInfoNotAvailableException

    getInstance

    public static TissueInfo_MemoryImpl getInstance(java.lang.String ti_to,
                                                    java.lang.String ti_seq,
                                                    java.lang.String[] organisms)
                                             throws java.io.IOException,
                                                    TissueInfoNotAvailableException
    java.io.IOException
    TissueInfoNotAvailableException

    getInstance

    public static TissueInfo_MemoryImpl getInstance(java.io.BufferedReader ti_to,
                                                    java.io.BufferedReader ti_seq,
                                                    java.lang.String[] organisms)
                                             throws TissueInfoNotAvailableException
    TissueInfoNotAvailableException

    loadTiTo

    public void loadTiTo(java.io.BufferedReader ti_to)
                  throws TissueInfoNotAvailableException
    Loads a file representation of TissueInfo.

    TissueInfoNotAvailableException

    loadTiSeq

    public void loadTiSeq(java.io.BufferedReader ti_seq)
                   throws TissueInfoNotAvailableException
    Loads a file representation of 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

    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

    getTissues

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

    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

    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. Subsequent use of methods of this instance is allowed.

    Specified by:
    empty in interface TissueInfo
    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

    main

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


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