OpenMS
DocumentIdentifier Class Reference

Manage source document information. More...

#include <OpenMS/METADATA/DocumentIdentifier.h>

Inheritance diagram for DocumentIdentifier:
[legend]
Collaboration diagram for DocumentIdentifier:
[legend]

Public Member Functions

Constructors and Destructors
 DocumentIdentifier ()
 Default constructor. More...
 
 DocumentIdentifier (const DocumentIdentifier &)=default
 Copy constructor. More...
 
 DocumentIdentifier (DocumentIdentifier &&)=default
 Move constructor. More...
 
virtual ~DocumentIdentifier ()
 Destructor. More...
 
DocumentIdentifieroperator= (const DocumentIdentifier &)=default
 Assignment operator. More...
 
DocumentIdentifieroperator= (DocumentIdentifier &&) &=default
 Move assignment operator. More...
 
bool operator== (const DocumentIdentifier &rhs) const
 Equality operator. More...
 

Acessors

String id_
 the ID (e.g. LSID) More...
 
String file_path_
 the path to the loaded file More...
 
FileTypes::Type file_type_
 the type of the loaded file More...
 
void setIdentifier (const String &id)
 set document identifier (e.g. an LSID) More...
 
const StringgetIdentifier () const
 retrieve document identifier (e.g. an LSID) More...
 
void swap (DocumentIdentifier &from)
 exchange content with from More...
 
void setLoadedFilePath (const String &file_name)
 set the file_name_ according to absolute path of the file loaded from preferably done whilst loading More...
 
const StringgetLoadedFilePath () const
 get the file_name_ which is the absolute path to the file loaded from More...
 
void setLoadedFileType (const String &file_name)
 set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably done whilst loading More...
 
const FileTypes::TypegetLoadedFileType () const
 get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from More...
 

Detailed Description

Manage source document information.

This class stored information about the source document. Primarily this is the document id e.g. a LSID.

For source files additional information can be stored:

  • file name
  • file type

Constructor & Destructor Documentation

◆ DocumentIdentifier() [1/3]

Default constructor.

◆ DocumentIdentifier() [2/3]

DocumentIdentifier ( const DocumentIdentifier )
default

Copy constructor.

◆ DocumentIdentifier() [3/3]

Move constructor.

◆ ~DocumentIdentifier()

virtual ~DocumentIdentifier ( )
virtual

Destructor.

Member Function Documentation

◆ getIdentifier()

const String& getIdentifier ( ) const

retrieve document identifier (e.g. an LSID)

◆ getLoadedFilePath()

const String& getLoadedFilePath ( ) const

get the file_name_ which is the absolute path to the file loaded from

Referenced by OpenSwathHelper::checkSwathMapAndSelectTransitions().

◆ getLoadedFileType()

const FileTypes::Type& getLoadedFileType ( ) const

get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from

◆ operator=() [1/2]

DocumentIdentifier& operator= ( const DocumentIdentifier )
default

Assignment operator.

◆ operator=() [2/2]

DocumentIdentifier& operator= ( DocumentIdentifier &&  ) &
default

Move assignment operator.

◆ operator==()

bool operator== ( const DocumentIdentifier rhs) const

Equality operator.

◆ setIdentifier()

void setIdentifier ( const String id)

set document identifier (e.g. an LSID)

◆ setLoadedFilePath()

void setLoadedFilePath ( const String file_name)

set the file_name_ according to absolute path of the file loaded from preferably done whilst loading

Referenced by MS2File::load(), and DTA2DFile::load().

◆ setLoadedFileType()

void setLoadedFileType ( const String file_name)

set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably done whilst loading

Referenced by MS2File::load(), and DTA2DFile::load().

◆ swap()

void swap ( DocumentIdentifier from)

exchange content with from

Member Data Documentation

◆ file_path_

String file_path_
protected

the path to the loaded file

◆ file_type_

FileTypes::Type file_type_
protected

the type of the loaded file

◆ id_

String id_
protected

the ID (e.g. LSID)