uk.ac.ebi.intact.util
Class BioSourceFactory

java.lang.Object
  |
  +--uk.ac.ebi.intact.util.BioSourceFactory

public class BioSourceFactory
extends java.lang.Object

That class his hidding the logic which allow to get a valid biosource from a taxid.

Version:
$Id: BioSourceFactory.java,v 1.5 2004/03/24 15:15:11 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)

Constructor Summary
BioSourceFactory(IntactHelper helper)
           
BioSourceFactory(IntactHelper helper, Institution institution)
           
BioSourceFactory(IntactHelper helper, Institution institution, int cacheSize)
           
 
Method Summary
 java.lang.String getUpToDateTaxid(java.lang.String taxid)
          Gives a valid taxid.
 BioSource getValidBioSource(java.lang.String aTaxId)
          Create or update a BioSource object from a taxid.
 void setLogger(org.apache.log4j.Logger logger)
          Set a logger to keep track of the internal processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BioSourceFactory

public BioSourceFactory(IntactHelper helper)
                 throws IntactException

BioSourceFactory

public BioSourceFactory(IntactHelper helper,
                        Institution institution)

BioSourceFactory

public BioSourceFactory(IntactHelper helper,
                        Institution institution,
                        int cacheSize)
Method Detail

setLogger

public void setLogger(org.apache.log4j.Logger logger)
Set a logger to keep track of the internal processing.

Parameters:
logger - the logger to set

getValidBioSource

public BioSource getValidBioSource(java.lang.String aTaxId)
                            throws IntactException
Create or update a BioSource object from a taxid.

Parameters:
aTaxId - The tax id to create/update a biosource for
Returns:
a valid, persistent BioSource
IntactException

getUpToDateTaxid

public java.lang.String getUpToDateTaxid(java.lang.String taxid)
                                  throws IntactException
Gives a valid taxid.

Parameters:
taxid - the original taxid
Returns:
a valid taxid (can be different from the original in case of obsoletness).
Throws:
IntactException - if an error occur when accessing IntAct or an inconstistancy.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk