public class PeptideMatchesIterator extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
defaultBatchSize
The default batch size.
|
double |
defaultMargin
The default margin to use to start batch loading before the loading index
is reached.
|
| Constructor and Description |
|---|
PeptideMatchesIterator(ArrayList<String> peptideKeys,
Identification identification,
ArrayList<UrParameter> peptideParameters,
boolean loadPsms,
ArrayList<UrParameter> psmParameters,
WaitingHandler waitingHandler)
Constructor.
|
PeptideMatchesIterator(ArrayList<String> peptideKeys,
Identification identification,
ArrayList<UrParameter> peptideParameters,
WaitingHandler waitingHandler)
Constructor.
|
PeptideMatchesIterator(Identification identification,
ArrayList<UrParameter> peptideParameters,
boolean loadPsms,
ArrayList<UrParameter> psmParameters,
WaitingHandler waitingHandler)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Indicates whether the iterator is done iterating.
|
PeptideMatch |
next()
Returns the next match and updates the buffer.
|
void |
setBatchSize(int batchSize)
Set the batch size.
|
public final int defaultBatchSize
public final double defaultMargin
public PeptideMatchesIterator(ArrayList<String> peptideKeys, Identification identification, ArrayList<UrParameter> peptideParameters, boolean loadPsms, ArrayList<UrParameter> psmParameters, WaitingHandler waitingHandler)
peptideKeys - the keys of the peptides to iterateidentification - the identification where to get the matches frompeptideParameters - the parameters to load along with the peptide
matchesloadPsms - if true the PSMs of the peptides will be batch loaded
along with the matchespsmParameters - the parameters to load along with the matcheswaitingHandler - the waiting handlerpublic PeptideMatchesIterator(Identification identification, ArrayList<UrParameter> peptideParameters, boolean loadPsms, ArrayList<UrParameter> psmParameters, WaitingHandler waitingHandler)
identification - the identification where to get the matches frompeptideParameters - the parameters to load along with the peptide
matchesloadPsms - if true the PSMs of the peptides will be batch loaded
along with the matchespsmParameters - the parameters to load along with the matcheswaitingHandler - the waiting handlerpublic PeptideMatchesIterator(ArrayList<String> peptideKeys, Identification identification, ArrayList<UrParameter> peptideParameters, WaitingHandler waitingHandler)
peptideKeys - the keys of the peptides to iterateidentification - the identification where to get the matches frompeptideParameters - the parameters to load along with the peptide
matcheswaitingHandler - the waiting handlerpublic boolean hasNext()
public PeptideMatch next() throws SQLException, IOException, ClassNotFoundException, InterruptedException
SQLException - exception thrown whenever an error occurred while
interacting with the matches databaseIOException - exception thrown whenever an error occurred while
interacting with the matches databaseClassNotFoundException - exception thrown whenever an error
occurred while deserializing a match from the databaseInterruptedException - exception thrown whenever a threading issue
occurred while retrieving the matchpublic void setBatchSize(int batchSize)
batchSize - the batch sizeCopyright © 2016. All rights reserved.