fr.profi.mzdb.io.reader.cache.RunSliceHeaderAsyncReader Maven / Gradle / Ivy
package fr.profi.mzdb.io.reader.cache;
import java.util.HashMap;
import java.util.Map;
import com.almworks.sqlite4java.SQLiteException;
import rx.Observable;
import fr.profi.mzdb.MzDbAsyncReader;
import fr.profi.mzdb.model.RunSliceHeader;
// TODO: Auto-generated Javadoc
/**
* The Class RunSliceHeaderReader.
*
* @author David Bouyssie
*/
public class RunSliceHeaderAsyncReader extends AbstractRunSliceHeaderReader {
/** The mzDB reader. */
private MzDbAsyncReader mzDbReader = null;
/**
* Instantiates a new run slice header reader.
*
* @param mzDbReader
* the mz db reader
*/
public RunSliceHeaderAsyncReader(MzDbAsyncReader mzDbReader) {
super(mzDbReader);
this.mzDbReader = mzDbReader;
}
/** specialized getter */
public MzDbAsyncReader getMzDbReader() {
return this.mzDbReader;
}
/**
* Gets the run slices.
*
* @return array of runSlice instance without data associated
* @throws SQLiteException
* the SQLite exception
*/
public Observable getRunSliceHeaders() {
return mzDbReader.observeJobExecution( connection -> {
return this.getRunSliceHeaders(connection);
});
}
/**
* Gets the run slices.
*
* @param msLevel
* the ms level
* @return array of runSlice instance without data associated
* @throws SQLiteException
* the SQLite exception
*/
public Observable getRunSliceHeaders(int msLevel) {
return mzDbReader.observeJobExecution( connection -> {
return this.getRunSliceHeaders(msLevel, connection);
});
}
/**
* Gets the run slice by id.
*
* @param msLevel
* the ms level
* @return the run slice by id
* @throws SQLiteException
* the sQ lite exception
*/
public Observable> getRunSliceHeaderById(int msLevel) {
return mzDbReader.observeJobExecution( connection -> {
return this.getRunSliceHeaderById(msLevel, connection);
});
}
/**
* Gets the run slice header by id.
*
* @return the run slice header by id
* @throws SQLiteException
* the sQ lite exception
*/
public Observable
© 2015 - 2024 Weber Informatics LLC | Privacy Policy