12#include <OpenMS/config.h>
53 class OPENMS_DLLAPI
USI
78 USI(
const std::string& collection,
79 const std::string& ms_run,
81 const std::string& index,
82 const std::string& interpretation =
"");
90 explicit USI(
const std::string& usi_string);
108 USI& operator=(
USI&&) noexcept = default;
114 bool operator==(const
USI& rhs) const;
117 bool operator!=(const
USI& rhs) const;
120 bool operator<(const
USI& rhs) const;
132 bool isValid() const;
142 static
bool isValidUSI(const
std::
string& usi_string);
165 static
std::optional<
USI> tryParse(const
std::
string& usi_string);
171 const
std::
string& getCollection() const;
174 void setCollection(const
std::
string& collection);
177 const
std::
string& getMSRun() const;
180 void setMSRun(const
std::
string& ms_run);
189 const
std::
string& getIndex() const;
192 void setIndex(const
std::
string& index);
195 const
std::
string& getInterpretation() const;
198 void setInterpretation(const
std::
string& interpretation);
201 bool hasInterpretation() const;
211 std::
string toString() const;
219 bool fromString(const
std::
string& usi_string);
236 static
USI createFromScanNumber(const
std::
string& dataset_id,
237 const
std::
string& filename,
239 const
std::
string& interpretation = "");
249 static
USI createFromNativeID(const
std::
string& dataset_id,
250 const
std::
string& filename,
251 const
std::
string& native_id);
262 static
std::optional<
int> extractScanNumberFromNativeID(const
std::
string& native_id);
291 static
std::
string extractBasename(const
std::
string& filepath);
297 static const
std::
string& getCVAccession();
300 static const
std::
string& getCVName();
308 std::
string interpretation_;
311 static const
std::
string USI_PREFIX;
314 static const
std::
string CV_ACCESSION;
317 static const
std::
string CV_NAME;
321 OPENMS_DLLAPI
std::ostream& operator<<(
std::ostream& os, const
USI& usi);
Utility class for handling Universal Spectrum Identifiers (USI).
Definition USI.h:54
USI(const std::string &collection, const std::string &ms_run, IndexType index_type, const std::string &index, const std::string &interpretation="")
Construct a USI from its components.
IndexType
Supported index types in USI.
Definition USI.h:58
USI()
Default constructor (creates an empty/invalid USI)
USI(const std::string &usi_string)
Construct a USI from its string representation.
USI(USI &&) noexcept=default
Move constructor.
USI(const USI &)=default
Copy constructor.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19