glite::jdl::CollectionAd Class Reference

#include <src/requestad/collectionad.h>

Inheritance diagram for glite::jdl::CollectionAd:

glite::jdl::Ad

Detailed Description

Provides a representation of collection (bunch) of jobs.

Version:
0.1
Date:
April 2005
Author:
Alessandro Maraschini <alessandro.maraschini@datamat.it>


Public Member Functions

 CollectionAd (const classad::ClassAd &classAd)
 Constructory by Classad.
 CollectionAd ()
 Default constructor.
 CollectionAd (const std::string &classAd)
 Constructory by Stirng.
void operator= (const CollectionAd &collect)
 operator =
virtual ~CollectionAd () throw ()
 Default Destructor.
CollectionAdcheck ()
 Check both syntax and semantic rules for a collection.
std::string toSubmissionString ()
 Performs a check and return the checked/filled collection result.
std::vector< std::string > getNodeStringValue (const std::string &node, const std::string &attr_name)
 Retrieve (if present) the string value for the specified attribute.
std::vector< std::pair< std::string,
std::vector< std::string > > > 
getNodeStringValues (const std::string &attr_name)
 Retrieve the string values for the specified attribute for all the nodes.
std::map< std::string, std::vector<
std::string > > 
getNodeStringValuesMap (const std::string &attr_name)
 Retrieve the string values for the specified attribute for all the nodes.
void setLocalAccess (bool lookInto)
 If Collection is used by a remove machine, it is impossible to look into the local hard-disk by default this parameter is set to true.
void setDefaultRank (classad::ExprTree *attr_value)
 Set the default value for Rank attribute (take in consideration if not specified in JDL).
void setDefaultReq (classad::ExprTree *attr_value)
 Set the default value for Requirements attribute (take in consideration if not specified in JDL).
bool gettoBretrieved ()
 Return wheter are there any files to be retrieved This value has significant meaning only after a previous check.
ExtractedAdgetExtractedAd ()
 Retrieve the local files to be for the current instance.
void addNode (Ad node)
 Add a node to the collection.


Constructor & Destructor Documentation

glite::jdl::CollectionAd::CollectionAd ( const classad::ClassAd &  classAd  ) 

Constructory by Classad.

glite::jdl::CollectionAd::CollectionAd (  ) 

Default constructor.

glite::jdl::CollectionAd::CollectionAd ( const std::string &  classAd  ) 

Constructory by Stirng.

virtual glite::jdl::CollectionAd::~CollectionAd (  )  throw () [virtual]

Default Destructor.


Member Function Documentation

void glite::jdl::CollectionAd::addNode ( Ad  node  ) 

Add a node to the collection.

Parameters:
node the node to be added

CollectionAd* glite::jdl::CollectionAd::check (  ) 

Check both syntax and semantic rules for a collection.

Fill default values

Returns:
the checked/filled collection instance

ExtractedAd* glite::jdl::CollectionAd::getExtractedAd (  ) 

Retrieve the local files to be for the current instance.

Returns:
a pointer to an ExtractedAd instance, containing all local files to be extracted

std::vector< std::string > glite::jdl::CollectionAd::getNodeStringValue ( const std::string &  node,
const std::string &  attr_name 
)

Retrieve (if present) the string value for the specified attribute.

Parameters:
node the name of the node to be looked for
attr_name the name of the attributeto be retrieved
Returns:
the value of the specified string attribute

std::vector< std::pair<std::string ,std::vector< std::string > > > glite::jdl::CollectionAd::getNodeStringValues ( const std::string &  attr_name  ) 

Retrieve the string values for the specified attribute for all the nodes.

Parameters:
attr_name the name of the attribute to be retrieved
Returns:
a vector of pair, each pair containing respectively the name of the node and a vector of all the string values corresponding to the specified attr_name

std::map<std::string, std::vector< std::string > > glite::jdl::CollectionAd::getNodeStringValuesMap ( const std::string &  attr_name  ) 

Retrieve the string values for the specified attribute for all the nodes.

Parameters:
attr_name the name of the attribute to be retrieved
Returns:
a map with the nodes name and the vector of all the string values corresponding to the specified attr_name

bool glite::jdl::CollectionAd::gettoBretrieved (  )  [inline]

Return wheter are there any files to be retrieved This value has significant meaning only after a previous check.

void glite::jdl::CollectionAd::operator= ( const CollectionAd collect  ) 

operator =

void glite::jdl::CollectionAd::setDefaultRank ( classad::ExprTree *  attr_value  ) 

Set the default value for Rank attribute (take in consideration if not specified in JDL).

Parameters:
attr_value the value to be set to the default rank

void glite::jdl::CollectionAd::setDefaultReq ( classad::ExprTree *  attr_value  ) 

Set the default value for Requirements attribute (take in consideration if not specified in JDL).

Parameters:
attr_value the value to be set to the default requirements

void glite::jdl::CollectionAd::setLocalAccess ( bool  lookInto  ) 

If Collection is used by a remove machine, it is impossible to look into the local hard-disk by default this parameter is set to true.

Parameters:
lookInto allow all the check methods to access to the local hard disk (true) or skip the check (false)

std::string glite::jdl::CollectionAd::toSubmissionString (  ) 

Performs a check and return the checked/filled collection result.

Returns:
the checked collection into its string representation


The documentation for this class was generated from the following file:
Generated on Wed May 16 15:17:09 2012 for glite-jdl-api-cpp-3.2.5 by  doxygen 1.4.7