Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

SourceFile Class Reference
[Metadata]

Description of a file location, used to store the origin of (meta) data. More...

#include <OpenMS/METADATA/SourceFile.h>

Inheritance diagram for SourceFile:
CVTermList MetaInfoInterface

List of all members.

Public Types

enum  ChecksumType { UNKNOWN_CHECKSUM, SHA1, MD5, SIZE_OF_CHECKSUMTYPE }
 

Type of the checksum.

More...

Public Member Functions

 SourceFile ()
 Constructor.
 SourceFile (const SourceFile &source)
 Copy constructor.
 ~SourceFile ()
 Destructor.
SourceFileoperator= (const SourceFile &source)
 Assignment operator.
bool operator== (const SourceFile &rhs) const
 Equality operator.
bool operator!= (const SourceFile &rhs) const
 Equality operator.
const StringgetNameOfFile () const
 returns the file name
void setNameOfFile (const String &name_of_file)
 sets the file name
const StringgetPathToFile () const
 returns the file path
void setPathToFile (const String &path_path_to_file)
 sets the file path
Real getFileSize () const
 returns the file size in MB
void setFileSize (Real file_size)
 sets the file size in MB
const StringgetFileType () const
 returns the file type
void setFileType (const String &file_type)
 sets the file type
const StringgetChecksum () const
 returns the file's checksum
void setChecksum (const String &checksum, ChecksumType type)
 sets the file's checksum
ChecksumType getChecksumType () const
 returns the checksum type
const StringgetNativeIDType () const
 Returns the native ID type of the spectra.
void setNativeIDType (const String &type)
 Sets the native ID type of the spectra.

Static Public Attributes

static const std::string NamesOfChecksumType [SIZE_OF_CHECKSUMTYPE]
 Names of checksum types.

Protected Attributes

String name_of_file_
String path_to_file_
DoubleReal file_size_
String file_type_
String checksum_
ChecksumType checksum_type_
String native_id_type_

Detailed Description

Description of a file location, used to store the origin of (meta) data.


Member Enumeration Documentation

Type of the checksum.

Enumerator:
UNKNOWN_CHECKSUM 

Unknown checksum type.

SHA1 

Secure Hash Algorithm-1.

MD5 

Message-Digest algorithm 5.

SIZE_OF_CHECKSUMTYPE 

Constructor & Destructor Documentation

SourceFile (  ) 

Constructor.

SourceFile ( const SourceFile source  ) 

Copy constructor.

~SourceFile (  ) 

Destructor.


Member Function Documentation

const String& getChecksum (  )  const

returns the file's checksum

Referenced by MzMLHandler< MapType >::writeSourceFile_(), and MzXMLHandler< MapType >::writeTo().

ChecksumType getChecksumType (  )  const
Real getFileSize (  )  const

returns the file size in MB

const String& getFileType (  )  const
const String& getNameOfFile (  )  const
const String& getNativeIDType (  )  const

Returns the native ID type of the spectra.

Referenced by MzMLHandler< MapType >::writeSourceFile_().

const String& getPathToFile (  )  const

returns the file path

Referenced by MzMLHandler< MapType >::writeSourceFile_().

bool operator!= ( const SourceFile rhs  )  const

Equality operator.

SourceFile& operator= ( const SourceFile source  ) 

Assignment operator.

bool operator== ( const SourceFile rhs  )  const

Equality operator.

void setChecksum ( const String checksum,
ChecksumType  type 
)

sets the file's checksum

Referenced by MzXMLHandler< MapType >::startElement().

void setFileSize ( Real  file_size  ) 

sets the file size in MB

Referenced by XMassFile::load().

void setFileType ( const String file_type  ) 

sets the file type

Referenced by XMassFile::load(), and MzXMLHandler< MapType >::startElement().

void setNameOfFile ( const String name_of_file  ) 

sets the file name

Referenced by XMassFile::load(), and MzXMLHandler< MapType >::startElement().

void setNativeIDType ( const String type  ) 

Sets the native ID type of the spectra.

void setPathToFile ( const String path_path_to_file  ) 

sets the file path

Referenced by XMassFile::load().


Member Data Documentation

String checksum_ [protected]
DoubleReal file_size_ [protected]
String file_type_ [protected]
String name_of_file_ [protected]
const std::string NamesOfChecksumType[SIZE_OF_CHECKSUMTYPE] [static]

Names of checksum types.

String native_id_type_ [protected]
String path_to_file_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:56 using doxygen 1.7.1