1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Andreas Bertsch $
25
// $Authors: Marc Sturm $
26
// --------------------------------------------------------------------------
28
#include <OpenMS/METADATA/ExperimentalSettings.h>
35
ExperimentalSettings::ExperimentalSettings():
45
protein_identifications_(),
46
fraction_identifier_()
50
ExperimentalSettings::ExperimentalSettings(const ExperimentalSettings& source):
51
MetaInfoInterface(source),
52
DocumentIdentifier(source),
53
sample_(source.sample_),
54
source_files_(source.source_files_),
55
contacts_(source.contacts_),
56
instrument_(source.instrument_),
58
datetime_(source.datetime_),
59
comment_(source.comment_),
60
protein_identifications_(source.protein_identifications_),
61
fraction_identifier_(source.fraction_identifier_)
65
ExperimentalSettings::~ExperimentalSettings()
69
ExperimentalSettings& ExperimentalSettings::operator = (const ExperimentalSettings& source)
71
if (&source == this) return *this;
73
sample_ = source.sample_;
74
source_files_ = source.source_files_;
75
contacts_ = source.contacts_;
76
instrument_ = source.instrument_;
78
datetime_ = source.datetime_;
79
comment_ = source.comment_;
80
protein_identifications_ = source.protein_identifications_;
81
fraction_identifier_ = source.fraction_identifier_;
82
MetaInfoInterface::operator=(source);
83
DocumentIdentifier::operator=(source);
88
bool ExperimentalSettings::operator== (const ExperimentalSettings& rhs) const
91
sample_ == rhs.sample_ &&
92
source_files_ == rhs.source_files_ &&
93
contacts_ == rhs.contacts_ &&
94
instrument_ == rhs.instrument_ &&
96
datetime_ == rhs.datetime_ &&
97
protein_identifications_ == rhs.protein_identifications_ &&
98
comment_ == rhs.comment_ &&
99
fraction_identifier_ == rhs.fraction_identifier_ &&
100
MetaInfoInterface::operator==(rhs) &&
101
DocumentIdentifier::operator==(rhs)
105
bool ExperimentalSettings::operator!= (const ExperimentalSettings& rhs) const
107
return !(operator==(rhs));
110
const Sample& ExperimentalSettings::getSample() const
115
Sample& ExperimentalSettings::getSample()
120
void ExperimentalSettings::setSample(const Sample& sample)
125
const vector<SourceFile>& ExperimentalSettings::getSourceFiles() const
127
return source_files_;
130
vector<SourceFile>& ExperimentalSettings::getSourceFiles()
132
return source_files_;
135
void ExperimentalSettings::setSourceFiles(const vector<SourceFile>& source_file)
137
source_files_ = source_file;
140
const vector<ContactPerson>& ExperimentalSettings::getContacts() const
145
vector<ContactPerson>& ExperimentalSettings::getContacts()
150
void ExperimentalSettings::setContacts(const std::vector<ContactPerson>& contacts)
152
contacts_ = contacts;
155
const Instrument& ExperimentalSettings::getInstrument() const
160
Instrument& ExperimentalSettings::getInstrument()
165
void ExperimentalSettings::setInstrument(const Instrument& instrument)
167
instrument_ = instrument;
170
const DateTime& ExperimentalSettings::getDateTime() const
175
void ExperimentalSettings::setDateTime(const DateTime& date)
181
const HPLC& ExperimentalSettings::getHPLC() const
186
HPLC& ExperimentalSettings::getHPLC()
191
void ExperimentalSettings::setHPLC(const HPLC& hplc)
196
std::ostream& operator << (std::ostream& os, const ExperimentalSettings& /*exp*/)
198
os << "-- EXPERIMENTALSETTINGS BEGIN --"<<std::endl;
199
os << "-- EXPERIMENTALSETTINGS END --"<<std::endl;
203
const vector<ProteinIdentification>& ExperimentalSettings::getProteinIdentifications() const
205
return protein_identifications_;
208
vector<ProteinIdentification>& ExperimentalSettings::getProteinIdentifications()
210
return protein_identifications_;
213
void ExperimentalSettings::setProteinIdentifications(const vector<ProteinIdentification>& protein_identifications)
215
protein_identifications_ = protein_identifications;
218
const String& ExperimentalSettings::getComment() const
223
void ExperimentalSettings::setComment(const String& comment)
228
const String& ExperimentalSettings::getFractionIdentifier() const
230
return fraction_identifier_;
233
void ExperimentalSettings::setFractionIdentifier(const String& fraction_identifier)
235
fraction_identifier_ = fraction_identifier;