glite::jdl::JobAd Class Reference
Provides a representation of the job description in the JDL language.
More...
#include <glite/jdl/JobAd.h>
Detailed Description
Provides a representation of the job description in the JDL language.
Provides a representation of the job description in the JDL language and the functions for building and manipulating it. Basically the JDL is the Condor ClassAd language, so it is legitimate the direct use of the Condor API library for creating, modifying, deleting a job description. However the JobAd class extends the ClassAd class of the Condor ClassAd library additionally providing some helper methods that ease the construction of job descriptions being fully compliant to WP1 WMS specification.
- Version:
- 0.1
- Date:
- 15 April 2002
- Author:
- Alessandro Maraschini <alessandro.maraschini@datamat.it>
Constructor & Destructor Documentation
glite::jdl::JobAd::JobAd |
( |
|
) |
|
Instantiates an empty JobAd object
virtual glite::jdl::JobAd::~JobAd |
( |
|
) |
throw () [virtual] |
glite::jdl::JobAd::JobAd |
( |
const std::string & |
jdl_string |
) |
|
Instantiates a JobAd object from the given ClassAd-jdl string
- Parameters:
-
| jdl_string | A string representig the description of the job |
glite::jdl::JobAd::JobAd |
( |
const classad::ClassAd & |
classAd |
) |
|
Constructor with a ClassAd instance
- Parameters:
-
| classAd | the ClassAd instance where to build the JobAd from |
glite::jdl::JobAd::JobAd |
( |
const JobAd & |
jobad |
) |
|
Copy constructor
- Parameters:
-
| jobad | a JobAd instance to be copied from |
Member Function Documentation
void glite::jdl::JobAd::check |
( |
const bool & |
restore = true |
) |
|
Check the JobAd instance for both syntax and semanthic errors
- Exceptions:
-
virtual void glite::jdl::JobAd::checkInputSandbox |
( |
std::vector< std::string > & |
extracted |
) |
[protected, virtual] |
check values inside inputsanbox attribute and if necessar/y extrapolate them. Could be inherited to change check
- Parameters:
-
| extracted | a vector containing all the found values |
Reimplemented in glite::jdl::NodeAd, and glite::jdl::ParametricAd.
void glite::jdl::JobAd::checkMultiAttribute |
( |
const std::vector< std::string > & |
multi |
) |
|
Check if the Member/isMember expression is properly used in rank and requirements attributes expressions
- Parameters:
-
| multi | a vector containing all the attributes that could be of multiple value type |
- Exceptions:
-
virtual void glite::jdl::JobAd::checkRankReq |
( |
|
) |
[protected, virtual] |
Check and control Rank and Requirements attribute. could be inherited to change check
virtual void glite::jdl::JobAd::checkSyntax |
( |
const std::string & |
attr_name, |
|
|
classad::Value |
attr_value | |
|
) |
| | [virtual] |
virtual void glite::jdl::JobAd::checkSyntax |
( |
const std::string & |
attr_name, |
|
|
classad::ExprTree * |
attr_value | |
|
) |
| | [virtual] |
Check if the couple attribute/value is admitted
- Parameters:
-
| attr_name | the name of the attribute |
| attr_value | a pointer to an ExprTree representing the value to be checkted |
- Exceptions:
-
classad::ExprTree* glite::jdl::JobAd::delAttribute |
( |
const std::string & |
attr_name |
) |
[virtual] |
Delete an Attribute. It fails if the attribute doesn't exist
- Parameters:
-
| attr_name | The name of the attibute to be deleted |
- Returns:
- a deep copy of the expression that has been just deleted for the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
void glite::jdl::JobAd::fromClassAd |
( |
const classad::ClassAd & |
classAd |
) |
[virtual] |
void glite::jdl::JobAd::fromJobAd |
( |
const JobAd & |
jobad |
) |
|
Constructor with a JobAd instance
- Parameters:
-
| jobad | a JobAd instance to be copied |
Ad glite::jdl::JobAd::getAd |
( |
const std::string & |
attr_name |
) |
[virtual] |
Retreive the value of the specified attribute
- Parameters:
-
| attr_name | The name of the attribute name to be retrieved |
- Returns:
- the Ad instance for the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
const std::vector<std::string> glite::jdl::JobAd::getAllowedProtocols |
( |
|
) |
|
Retrieve the list of all allowed protocols for inputsandbox URL format
- Returns:
- a vector containing all the protocols valid for the inputsandbox if provided with a URL format
bool glite::jdl::JobAd::getBool |
( |
const std::string & |
attr_name |
) |
[virtual] |
Retreive the value of the specified attribute
- Parameters:
-
| attr_name | The name of the attribute name to be retrieved |
- Returns:
- the value of the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
double glite::jdl::JobAd::getDouble |
( |
const std::string & |
attr_name |
) |
[virtual] |
Retreive the value of the specified attribute
- Parameters:
-
| attr_name | The name of the attribute name to be retrieved |
- Returns:
- the value of the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
Retrieve the local files to be for the current instance
- Returns:
- a pointer to an ExtractedAd instance, containing all local files to be extracted
int glite::jdl::JobAd::getInt |
( |
const std::string & |
attr_name |
) |
[virtual] |
Retreive the value of the specified attribute
- Parameters:
-
| attr_name | The name of the attribute name to be retrieved |
- Returns:
- the value of the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
std::string glite::jdl::JobAd::getString |
( |
const std::string & |
attr_name |
) |
[virtual] |
Retreive the value of the specified attribute
- Parameters:
-
| attr_name | The name of the attribute name to be retrieved |
- Returns:
- the value of the specified attribute
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
bool glite::jdl::JobAd::gettoBretrieved |
( |
|
) |
[inline] |
Return wheter are there any files to be retrieved This value has significant meaning only after a previous check
References toBretrieved.
virtual void glite::jdl::JobAd::insertAttribute |
( |
const std::string & |
attr_name, |
|
|
classad::ExprTree * |
val | |
|
) |
| | [protected, virtual] |
Evaluate the specified expression and set is as the value of the specified attribute
- Parameters:
-
| attr_name | the name of the attribute to be set |
| val | the expression for the value to be set |
Reimplemented from glite::jdl::Ad.
Reimplemented in glite::jdl::NodeAd, and glite::jdl::ParametricAd.
void glite::jdl::JobAd::operator= |
( |
const JobAd & |
jobad |
) |
[virtual] |
void glite::jdl::JobAd::setAllowedProtocols |
( |
const std::vector< std::string > & |
attr_value |
) |
|
Add a list of protocols to the set of allowed inputsandbox protocols
- Parameters:
-
| attr_value | the list of protocol to be allowed for inputsandbox URL values |
void glite::jdl::JobAd::setAttributeExpr |
( |
const std::string & |
attr_name, |
|
|
ExprTree * |
attr_value | |
|
) |
| | |
Add The specified Expression Attribute to the jdl istance
- Parameters:
-
| attr_name | The Name of the attribute to be added |
| attr_value | The string expression of the attribute to be added |
- Exceptions:
-
void glite::jdl::JobAd::setAttributeExpr |
( |
const std::string & |
attr_name, |
|
|
const std::string & |
attr_value | |
|
) |
| | [virtual] |
Add The specified Expression Attribute to the jdl istance
- Parameters:
-
| attr_name | The Name of the attribute to be added |
| attr_value | The string expression of the attribute to be added |
- Exceptions:
-
Reimplemented from glite::jdl::Ad.
void glite::jdl::JobAd::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::JobAd::setDefaultRank |
( |
const std::string & |
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::JobAd::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::JobAd::setDefaultReq |
( |
const std::string & |
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::JobAd::setLocalAccess |
( |
bool |
lookInto |
) |
|
If JobAd 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) |
void glite::jdl::JobAd::toFile |
( |
const std::string & |
file_path |
) |
|
Put the JobAd Instance as a string into a file
- Parameters:
-
| file_path | the string representation of the file where to copy the JobAd to |
std::string glite::jdl::JobAd::toSubmissionString |
( |
|
) |
|
Convert the JobAd Instance into a single line string representation ready for submission
- Returns:
- the string reoresentation that goes to the NetworkServer
Friends And Related Function Documentation
friend class Job [friend] |
Field Documentation
decide whether to check file extistence (EXISTENCE) or not (WMPROXY)
Analise a path and resolve the wildcards (if present) on it check the existence of (at least one file) the path. Leave URI/URL address unchanged
- Parameters:
-
| attr_name | the attribute to be checked (generally Sandbox values) |
| path | the path to be checked (could contain wildcards) |
| extracted | vector containing the extracted values |
| wmpUri | the WMProxyBaseUri attribute value |
| isbUri | an option parameter specifying the base path for non-local files |
- Returns:
- the vector with the extracted files
void extractFiles(const std::string& attr_name,const std::string& path,std::vector<std::string> &extracted, const std::string &wmpUri="", const std::string &isbUri="") ; user classAd: classad containing all the attributes that could be possibly changed by the check method. This member is utilized in order to ripristinate (restore method ) the old classad situation
The documentation for this class was generated from the following file: