|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.quantification.QuantificationDB
public class QuantificationDB
This class uses a database to manage quantification matches.
Field Summary | |
---|---|
java.lang.String |
dbName
The name which will be used for the database. |
Constructor Summary | |
---|---|
QuantificationDB(java.lang.String folder,
java.lang.String name,
boolean deleteOldDatabase,
ObjectsCache objectsCache)
Constructor creating the database and the protein and protein parameters tables. |
Method Summary | |
---|---|
void |
addMatch(QuantificationMatch match)
Adds an quantification match to the database. |
void |
addPeptideMatch(PeptideQuantification peptideMatch)
Adds a peptide match to the database. |
void |
addPeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a peptide match parameter to the database. |
void |
addProteinMatch(ProteinQuantification proteinMatch)
Adds a protein match to the database. |
void |
addProteinMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a protein match parameter to the database. |
void |
addSpectrumMatch(PsmQuantification spectrumMatch)
Adds a spectrum match to the database. |
void |
addSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
Adds a spectrum match parameter to the database. |
void |
close()
Closes the db connection. |
void |
establishConnection(java.lang.String dbFolder,
boolean deleteOldDatabase,
ObjectsCache objectsCache)
Establishes connection to the database. |
PeptideQuantification |
getPeptideMatch(java.lang.String key)
Returns the desired peptide match. |
UrParameter |
getPeptideMatchParameter(java.lang.String key,
UrParameter urParameter)
Returns the desired peptide match parameter. |
java.lang.String |
getPeptideParameterTable(UrParameter urParameter)
Returns the table name associated to the given peptide parameter. |
ProteinQuantification |
getProteinMatch(java.lang.String key)
Returns the desired protein match. |
UrParameter |
getProteinMatchPArameter(java.lang.String key,
UrParameter urParameter)
Returns the desired protein match parameter. |
java.lang.String |
getProteinParameterTable(UrParameter urParameter)
Returns the table name associated to the given protein parameter. |
PsmQuantification |
getSpectrumMatch(java.lang.String key)
Returns the desired spectrum match. |
UrParameter |
getSpectrumMatchParameter(java.lang.String key,
UrParameter urParameter)
Returns the desired spectrum match parameter. |
java.lang.String |
getSpectrumMatchTable(java.lang.String spectrumKey)
Returns the table name associated to the given spectrum key. |
java.lang.String |
getSpectrumParameterTable(java.lang.String spectrumKey,
UrParameter urParameter)
Returns the table name associated to the given spectrum parameter. |
boolean |
peptideMatchLoaded(java.lang.String peptideKey)
Indicates whether a peptide match is loaded. |
boolean |
proteinMatchLoaded(java.lang.String proteinKey)
Indicates whether a protein match is loaded. |
void |
removePeptideMatch(java.lang.String key)
Deletes a peptide match from the database. |
void |
removeProteinMatch(java.lang.String key)
Deletes a protein match from the database. |
void |
removeSpectrumMatch(java.lang.String key)
Deletes a spectrum match from the database. |
boolean |
spectrumMatchLoaded(java.lang.String spectrumKey)
Indicates whether a spectrum match is loaded. |
void |
updateMatch(QuantificationMatch match)
Updates a match. |
void |
updatePeptideMatch(PeptideQuantification peptideMatch)
Updates a peptide match. |
void |
updatePeptideParameter(java.lang.String key,
UrParameter urParameter)
Updates a peptide match parameter. |
void |
updateProteinMatch(ProteinQuantification proteinMatch)
Updates a protein match. |
void |
updateProteinParameter(java.lang.String key,
UrParameter urParameter)
Updates a protein match parameter. |
void |
updateSpectrumMatch(PsmQuantification spectrumMatch)
Updates a spectrum match. |
void |
updateSpectrumParameter(java.lang.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 |
---|
public java.lang.String dbName
Constructor Detail |
---|
public QuantificationDB(java.lang.String folder, java.lang.String name, boolean deleteOldDatabase, ObjectsCache objectsCache) throws java.sql.SQLException
folder
- the folder where to put the databasename
- the database namedeleteOldDatabase
- if true, tries to delete the old databaseobjectsCache
- the object cache
java.sql.SQLException
- an exception thrown whenever an error occurred while
creating the databaseMethod Detail |
---|
public boolean spectrumMatchLoaded(java.lang.String spectrumKey) throws java.sql.SQLException
spectrumKey
- the spectrumMatch key
java.sql.SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic boolean peptideMatchLoaded(java.lang.String peptideKey) throws java.sql.SQLException
peptideKey
- the peptide key
java.sql.SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic boolean proteinMatchLoaded(java.lang.String proteinKey) throws java.sql.SQLException
proteinKey
- the protein key
java.sql.SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic void updateProteinMatch(ProteinQuantification proteinMatch) throws java.sql.SQLException, java.io.IOException
proteinMatch
- the protein match
java.sql.SQLException
- exception thrown whenever an error occurred while
updating a match in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updatePeptideMatch(PeptideQuantification peptideMatch) throws java.sql.SQLException, java.io.IOException
peptideMatch
- the peptide match
java.sql.SQLException
- exception thrown whenever an error occurred while
updating a match in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updateSpectrumMatch(PsmQuantification spectrumMatch) throws java.sql.SQLException, java.io.IOException
spectrumMatch
- the spectrum match
java.sql.SQLException
- exception thrown whenever an error occurred while
updating a match in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updateMatch(QuantificationMatch match) throws java.sql.SQLException, java.io.IOException
match
- the match to update
java.sql.SQLException
- exception thrown whenever an error occurred while
updating a match in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updateProteinParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the key of the protein matchurParameter
- the parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
updating the parameter in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updatePeptideParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the key of the peptide matchurParameter
- the parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
updating the parameter in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void updateSpectrumParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the key of the spectrum matchurParameter
- the parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
updating the parameter in the table
java.io.IOException
- exception thrown whenever an error occurred while
writing in the databasepublic void removeProteinMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException
key
- the key of the match
java.sql.SQLException
- exception thrown whenever an error occurred while
deleting the match
java.io.IOException
public void removePeptideMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException
key
- the key of the match
java.sql.SQLException
- exception thrown whenever an error occurred while
deleting the match
java.io.IOException
public void removeSpectrumMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException
key
- the key of the match
java.sql.SQLException
- exception thrown whenever an error occurred while
deleting the match
java.io.IOException
public PsmQuantification getSpectrumMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the psm key
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addSpectrumMatch(PsmQuantification spectrumMatch) throws java.sql.SQLException, java.io.IOException
spectrumMatch
- the spectrum match to be added
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic PeptideQuantification getPeptideMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the peptide key
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addPeptideMatch(PeptideQuantification peptideMatch) throws java.sql.SQLException, java.io.IOException
peptideMatch
- the peptide match to be added
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic ProteinQuantification getProteinMatch(java.lang.String key) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the protein key
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addProteinMatch(ProteinQuantification proteinMatch) throws java.sql.SQLException, java.io.IOException
proteinMatch
- the protein match to be added
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getSpectrumMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the psm keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addSpectrumMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the psm keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getPeptideMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the peptide keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addPeptideMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the peptide keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getProteinMatchPArameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
key
- the protein keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
loading the object from the database
java.io.IOException
- exception thrown whenever an error occurred while
reading the object in the database
java.lang.ClassNotFoundException
- exception thrown whenever an error
occurred while casting the database input in the desired match classpublic void addProteinMatchParameter(java.lang.String key, UrParameter urParameter) throws java.sql.SQLException, java.io.IOException
key
- the protein keyurParameter
- the match parameter
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the objectpublic java.lang.String getSpectrumMatchTable(java.lang.String spectrumKey)
spectrumKey
- the given spectrum key
public java.lang.String getSpectrumParameterTable(java.lang.String spectrumKey, UrParameter urParameter)
spectrumKey
- the given spectrum keyurParameter
- the parameter
public java.lang.String getPeptideParameterTable(UrParameter urParameter)
urParameter
- the parameter
public java.lang.String getProteinParameterTable(UrParameter urParameter)
urParameter
- the parameter
public void close() throws java.sql.SQLException
java.sql.SQLException
- exception thrown whenever an error occurred while
closing the database connectionpublic void establishConnection(java.lang.String dbFolder, boolean deleteOldDatabase, ObjectsCache objectsCache) throws java.sql.SQLException
dbFolder
- the absolute path to the folder where the database is
locateddeleteOldDatabase
- if true, tries to delete the old databaseobjectsCache
-
java.sql.SQLException
- exception thrown whenever an error occurred while
establishing the connectionpublic void addMatch(QuantificationMatch match) throws java.sql.SQLException, java.io.IOException
match
- the match to be added
java.sql.SQLException
- exception thrown whenever an error occurred while
adding the object in the database
java.io.IOException
- exception thrown whenever an error occurred while
writing the object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |