fr.profi.mzdb.io.reader.cache.SpectrumHeaderAsyncReader Maven / Gradle / Ivy
package fr.profi.mzdb.io.reader.cache;
import java.util.Map;
import com.almworks.sqlite4java.SQLiteException;
import fr.profi.mzdb.MzDbAsyncReader;
import fr.profi.mzdb.model.SpectrumHeader;
import rx.Observable;
/**
* @author David Bouyssie
*
*/
public class SpectrumHeaderAsyncReader extends AbstractSpectrumHeaderReader {
/** The mzDB reader. */
private MzDbAsyncReader mzDbReader = null;
/**
* @param mzDbReader
* @throws SQLiteException
*/
public SpectrumHeaderAsyncReader(MzDbAsyncReader mzDbReader, AbstractDataEncodingReader dataEncodingReader) throws SQLiteException {
super(mzDbReader, dataEncodingReader);
this.mzDbReader = mzDbReader;
}
/** specialized getter */
public MzDbAsyncReader getMzDbReader() {
return this.mzDbReader;
}
/**
* Gets the spectrum headers.
*
* @return the spectrum headers
* @throws SQLiteException
*/
public Observable getSpectrumHeaders() {
return getMzDbReader().observeJobExecution( connection -> {
return this.getSpectrumHeaders(connection);
});
}
/**
* Gets the spectrum headers by id.
*
* @return the spectrum header by id
* @throws SQLiteException
*/
public Observable
© 2015 - 2024 Weber Informatics LLC | Privacy Policy