![]() |
OpenMS
2.8.0
|
Helper class for storing .oms files (SQLite format) More...
#include <OpenMS/FORMAT/OMSFileStore.h>
Public Types | |
| using | Key = qint64 |
| Type used for database keys. More... | |
Public Types inherited from ProgressLogger | |
| enum | LogType { CMD , GUI , NONE } |
| Possible log types. More... | |
Public Member Functions | |
| OMSFileStore (const String &filename, LogType log_type) | |
| Constructor. More... | |
| ~OMSFileStore () | |
| Destructor. More... | |
| void | store (const IdentificationData &id_data) |
| Write data from an IdentificationData object to database. More... | |
| void | store (const FeatureMap &features) |
| Write data from a FeatureMap object to database. More... | |
Public Member Functions inherited from ProgressLogger | |
| ProgressLogger () | |
| Constructor. More... | |
| virtual | ~ProgressLogger () |
| Destructor. More... | |
| ProgressLogger (const ProgressLogger &other) | |
| Copy constructor. More... | |
| ProgressLogger & | operator= (const ProgressLogger &other) |
| Assignment Operator. More... | |
| void | setLogType (LogType type) const |
| Sets the progress log that should be used. The default type is NONE! More... | |
| LogType | getLogType () const |
| Returns the type of progress log being used. More... | |
| void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
| Initializes the progress display. More... | |
| void | setProgress (SignedSize value) const |
| Sets the current progress. More... | |
| void | endProgress () const |
| Ends the progress display. More... | |
| void | nextProgress () const |
| increment progress by 1 (according to range begin-end) More... | |
Private Member Functions | |
| void | storeVersionAndDate_ () |
| void | storeScoreTypes_ (const IdentificationData &id_data) |
| void | storeInputFiles_ (const IdentificationData &id_data) |
| void | storeProcessingSoftwares_ (const IdentificationData &id_data) |
| void | storeDBSearchParams_ (const IdentificationData &id_data) |
| void | storeProcessingSteps_ (const IdentificationData &id_data) |
| void | storeObservations_ (const IdentificationData &id_data) |
| void | storeParentSequences_ (const IdentificationData &id_data) |
| void | storeParentGroupSets_ (const IdentificationData &id_data) |
| void | storeIdentifiedCompounds_ (const IdentificationData &id_data) |
| void | storeIdentifiedSequences_ (const IdentificationData &id_data) |
| void | storeAdducts_ (const IdentificationData &id_data) |
| void | storeObservationMatches_ (const IdentificationData &id_data) |
| void | storeFeatures_ (const FeatureMap &features) |
| void | createTable_ (const String &name, const String &definition, bool may_exist=false) |
| void | createTableMoleculeType_ () |
| void | createTableDataValue_ () |
| Key | storeDataValue_ (const DataValue &value) |
| void | createTableCVTerm_ () |
| Key | storeCVTerm_ (const CVTerm &cv_term) |
| void | createTableMetaInfo_ (const String &parent_table, const String &key_column="id") |
| void | storeMetaInfo_ (const MetaInfoInterface &info, const String &parent_table, Key parent_id) |
| void | createTableAppliedProcessingStep_ (const String &parent_table) |
| void | storeAppliedProcessingStep_ (const IdentificationData::AppliedProcessingStep &step, Size step_order, const String &parent_table, Key parent_id) |
| void | createTableIdentifiedMolecule_ () |
| Key | getAddress_ (const IdentificationData::IdentifiedMolecule &molecule_var) |
| void | createTableParentMatches_ () |
| void | storeParentMatches_ (const IdentificationData::ParentMatches &matches, Key molecule_id) |
| template<class MetaInfoInterfaceContainer > | |
| void | storeMetaInfos_ (const MetaInfoInterfaceContainer &container, const String &parent_table) |
| template<class ScoredProcessingResultContainer > | |
| void | storeScoredProcessingResults_ (const ScoredProcessingResultContainer &container, const String &parent_table) |
| void | storeFeature_ (const FeatureMap &features) |
| void | storeFeatureAndSubordinates_ (const Feature &feature, int &feature_id, int parent_id) |
| template<class FeatureContainer , class Predicate > | |
| bool | anyFeaturePredicate_ (const FeatureContainer &features, const Predicate &pred) |
| check whether a predicate is true for any feature (or subordinate thereof) in a container More... | |
| void | storeMapMetaData_ (const FeatureMap &features) |
| void | storeDataProcessing_ (const FeatureMap &features) |
Private Attributes | |
| QString | db_name_ |
| std::map< std::string, QSqlQuery > | prepared_queries_ |
| prepared queries for inserting data into different tables More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from ProgressLogger | |
| static String | logTypeToFactoryName_ (LogType type) |
| Return the name of the factory product used for this log type. More... | |
Protected Attributes inherited from ProgressLogger | |
| LogType | type_ |
| time_t | last_invoke_ |
| ProgressLoggerImpl * | current_logger_ |
Static Protected Attributes inherited from ProgressLogger | |
| static int | recursion_depth_ |
Helper class for storing .oms files (SQLite format)
This class encapsulates the SQLite database in a .oms file and allows to write data to it.
| using Key = qint64 |
Type used for database keys.
| OMSFileStore | ( | const String & | filename, |
| LogType | log_type | ||
| ) |
Constructor.
Deletes the output file if it exists, then creates an SQLite database in its place. Opens the database and configures it for fast writing.
| filename | Path to the .oms output file (SQLite database) |
| log_type | Type of logging to use |
| Exception::FailedAPICall | Database cannot be opened |
| ~OMSFileStore | ( | ) |
Destructor.
Closes the connection to the database file.
|
inlineprivate |
check whether a predicate is true for any feature (or subordinate thereof) in a container
|
private |
|
private |
Referenced by OMSFileStore::storeScoredProcessingResults_().
|
private |
|
private |
|
private |
Referenced by OMSFileStore::storeMetaInfos_().
|
private |
|
private |
|
private |
| void store | ( | const FeatureMap & | features | ) |
Write data from a FeatureMap object to database.
| void store | ( | const IdentificationData & | id_data | ) |
Write data from an IdentificationData object to database.
|
private |
|
private |
Referenced by OMSFileStore::storeScoredProcessingResults_().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by OMSFileStore::storeMetaInfos_().
|
inlineprivate |
References OMSFileStore::createTableMetaInfo_(), and OMSFileStore::storeMetaInfo_().
Referenced by OMSFileStore::storeScoredProcessingResults_().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
prepared queries for inserting data into different tables
1.9.1