|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.identification.IdentificationDB
public class IdentificationDB
This class uses a database to manage identification matches.
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)
Deprecated. use match specific mapping instead |
String |
getParameterTable(UrParameter urParameter)
Deprecated. use match specific mapping instead |
PeptideMatch |
getPeptideMatch(String key)
Returns the desired peptide match. |
UrParameter |
getPeptideMatchParameter(String key,
UrParameter urParameter)
Returns the desired peptide match parameter. |
String |
getPeptideParameterTable(UrParameter urParameter)
Returns the table name associated with the given peptide parameter. |
ProteinMatch |
getProteinMatch(String key)
Returns the desired protein match. |
UrParameter |
getProteinMatchParameter(String key,
UrParameter urParameter)
Returns the desired protein match parameter. |
String |
getProteinParameterTable(UrParameter urParameter)
Returns the table name associated with the given protein parameter. |
SpectrumMatch |
getSpectrumMatch(String key)
Returns the desired spectrum match. |
UrParameter |
getSpectrumMatchParameter(String key,
UrParameter urParameter)
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 |
loadPeptideMatchParameters(UrParameter urParameter,
ProgressDialogX progressDialog)
Loads all spectrum match parameters of the given type in the cache of the database. |
void |
loadProteinMatches(ProgressDialogX progressDialog)
Loads all spectrum match parameters of the given type in the cache of the database. |
void |
loadProteinMatchParameters(UrParameter urParameter,
ProgressDialogX progressDialog)
Loads all spectrum match parameters of the given type in the cache of the database. |
void |
loadSpectrumMatches(String fileName,
ProgressDialogX progressDialog)
Loads all spectrum matches of the given file in the cache of the database. |
void |
loadSpectrumMatchParameters(String fileName,
UrParameter urParameter,
ProgressDialogX progressDialog)
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 |
---|
public String dbName
Constructor Detail |
---|
public IdentificationDB(String folder, String name, boolean deleteOldDatabase, ObjectsCache objectCache) throws SQLException
folder
- the folder where to put the databasename
- deleteOldDatabase
- if true, tries to delete the old databaseobjectCache
-
SQLException
- an exception thrown whenever an error occurred while
creating the databaseMethod Detail |
---|
public boolean spectrumMatchLoaded(String spectrumKey) throws SQLException
spectrumKey
- the spectrumMatch key
SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic boolean peptideMatchLoaded(String peptideKey) throws SQLException
peptideKey
- the peptide key
SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic boolean proteinMatchLoaded(String proteinKey) throws SQLException
proteinKey
- the protein key
SQLException
- exception thrown whenever an exception occurred
while interrogating the databasepublic void updateProteinMatch(ProteinMatch proteinMatch) throws SQLException, IOException
proteinMatch
- the protein match
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 databasepublic void updatePeptideMatch(PeptideMatch peptideMatch) throws SQLException, IOException
peptideMatch
- the peptide match
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 databasepublic void updateSpectrumMatch(SpectrumMatch spectrumMatch) throws SQLException, IOException
spectrumMatch
- the spectrum match
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 databasepublic void updateMatch(IdentificationMatch match) throws SQLException, IOException
match
- the match to update
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 databasepublic void updateProteinParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the key of the protein matchurParameter
- the parameter
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 databasepublic void updatePeptideParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the key of the peptide matchurParameter
- the parameter
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 databasepublic void updateSpectrumParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the key of the spectrum matchurParameter
- the parameter
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 databasepublic void removeProteinMatch(String key) throws SQLException, IOException
key
- the key of the match
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removePeptideMatch(String key) throws SQLException, IOException
key
- the key of the match
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removeSpectrumMatch(String key) throws SQLException, IOException
key
- the key of the match
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public void removeMatch(String key) throws SQLException, IOException
key
- the key of the match
SQLException
- exception thrown whenever an error occurred while
deleting the match
IOException
public SpectrumMatch getSpectrumMatch(String key) throws SQLException, IOException, ClassNotFoundException
key
- the psm key
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 classpublic void addSpectrumMatch(SpectrumMatch spectrumMatch) throws SQLException, IOException
spectrumMatch
- the spectrum match to be added
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic PeptideMatch getPeptideMatch(String key) throws SQLException, IOException, ClassNotFoundException
key
- the peptide key
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 classpublic void addPeptideMatch(PeptideMatch peptideMatch) throws SQLException, IOException
peptideMatch
- the peptide match to be added
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic ProteinMatch getProteinMatch(String key) throws SQLException, IOException, ClassNotFoundException
key
- the protein key
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 classpublic void addProteinMatch(ProteinMatch proteinMatch) throws SQLException, IOException
proteinMatch
- the protein match to be added
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void addMatch(IdentificationMatch match) throws SQLException, IOException
match
- the match to be added
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic void loadSpectrumMatchParameters(String fileName, UrParameter urParameter, ProgressDialogX progressDialog) throws SQLException, IOException, ClassNotFoundException
fileName
- the file nameurParameter
- the parameter typeprogressDialog
- the progress dialog
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.public void loadPeptideMatchParameters(UrParameter urParameter, ProgressDialogX progressDialog) throws SQLException, IOException, ClassNotFoundException
urParameter
- the parameter typeprogressDialog
- the progress dialog
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.public void loadProteinMatchParameters(UrParameter urParameter, ProgressDialogX progressDialog) throws SQLException, IOException, ClassNotFoundException
urParameter
- the parameter typeprogressDialog
- the progress dialog
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.public void loadProteinMatches(ProgressDialogX progressDialog) throws SQLException, IOException, ClassNotFoundException
progressDialog
- the progress dialog
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.public void loadSpectrumMatches(String fileName, ProgressDialogX progressDialog) throws SQLException, IOException, ClassNotFoundException
fileName
- the file nameprogressDialog
- the progress dialog
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.public UrParameter getSpectrumMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the psm keyurParameter
- the match parameter
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 classpublic void addSpectrumMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the psm keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getPeptideMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the peptide keyurParameter
- the match parameter
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 classpublic void addPeptideMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the peptide keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getProteinMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the protein keyurParameter
- the match parameter
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 classpublic void addProteinMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the protein keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic UrParameter getMatchPArameter(String key, UrParameter urParameter) throws SQLException, IOException, ClassNotFoundException
key
- the match keyurParameter
- the match parameter
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 classpublic void addMatchParameter(String key, UrParameter urParameter) throws SQLException, IOException
key
- the protein keyurParameter
- the match parameter
SQLException
- exception thrown whenever an error occurred while
adding the object in the database
IOException
- exception thrown whenever an error occurred while
writing the objectpublic String getSpectrumMatchTable(String spectrumKey)
spectrumKey
- the given spectrum key
public String getSpectrumParameterTable(String spectrumKey, UrParameter urParameter)
spectrumKey
- the given spectrum keyurParameter
- the parameter
public String getPeptideParameterTable(UrParameter urParameter)
urParameter
- the parameter
public String getProteinParameterTable(UrParameter urParameter)
urParameter
- the parameter
public String getParameterTable(UrParameter urParameter)
urParameter
- the parameter
public void close() throws SQLException
SQLException
- exception thrown whenever an error occurred while
closing the database connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |