glite::jdl::ExtractedAd Class Reference

#include <glite/jdl/extractfiles.h>

Public Member Functions

GET Methods

const std::string getNodeName ()
const std::string getJobId ()
const std::vector< FileAdgetFiles ()
unsigned int getTotalSize ()
unsigned long getMaxJobFileSize ()
ExtractedAdgetNode (const std::string &nodeName)
ExtractedAdgetJobId (const std::string &jobid)
std::vector< ExtractedAd * > getChildren ()
const std::vector< FileAdgetNodeNameFiles (const std::string &nodeName)
const std::vector< FileAdgetJobIdFiles (const std::string &jobid)
bool hasFiles ()

Constructors/Destructors/Copy



 ExtractedAd ()
 ExtractedAd (const ExtractedAd &jobad)
virtual void operator= (const ExtractedAd &extractedAd)
virtual ~ExtractedAd () throw ()
ExtractedAdCopy ()
static void ExtractedAdCopy (const ExtractedAd &source, ExtractedAd *dest)

SET/ADD Methods



void setNodeName (const std::string &nodeName)
void setNodeName (const std::string &nodeName, const std::string &jobid)
void setJobId (const std::string &jobid)
void setJobId (const std::string &nodeName, const std::string &jobid)
void setFiles (const std::vector< FileAd > &files)
void addFileAd (const FileAd &file)
void addFileAd (const std::string &path)
void addNode (ExtractedAd *extracted)
static void setMaxTotalSize (unsigned int maxTotalSize)

Detailed Description

ExtractedAd represent all the extracted files for a certain job/node/dag etc each FilesAd instance can have recoursively children of any kind


Constructor & Destructor Documentation

glite::jdl::ExtractedAd::ExtractedAd (  ) 

Default Constructor

glite::jdl::ExtractedAd::ExtractedAd ( const ExtractedAd jobad  ) 

Copy Constructor

virtual glite::jdl::ExtractedAd::~ExtractedAd (  )  throw () [inline, virtual]

Default Destructor


Member Function Documentation

void glite::jdl::ExtractedAd::addFileAd ( const FileAd file  ) 

Add a single File

Parameters:
file the file to be added
void glite::jdl::ExtractedAd::addFileAd ( const std::string &  path  ) 

Add a single File

Parameters:
path the path of the file to be added
void glite::jdl::ExtractedAd::addNode ( ExtractedAd extracted  ) 

Add a new Node to the children of the instance

Parameters:
extracted the ExtractedAd node to be added
ExtractedAd* glite::jdl::ExtractedAd::Copy (  ) 

Deep copy the instance, including all its internal pointers. This has to be done when the copied instance is supposed to survive outside the executing scope

Returns:
the identical copy of the instance, with new allocated memory
static void glite::jdl::ExtractedAd::ExtractedAdCopy ( const ExtractedAd source,
ExtractedAd dest 
) [static]

Static method: Copy Constructor

Parameters:
source the instance to be copied
dest the pointer which will be filled with source values
std::vector<ExtractedAd*> glite::jdl::ExtractedAd::getChildren (  ) 

Retrieve all children ExtractedAd for this instance, empty vector if no children found

Returns:
a vector containing all pointers to the instance ExtractedAd children
const std::vector<FileAd> glite::jdl::ExtractedAd::getFiles (  ) 

Retrieve only the files listed (without computing children files)

Returns:
a vector containig all FilesAd listed
ExtractedAd* glite::jdl::ExtractedAd::getJobId ( const std::string &  jobid  ) 

Retrieve extracted instance for a specified jobid if present, raises exception otherwise

Parameters:
jobid the value of the jobid to be retrieved
Returns:
a pointer to the desired jobid ExtractedAd instance
const std::string glite::jdl::ExtractedAd::getJobId (  ) 

Retrieve the jobid

Returns:
the jobid string representation, empty string if not set
const std::vector<FileAd> glite::jdl::ExtractedAd::getJobIdFiles ( const std::string &  jobid  ) 

Retrieve all files for a specified node if present, raises exception otherwise

Parameters:
jobid the value of the jobid to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance
unsigned long glite::jdl::ExtractedAd::getMaxJobFileSize (  ) 

Retrieve the highest file size from the ones listed in the whole instance (computing children files too)

Returns:
the size (in Kb)
ExtractedAd* glite::jdl::ExtractedAd::getNode ( const std::string &  nodeName  ) 

Retrieve extracted instance for a specified node if present, raises exception otherwise

Parameters:
nodeName the value of the node to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance
const std::string glite::jdl::ExtractedAd::getNodeName (  ) 

Retrieve the name of the node (if the instance represents a node)

Returns:
the name of the node, empty string if not set
const std::vector<FileAd> glite::jdl::ExtractedAd::getNodeNameFiles ( const std::string &  nodeName  ) 

Retrieve all files for a specified node if present, raises exception otherwise

Parameters:
nodeName the value of the node to be retrieved
Returns:
a pointer to the desired node ExtractedAd instance
unsigned int glite::jdl::ExtractedAd::getTotalSize (  ) 

Retrieve the total amount of size for files listed in the whole instance (computing children files too)

Returns:
the size (in Kb)
bool glite::jdl::ExtractedAd::hasFiles (  ) 

Determine whether the instance or its children contain at least one file

Returns:
true when at least one file has been specified inside the instance or its children, false otherwise
virtual void glite::jdl::ExtractedAd::operator= ( const ExtractedAd extractedAd  )  [virtual]

Operator "=" performs a deep copy of the instance

Parameters:
extractedAd the source instance to be copied
void glite::jdl::ExtractedAd::setFiles ( const std::vector< FileAd > &  files  ) 

Set the files for the current instance

Parameters:
files the vector of files for the instance
void glite::jdl::ExtractedAd::setJobId ( const std::string &  jobid  ) 

Set the job id for the current instance

Parameters:
jobid the value of the job id to be set
void glite::jdl::ExtractedAd::setJobId ( const std::string &  nodeName,
const std::string &  jobid 
)

Set the jobid for the specified nodeName if present, raises exception otherwise

Parameters:
jobid the value of the jobid to be set
nodeName the name of the Node where to insert the jobid
static void glite::jdl::ExtractedAd::setMaxTotalSize ( unsigned int  maxTotalSize  )  [static]

static method: set the max possible size for the total of files contained inside instance

Parameters:
maxTotalSize the value (in Kb) of max total size of files contained
void glite::jdl::ExtractedAd::setNodeName ( const std::string &  nodeName  ) 

Set the nodeName for the current instance

Parameters:
nodeName the value of the node to be set
void glite::jdl::ExtractedAd::setNodeName ( const std::string &  nodeName,
const std::string &  jobid 
)

Set the nodeName for the specified jobid if present, raises exception otherwise

Parameters:
nodeName the value of the node to be set
jobid the jobid of the Node where to set the node name

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