com.compomics.util.experiment.identification
Class IdentificationDB

java.lang.Object
  extended by com.compomics.util.experiment.identification.IdentificationDB
All Implemented Interfaces:
Serializable

public class IdentificationDB
extends Object
implements Serializable

This class uses a database to manage identification matches.

Author:
Marc Vaudel
See Also:
Serialized Form

Field Summary
 String dbName
          The name which will be used for the database.
 
Constructor Summary
IdentificationDB(String folder, String name, boolean deleteOldDatabase, ObjectsCache objectCache)
          Constructor creating the database and the protein and protein parameters tables.
 
Method Summary
 void addMatch(IdentificationMatch match)
          Adds an identification match to the database.
 void addMatchParameter(String key, UrParameter urParameter)
          Deprecated. use match specific mapping instead
 void addPeptideMatch(PeptideMatch peptideMatch)
          Adds a peptide match to the database
 void addPeptideMatchParameter(String key, UrParameter urParameter)
          Adds a peptide match parameter to the database.
 void addProteinMatch(ProteinMatch proteinMatch)
          Adds a protein match to the database.
 void addProteinMatchParameter(String key, UrParameter urParameter)
          Adds a protein match parameter to the database.
 void addSpectrumMatch(SpectrumMatch spectrumMatch)
          Adds a spectrum match to the database.
 void addSpectrumMatchParameter(String key, UrParameter urParameter)
          Adds a spectrum match parameter to the database.
 void close()
          Closes the db connection.
 UrParameter getMatchPArameter(String key, UrParameter urParameter, boolean useDB)
          Deprecated. use match specific mapping instead
 String getParameterTable(UrParameter urParameter)
          Deprecated. use match specific mapping instead
 PeptideMatch getPeptideMatch(String key, boolean useDB)
          Returns the desired peptide match.
 UrParameter getPeptideMatchParameter(String key, UrParameter urParameter, boolean useDB)
          Returns the desired peptide match parameter.
 String getPeptideParameterTable(UrParameter urParameter)
          Returns the table name associated with the given peptide parameter.
 ProteinMatch getProteinMatch(String key, boolean useDB)
          Returns the desired protein match.
 UrParameter getProteinMatchParameter(String key, UrParameter urParameter, boolean useDB)
          Returns the desired protein match parameter.
 String getProteinParameterTable(UrParameter urParameter)
          Returns the table name associated with the given protein parameter.
 SpectrumMatch getSpectrumMatch(String key, boolean useDB)
          Returns the desired spectrum match.
 UrParameter getSpectrumMatchParameter(String key, UrParameter urParameter, boolean useDB)
          Returns the desired spectrum match parameter.
 String getSpectrumMatchTable(String spectrumKey)
          Returns the table name associated with the given spectrum key.
 String getSpectrumParameterTable(String spectrumKey, UrParameter urParameter)
          Returns the table name associated with the given spectrum parameter.
 void loadPeptideMatches(ArrayList<String> peptideKeys, WaitingHandler waitingHandler)
          Loads the desired peptide matches of the given type in the cache of the database.
 void loadPeptideMatches(WaitingHandler waitingHandler)
          Loads all peptide matches in the cache of the database.
 void loadPeptideMatchParameters(ArrayList<String> peptideKeys, UrParameter urParameter, WaitingHandler waitingHandler)
          Loads the desired peptide match parameters of the given type in the cache of the database.
 void loadPeptideMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler)
          Loads all peptide match parameters of the given type in the cache of the database.
 void loadProteinMatches(ArrayList<String> proteinKeys, WaitingHandler waitingHandler)
          Loads the desired protein matches of the given type in the cache of the database.
 void loadProteinMatches(WaitingHandler waitingHandler)
          Loads all protein matches in the cache of the database.
 void loadProteinMatchParameters(ArrayList<String> proteinKeys, UrParameter urParameter, WaitingHandler waitingHandler)
          Loads the desired protein match parameters of the given type in the cache of the database.
 void loadProteinMatchParameters(UrParameter urParameter, WaitingHandler waitingHandler)
          Loads all protein match parameters of the given type in the cache of the database.
 void loadSpectrumMatches(ArrayList<String> spectrumKeys, WaitingHandler waitingHandler)
          Loads all given spectrum matches in the cache of the database.
 void loadSpectrumMatches(String fileName, WaitingHandler waitingHandler)
          Loads all spectrum matches of the given file in the cache of the database.
 void loadSpectrumMatchParameters(ArrayList<String> spectrumKeys, UrParameter urParameter, WaitingHandler waitingHandler)
          Loads all desired spectrum match parameters in the cache of the database.
 void loadSpectrumMatchParameters(String fileName, UrParameter urParameter, WaitingHandler waitingHandler)
          Loads all spectrum match parameters of the given type in the cache of the database.
 boolean peptideMatchLoaded(String peptideKey)
          Indicates whether a peptide match is loaded.
 boolean proteinMatchLoaded(String proteinKey)
          Indicates whether a protein match is loaded.
 void removeMatch(String key)
          Deprecated. it is advised to use the specific psm/peptide/protein method instead
 void removePeptideMatch(String key)
          Deletes a peptide match from the database.
 void removeProteinMatch(String key)
          Deletes a protein match from the database.
 void removeSpectrumMatch(String key)
          Deletes a spectrum match from the database.
 boolean spectrumMatchLoaded(String spectrumKey)
          Indicates whether a spectrum match is loaded.
 void updateMatch(IdentificationMatch match)
          Updates a match.
 void updatePeptideMatch(PeptideMatch peptideMatch)
          Updates a peptide match.
 void updatePeptideParameter(String key, UrParameter urParameter)
          Updates a peptide match parameter.
 void updateProteinMatch(ProteinMatch proteinMatch)
          Updates a protein match.
 void updateProteinParameter(String key, UrParameter urParameter)
          Updates a protein match parameter.
 void updateSpectrumMatch(SpectrumMatch spectrumMatch)
          Updates a spectrum match.
 void updateSpectrumParameter(String key, UrParameter urParameter)
          Updates a spectrum match parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbName

public String dbName
The name which will be used for the database.

Constructor Detail

IdentificationDB

public IdentificationDB(String folder,
                        String name,
                        boolean deleteOldDatabase,
                        ObjectsCache objectCache)
                 throws SQLException
Constructor creating the database and the protein and protein parameters tables.

Parameters:
folder - the folder where to put the database
name -
deleteOldDatabase - if true, tries to delete the old database
objectCache -
Throws:
SQLException - an exception thrown whenever an error occurred while creating the database
Method Detail

spectrumMatchLoaded

public boolean spectrumMatchLoaded(String spectrumKey)
                            throws SQLException
Indicates whether a spectrum match is loaded.

Parameters:
spectrumKey - the spectrumMatch key
Returns:
a boolean indicating whether a spectrum match is loaded in the given table
Throws:
SQLException - exception thrown whenever an exception occurred while interrogating the database

peptideMatchLoaded

public boolean peptideMatchLoaded(String peptideKey)
                           throws SQLException
Indicates whether a peptide match is loaded.

Parameters:
peptideKey - the peptide key
Returns:
a boolean indicating whether a peptide match is loaded in the given table
Throws:
SQLException - exception thrown whenever an exception occurred while interrogating the database

proteinMatchLoaded

public boolean proteinMatchLoaded(String proteinKey)
                           throws SQLException
Indicates whether a protein match is loaded.

Parameters:
proteinKey - the protein key
Returns:
a boolean indicating whether a protein match is loaded in the given table
Throws:
SQLException - exception thrown whenever an exception occurred while interrogating the database

updateProteinMatch

public void updateProteinMatch(ProteinMatch proteinMatch)
                        throws SQLException,
                               IOException
Updates a protein match.

Parameters:
proteinMatch - the protein match
Throws:
SQLException - exception thrown whenever an error occurred while updating a match in the table
IOException - exception thrown whenever an error occurred while writing in the database

updatePeptideMatch

public void updatePeptideMatch(PeptideMatch peptideMatch)
                        throws SQLException,
                               IOException
Updates a peptide match.

Parameters:
peptideMatch - the peptide match
Throws:
SQLException - exception thrown whenever an error occurred while updating a match in the table
IOException - exception thrown whenever an error occurred while writing in the database

updateSpectrumMatch

public void updateSpectrumMatch(SpectrumMatch spectrumMatch)
                         throws SQLException,
                                IOException
Updates a spectrum match.

Parameters:
spectrumMatch - the spectrum match
Throws:
SQLException - exception thrown whenever an error occurred while updating a match in the table
IOException - exception thrown whenever an error occurred while writing in the database

updateMatch

public void updateMatch(IdentificationMatch match)
                 throws SQLException,
                        IOException
Updates a match.

Parameters:
match - the match to update
Throws:
SQLException - exception thrown whenever an error occurred while updating a match in the table
IOException - exception thrown whenever an error occurred while writing in the database

updateProteinParameter

public void updateProteinParameter(String key,
                                   UrParameter urParameter)
                            throws SQLException,
                                   IOException
Updates a protein match parameter.

Parameters:
key - the key of the protein match
urParameter - the parameter
Throws:
SQLException - exception thrown whenever an error occurred while updating the parameter in the table
IOException - exception thrown whenever an error occurred while writing in the database

updatePeptideParameter

public void updatePeptideParameter(String key,
                                   UrParameter urParameter)
                            throws SQLException,
                                   IOException
Updates a peptide match parameter.

Parameters:
key - the key of the peptide match
urParameter - the parameter
Throws:
SQLException - exception thrown whenever an error occurred while updating the parameter in the table
IOException - exception thrown whenever an error occurred while writing in the database

updateSpectrumParameter

public void updateSpectrumParameter(String key,
                                    UrParameter urParameter)
                             throws SQLException,
                                    IOException
Updates a spectrum match parameter.

Parameters:
key - the key of the spectrum match
urParameter - the parameter
Throws:
SQLException - exception thrown whenever an error occurred while updating the parameter in the table
IOException - exception thrown whenever an error occurred while writing in the database

removeProteinMatch

public void removeProteinMatch(String key)
                        throws SQLException,
                               IOException
Deletes a protein match from the database.

Parameters:
key - the key of the match
Throws:
SQLException - exception thrown whenever an error occurred while deleting the match
IOException

removePeptideMatch

public void removePeptideMatch(String key)
                        throws SQLException,
                               IOException
Deletes a peptide match from the database.

Parameters:
key - the key of the match
Throws:
SQLException - exception thrown whenever an error occurred while deleting the match
IOException

removeSpectrumMatch

public void removeSpectrumMatch(String key)
                         throws SQLException,
                                IOException
Deletes a spectrum match from the database.

Parameters:
key - the key of the match
Throws:
SQLException - exception thrown whenever an error occurred while deleting the match
IOException

removeMatch

public void removeMatch(String key)
                 throws SQLException,
                        IOException
Deprecated. it is advised to use the specific psm/peptide/protein method instead

Deletes a match from the database.

Parameters:
key - the key of the match
Throws:
SQLException - exception thrown whenever an error occurred while deleting the match
IOException

getSpectrumMatch

public SpectrumMatch getSpectrumMatch(String key,
                                      boolean useDB)
                               throws SQLException,
                                      IOException,
                                      ClassNotFoundException
Returns the desired spectrum match.

Parameters:
useDB - if useDB is false, null will be returned if the object is not in the cache
key - the psm key
Returns:
the spectrum match
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addSpectrumMatch

public void addSpectrumMatch(SpectrumMatch spectrumMatch)
                      throws SQLException,
                             IOException
Adds a spectrum match to the database.

Parameters:
spectrumMatch - the spectrum match to be added
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getPeptideMatch

public PeptideMatch getPeptideMatch(String key,
                                    boolean useDB)
                             throws SQLException,
                                    IOException,
                                    ClassNotFoundException
Returns the desired peptide match.

Parameters:
key - the peptide key
useDB - if useDB is false, null will be returned if the object is not in the cache
Returns:
the peptide match
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addPeptideMatch

public void addPeptideMatch(PeptideMatch peptideMatch)
                     throws SQLException,
                            IOException
Adds a peptide match to the database

Parameters:
peptideMatch - the peptide match to be added
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getProteinMatch

public ProteinMatch getProteinMatch(String key,
                                    boolean useDB)
                             throws SQLException,
                                    IOException,
                                    ClassNotFoundException
Returns the desired protein match.

Parameters:
key - the protein key
useDB - if useDB is false, null will be returned if the object is not in the cache
Returns:
the protein match
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addProteinMatch

public void addProteinMatch(ProteinMatch proteinMatch)
                     throws SQLException,
                            IOException
Adds a protein match to the database.

Parameters:
proteinMatch - the protein match to be added
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

addMatch

public void addMatch(IdentificationMatch match)
              throws SQLException,
                     IOException
Adds an identification match to the database.

Parameters:
match - the match to be added
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

loadPeptideMatchParameters

public void loadPeptideMatchParameters(UrParameter urParameter,
                                       WaitingHandler waitingHandler)
                                throws SQLException,
                                       IOException,
                                       ClassNotFoundException,
                                       InterruptedException
Loads all peptide match parameters of the given type in the cache of the database.

Parameters:
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadPeptideMatchParameters

public void loadPeptideMatchParameters(ArrayList<String> peptideKeys,
                                       UrParameter urParameter,
                                       WaitingHandler waitingHandler)
                                throws SQLException,
                                       IOException,
                                       ClassNotFoundException,
                                       InterruptedException
Loads the desired peptide match parameters of the given type in the cache of the database.

Parameters:
peptideKeys - the list of peptide keys of the parameters to load
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadPeptideMatches

public void loadPeptideMatches(ArrayList<String> peptideKeys,
                               WaitingHandler waitingHandler)
                        throws SQLException,
                               IOException,
                               ClassNotFoundException,
                               InterruptedException
Loads the desired peptide matches of the given type in the cache of the database.

Parameters:
peptideKeys - the list of peptide keys to load
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadProteinMatchParameters

public void loadProteinMatchParameters(UrParameter urParameter,
                                       WaitingHandler waitingHandler)
                                throws SQLException,
                                       IOException,
                                       ClassNotFoundException,
                                       InterruptedException
Loads all protein match parameters of the given type in the cache of the database.

Parameters:
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadProteinMatchParameters

public void loadProteinMatchParameters(ArrayList<String> proteinKeys,
                                       UrParameter urParameter,
                                       WaitingHandler waitingHandler)
                                throws SQLException,
                                       IOException,
                                       ClassNotFoundException,
                                       InterruptedException
Loads the desired protein match parameters of the given type in the cache of the database.

Parameters:
proteinKeys - the list of protein keys of the parameters to load
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadProteinMatches

public void loadProteinMatches(WaitingHandler waitingHandler)
                        throws SQLException,
                               IOException,
                               ClassNotFoundException,
                               InterruptedException
Loads all protein matches in the cache of the database.

Parameters:
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadProteinMatches

public void loadProteinMatches(ArrayList<String> proteinKeys,
                               WaitingHandler waitingHandler)
                        throws SQLException,
                               IOException,
                               ClassNotFoundException,
                               InterruptedException,
                               InterruptedException
Loads the desired protein matches of the given type in the cache of the database.

Parameters:
proteinKeys - the list of protein keys to load
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadPeptideMatches

public void loadPeptideMatches(WaitingHandler waitingHandler)
                        throws SQLException,
                               IOException,
                               ClassNotFoundException,
                               InterruptedException,
                               InterruptedException
Loads all peptide matches in the cache of the database.

Parameters:
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadSpectrumMatches

public void loadSpectrumMatches(String fileName,
                                WaitingHandler waitingHandler)
                         throws SQLException,
                                IOException,
                                ClassNotFoundException,
                                InterruptedException
Loads all spectrum matches of the given file in the cache of the database.

Parameters:
fileName - the file name
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadSpectrumMatches

public void loadSpectrumMatches(ArrayList<String> spectrumKeys,
                                WaitingHandler waitingHandler)
                         throws SQLException,
                                IOException,
                                ClassNotFoundException,
                                InterruptedException
Loads all given spectrum matches in the cache of the database.

Parameters:
spectrumKeys - the key of the spectrum matches to be loaded
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadSpectrumMatchParameters

public void loadSpectrumMatchParameters(String fileName,
                                        UrParameter urParameter,
                                        WaitingHandler waitingHandler)
                                 throws SQLException,
                                        IOException,
                                        ClassNotFoundException,
                                        InterruptedException
Loads all spectrum match parameters of the given type in the cache of the database.

Parameters:
fileName - the file name
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

loadSpectrumMatchParameters

public void loadSpectrumMatchParameters(ArrayList<String> spectrumKeys,
                                        UrParameter urParameter,
                                        WaitingHandler waitingHandler)
                                 throws SQLException,
                                        IOException,
                                        ClassNotFoundException,
                                        InterruptedException
Loads all desired spectrum match parameters in the cache of the database.

Parameters:
spectrumKeys - the key of the spectrum match of the parameters to be loaded
urParameter - the parameter type
waitingHandler - the waiting handler
Throws:
SQLException - exception thrown whenever an error occurred while interrogating the database
IOException - exception thrown whenever an error occurred while reading the database
ClassNotFoundException - exception thrown whenever the class of the object is not found when deserializing it.
InterruptedException

getSpectrumMatchParameter

public UrParameter getSpectrumMatchParameter(String key,
                                             UrParameter urParameter,
                                             boolean useDB)
                                      throws SQLException,
                                             IOException,
                                             ClassNotFoundException
Returns the desired spectrum match parameter.

Parameters:
key - the PSM key
urParameter - the match parameter
useDB - if useDB is false, null will be returned if the object is not in the cache
Returns:
the spectrum match parameter
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addSpectrumMatchParameter

public void addSpectrumMatchParameter(String key,
                                      UrParameter urParameter)
                               throws SQLException,
                                      IOException
Adds a spectrum match parameter to the database.

Parameters:
key - the PSM key
urParameter - the match parameter
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getPeptideMatchParameter

public UrParameter getPeptideMatchParameter(String key,
                                            UrParameter urParameter,
                                            boolean useDB)
                                     throws SQLException,
                                            IOException,
                                            ClassNotFoundException
Returns the desired peptide match parameter.

Parameters:
key - the peptide key
urParameter - the match parameter
useDB - if useDB is false, null will be returned if the object is not in the cache
Returns:
the peptide match parameter
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addPeptideMatchParameter

public void addPeptideMatchParameter(String key,
                                     UrParameter urParameter)
                              throws SQLException,
                                     IOException
Adds a peptide match parameter to the database.

Parameters:
key - the peptide key
urParameter - the match parameter
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getProteinMatchParameter

public UrParameter getProteinMatchParameter(String key,
                                            UrParameter urParameter,
                                            boolean useDB)
                                     throws SQLException,
                                            IOException,
                                            ClassNotFoundException
Returns the desired protein match parameter.

Parameters:
key - the protein key
urParameter - the match parameter
useDB - if useDB is false, null will be returned if the object is not in the cache
Returns:
the protein match parameter
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addProteinMatchParameter

public void addProteinMatchParameter(String key,
                                     UrParameter urParameter)
                              throws SQLException,
                                     IOException
Adds a protein match parameter to the database.

Parameters:
key - the protein key
urParameter - the match parameter
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getMatchPArameter

public UrParameter getMatchPArameter(String key,
                                     UrParameter urParameter,
                                     boolean useDB)
                              throws SQLException,
                                     IOException,
                                     ClassNotFoundException
Deprecated. use match specific mapping instead

Returns the desired match parameter.

Parameters:
key - the match key
useDB - if useDB is false, null will be returned if the object is not in the cache
urParameter - the match parameter
Returns:
the match match
Throws:
SQLException - exception thrown whenever an error occurred while loading the object from the database
IOException - exception thrown whenever an error occurred while reading the object in the database
ClassNotFoundException - exception thrown whenever an error occurred while casting the database input in the desired match class

addMatchParameter

public void addMatchParameter(String key,
                              UrParameter urParameter)
                       throws SQLException,
                              IOException
Deprecated. use match specific mapping instead

Adds a protein match parameter to the database.

Parameters:
key - the protein key
urParameter - the match parameter
Throws:
SQLException - exception thrown whenever an error occurred while adding the object in the database
IOException - exception thrown whenever an error occurred while writing the object

getSpectrumMatchTable

public String getSpectrumMatchTable(String spectrumKey)
Returns the table name associated with the given spectrum key.

Parameters:
spectrumKey - the given spectrum key
Returns:
the table name of the given spectrum

getSpectrumParameterTable

public String getSpectrumParameterTable(String spectrumKey,
                                        UrParameter urParameter)
Returns the table name associated with the given spectrum parameter.

Parameters:
spectrumKey - the given spectrum key
urParameter - the parameter
Returns:
the table name of the given spectrum parameter

getPeptideParameterTable

public String getPeptideParameterTable(UrParameter urParameter)
Returns the table name associated with the given peptide parameter.

Parameters:
urParameter - the parameter
Returns:
the table name of the given peptide parameter

getProteinParameterTable

public String getProteinParameterTable(UrParameter urParameter)
Returns the table name associated with the given protein parameter.

Parameters:
urParameter - the parameter
Returns:
the table name of the given protein parameter

getParameterTable

public String getParameterTable(UrParameter urParameter)
Deprecated. use match specific mapping instead

Returns the table name associated with the given parameter.

Parameters:
urParameter - the parameter
Returns:
the table name of the given protein parameter

close

public void close()
           throws SQLException
Closes the db connection.

Throws:
SQLException - exception thrown whenever an error occurred while closing the database connection


Copyright © 2013. All Rights Reserved.