VHISTlib  1.84.0.3018
Public Types | Public Member Functions
vhist::WSFile Class Reference

This class contains the description of a single input/output file specified in an argfile. More...

#include <wsfile.h>

List of all members.

Public Types

enum  FilePurpose { INPUT_FILE, OUTPUT_FILE }
 The purpose of a file inside one workflowstep. More...

Public Member Functions

 WSFile ()
 The default constructor of WSFile.
 WSFile (const WSFile &rhs)
 The copy constructor of WSFile.
bool operator== (const WSFile &rhs)
bool operator!= (const WSFile &rhs)
QString toCommandline (bool supportVariables=true)
 Creates a string containing the vhistadd commandline for this file.
QString filetype () const
 Returns the current filetype of this input/output file.
void setFiletype (const QString &filetype)
 Sets the filetype associated with the file.
QString filename () const
 Returns the current filepath and filename as one string.
void setFilename (const QString &filename)
 Sets the name of the file without the path.
QString filepath () const
 Returns the filepath without the filename.
void setFilepath (const QString &filepath)
 Sets the filepath without the filename.
void setFilenameAndPath (const QString &file)
 Sets the filename and the file path as one string.
bool optional () const
 This functions returns whether the file is optional.
void setOptional (bool optional)
 Sets whether the file is optional or not.
bool compress () const
 Returns whether the input/output file should be embedded in compressed or uncompressed form.
void setCompress (bool compress)
 Sets whether the input/output file should be embedded in compressed or uncompressed form.
bool inputFile () const
 This function returns whether the file is an input or output file.
void setInputFile (bool isInputFile)
 Sets whether the file is an input or an output file to the workflowstep.
FilePurpose filePurpose () const
 Returns the purpose of the file in the workflowstep.
void setFilePurpose (const FilePurpose &purpose)
 Sets the purpose of the file in the workflowstep.
QString description () const
 Returns the current file description text.
void setDescription (const QString &description)
 Sets the description of the file.
QString comment () const
 Returns the comment of the file.
void setComment (const QString &comment)
 Sets the comment of the file.
bool embed () const
 Returns whether the input/output file should be embedded into the VHIST file.
void setEmbed (bool embed)
 Sets whether the input/output file should be embedded into the VHIST file.
bool autoMD5 () const
 This function returns whether vhistadd should automatically generate an MD5 checksum for the file.
void setAutoMD5 (bool compress)
 Sets whether vhistadd should automatically generate an MD5 checksum for this file.
QString md5File () const
 Returns the MD5 file of this input/output file.
void setMD5File (const QString &file)
 Sets an MD5 file for this input/output file.
bool previewWS () const
 Returns whether the previewws flag is active for this file.
void setPreviewWS (bool previewWS)
 Activates/deactivates the previewws flag for this file.
bool preview () const
 Returns whether the preview flag is active for this file.
void setPreview (bool preview)
 Activates/deactivates the preview flag for this file.
bool thumbnail () const
 Returns whether the thumbnail flag is active for this file.
void setThumbnail (bool thumbnail)
 Activates/deactivates the thumbnail flag for this file.
bool thumbnailOnly () const
 Returns whether the thumbnailonly flag is active for this file.
void setThumbnailOnly (bool thumbnailOnly)
 Activates/deactivates the thumbnailonly flag for this file.
void clearUserAttributes ()
 Removes all user-defined attributes from the input/output file.
void addUserAttribute (const QString &key, const QString &value)
 Adds a new user-defined attribute to the input/output file.
QStringList userAttributeKeys () const
 Returns a list of all keys appearing in user defined attributes.
QString userAttribute (const QString &key) const
 Returns the value associated with the given key.

Detailed Description

This class contains the description of a single input/output file specified in an argfile.


Member Enumeration Documentation

The purpose of a file inside one workflowstep.

Enumerator:
INPUT_FILE 

The file is an input file.

OUTPUT_FILE 

The file is an output file.


Constructor & Destructor Documentation

WSFile::WSFile ( const WSFile rhs)

The copy constructor of WSFile.

Parameters:
[in]rhsThe WSFile object, which should be copied.

Member Function Documentation

void WSFile::addUserAttribute ( const QString &  key,
const QString &  value 
)

Adds a new user-defined attribute to the input/output file.

An attribute is an arbitrary key-value pair. If another attribute with the same key does already exist, it is overwritten by the new attribute.

Parameters:
[in]keyThe key of the attribute.
[in]valueThe value of the attribute.
bool WSFile::autoMD5 ( ) const

This function returns whether vhistadd should automatically generate an MD5 checksum for the file.

Returns:
true if a checksum should be calculated, false otherwise.
QString WSFile::comment ( ) const

Returns the comment of the file.

Returns:
The comment of the file.
bool WSFile::compress ( ) const

Returns whether the input/output file should be embedded in compressed or uncompressed form.

Returns:
true if the file should be compressed, false otherwise.
QString WSFile::description ( ) const

Returns the current file description text.

Returns:
The current file description text.
bool WSFile::embed ( ) const

Returns whether the input/output file should be embedded into the VHIST file.

Returns:
true if the file should be embedded into the VHIST file, false otherwise.
QString WSFile::filename ( ) const

Returns the current filepath and filename as one string.

Returns:
The filepath and filename.
QString WSFile::filepath ( ) const

Returns the filepath without the filename.

Returns:
The filepath without the filename.
WSFile::FilePurpose WSFile::filePurpose ( ) const

Returns the purpose of the file in the workflowstep.

A file can be either an input- or an outputfile.

Returns:
The purpose of the file in the workflowstep.
QString WSFile::filetype ( ) const

Returns the current filetype of this input/output file.

Returns:
The current filetype.
bool WSFile::inputFile ( ) const

This function returns whether the file is an input or output file.

Returns:
true if the file is an input file, false if it is an output file.
QString WSFile::md5File ( ) const

Returns the MD5 file of this input/output file.

Returns:
The MD5 file of this input/output file.
bool WSFile::optional ( ) const

This functions returns whether the file is optional.

Returns:
true if the file is optional, false otherwhise.
bool WSFile::preview ( ) const

Returns whether the preview flag is active for this file.

Returns:
true if the preview flag is active for this file, false otherwise.
bool WSFile::previewWS ( ) const

Returns whether the previewws flag is active for this file.

Returns:
true if the previewws flag is active for this file, false otherwise.
void WSFile::setAutoMD5 ( bool  md5)

Sets whether vhistadd should automatically generate an MD5 checksum for this file.

Parameters:
[in]md5true if a checksum should be calculate and false otherwise.
void WSFile::setComment ( const QString &  comment)

Sets the comment of the file.

Parameters:
[in]commentA comment concerning the file.
void WSFile::setCompress ( bool  compress)

Sets whether the input/output file should be embedded in compressed or uncompressed form.

If the file is not embedded anyway, this flag is ignored by vhistadd.

Parameters:
[in]compresstrue if the file should be compressed, false otherwise.
void WSFile::setDescription ( const QString &  description)

Sets the description of the file.

Parameters:
[in]descriptionText describing the file.
void WSFile::setEmbed ( bool  embed)

Sets whether the input/output file should be embedded into the VHIST file.

Parameters:
embedtrue if the file should be embedded into the VHIST file.
void WSFile::setFilename ( const QString &  name)

Sets the name of the file without the path.

Parameters:
[in]nameThe filename without path.
void WSFile::setFilenameAndPath ( const QString &  filename)

Sets the filename and the file path as one string.

Parameters:
[in]filenameThe path + name of the file.
void WSFile::setFilepath ( const QString &  path)

Sets the filepath without the filename.

Parameters:
[in]pathThe filepath.
void WSFile::setFilePurpose ( const FilePurpose purpose)

Sets the purpose of the file in the workflowstep.

Parameters:
[in]purposeThe purpose of the file in the workflowstep.
void WSFile::setFiletype ( const QString &  filetype)

Sets the filetype associated with the file.

Parameters:
[in]filetypeThe filetype of the file.
Note:
The filetype attribute is a freeform string, however, it is recommended to format the filetype in a MIME type like format.
void WSFile::setInputFile ( bool  inputFile)

Sets whether the file is an input or an output file to the workflowstep.

Parameters:
[in]inputFiletrue if this file is an input file, false if it is an output file.
void WSFile::setMD5File ( const QString &  file)

Sets an MD5 file for this input/output file.

An MD5 file is a file which contains an MD5 checksum in hexdigests in it's first line.

Parameters:
[in]fileThe name of the MD5 file.
void WSFile::setOptional ( bool  optional)

Sets whether the file is optional or not.

If the file should be embedded into the VHIST file and is not found by vhistadd, this flag determines whether vhistadd emits an error or ignores the missing file.

Parameters:
[in]optionaltrue if the file is optional, false otherwise.
void WSFile::setPreview ( bool  preview)

Activates/deactivates the preview flag for this file.

Parameters:
[in]previewtrue if the flag should be activated, false otherwise.
void WSFile::setPreviewWS ( bool  previewWS)

Activates/deactivates the previewws flag for this file.

Parameters:
[in]previewWStrue if the flag should be activated, false otherwise.
void WSFile::setThumbnail ( bool  thumbnail)

Activates/deactivates the thumbnail flag for this file.

Parameters:
[in]thumbnailtrue if the flag should be activated, false otherwise.
void WSFile::setThumbnailOnly ( bool  thumbnailOnly)

Activates/deactivates the thumbnailonly flag for this file.

Parameters:
[in]thumbnailOnlytrue if the flag should be activated, false otherwise.
bool WSFile::thumbnail ( ) const

Returns whether the thumbnail flag is active for this file.

Returns:
true if the thumbnail flag is active for this file, false otherwise.
bool WSFile::thumbnailOnly ( ) const

Returns whether the thumbnailonly flag is active for this file.

Returns:
true if the thumbnailonly flag is active for this file, false otherwise.
QString WSFile::toCommandline ( bool  supportVariables = true)

Creates a string containing the vhistadd commandline for this file.

Returns:
The commandline needed to describe this file in vhistadd.
QString WSFile::userAttribute ( const QString &  key) const

Returns the value associated with the given key.

If the key does not appear in any attribute, an empty string is returned.

Parameters:
[in]keyThe key of a user-defined attribute.
QStringList WSFile::userAttributeKeys ( ) const

Returns a list of all keys appearing in user defined attributes.

This list can be used to iterate over all attributes.

Returns:
A list of keys.

The documentation for this class was generated from the following files:

VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.