#include <glite/jdl/ExpDagAd.h>
Public Types | |
EDG_JOBID | |
VIRTUAL_ORGANISATION | |
MYPROXY_SERVER | |
SEQUENCE_CODE | |
ISB_DEST_URI | |
SUBMIT_TO | |
INPUTSB | |
ZIPPED_ISB | |
CURRENT | |
SUBMISSION | |
NO_NODES | |
MULTI_LINES | |
RESTORED | |
enum | attribute { EDG_JOBID, VIRTUAL_ORGANISATION, MYPROXY_SERVER, SEQUENCE_CODE, ISB_DEST_URI, SUBMIT_TO } |
enum | multiAttribute { INPUTSB, ZIPPED_ISB } |
enum | level { CURRENT, SUBMISSION, NO_NODES, MULTI_LINES, RESTORED } |
Public Member Functions | |
std::string | toString (const level &lev=CURRENT) |
std::vector< std::string > | getSubmissionStrings (std::vector< std::string > *jobids=NULL) |
std::string | jobid2node (const std::string &jobid) |
Constructors/Destructor | |
ExpDagAd (const std::string &jdl) | |
ExpDagAd (std::ifstream &jdl_in) | |
ExpDagAd (const ExpDagAd &dag) | |
ExpDagAd (Ad *ad) | |
ExpDagAd (const classad::ClassAd &classAd) | |
void | operator= (const ExpDagAd &dag) |
ExpDagAd (DAGAd *ad) | |
virtual | ~ExpDagAd () throw () |
ExpDagAd * | check () |
Has attribute | |
bool | hasAttribute (const std::string &attr_name) |
bool | hasNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name) |
bool | hasNodeAttribute (const std::string &node, const std::string &attr_name) |
Node Replacing | |
void | replaceNode (const glite::jobid::JobId &nodeId, NodeAd &nodeAd) |
void | replaceNode (const std::string &nodeName, NodeAd &nodeAd) |
setNodeAttribute | |
void | setNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name, const std::string &attr_value) |
void | setNodeAttribute (const std::string &node, const std::string &attr_name, const std::string &attr_value) |
void | setNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name, int &attr_value) |
void | setNodeAttribute (const std::string &node, const std::string &attr_name, int &attr_value) |
void | setNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name, bool &attr_value) |
void | setNodeAttribute (const std::string &node, const std::string &attr_name, bool &attr_value) |
void | setNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name, const std::vector< std::string > &attr_value) |
void | setNodeAttribute (const std::string &node, const std::string &attr_name, const std::vector< std::string > &attr_value) |
getNode methods | |
NodeAd | getNode (const glite::jobid::JobId &nodeId) |
NodeAd | getNode (const std::string &nodeName) |
std::vector< std::string > | getNodeStringValue (const glite::jobid::JobId &node, const std::string &attr_name) |
std::vector< std::string > | getNodeStringValue (const std::string &node, const std::string &attr_name) |
int | getNodeInt (const glite::jobid::JobId &node, const std::string &attr_name) |
int | getNodeInt (const std::string &node, const std::string &attr_name) |
bool | getNodeBool (const glite::jobid::JobId &node, const std::string &attr_name) |
bool | getNodeBool (const std::string &node, const std::string &attr_name) |
std::string | getNodeAttribute (const std::string &node, const std::string &attr_name) |
std::vector< std::pair< std::string, classad::ExprTree * > > | getSubAttributes (const std::string &attr_name) |
std::vector< std::string > | getNodes () |
Del/Remove | |
void | delNodeAttribute (const glite::jobid::JobId &node, const std::string &attr_name) |
void | delNodeAttribute (const std::string &node, const std::string &attr_name) |
bool | removeAttribute (attribute attr_name) |
bool | removeAttribute (const std::string &attr_name) |
Miscellanous methods | |
void | getJobIdStruct (JobIdStruct &jobIdStruct) |
std::map< std::string, std::string > | getJobIdMap () |
bool | gettoBretrieved () |
ExtractedAd * | getExtractedAd () |
void | inherit (const std::string &attr_name) |
void | setLocalAccess (bool lookInto) |
void | expand () |
std::string | showDependencies () |
get Attributes | |
std::string | getAttribute (attribute attr_name) |
std::string | getString (const std::string &attr_name) |
bool | getBool (const std::string &attr_name) |
Ad | getAttributeAd (const std::string &attr_name) |
std::vector< std::string > | getInputSandbox () |
classad::Value | getTypeValue (const std::string &attr_name) |
std::vector< std::string > | getStringValue (const std::string &attr_name) |
std::vector< std::string > | getAttribute (multiAttribute attr_name) |
set Attributes | |
void | setAttribute (attribute attr_name, const std::string &attr_value) |
void | setAttribute (multiAttribute attr_name, const std::vector< std::string > &attr_values) |
std::size_t | size () |
default values | |
const std::string | getDefaultRank () |
const std::string | getDefaultReq () |
void | setDefaultRank (const std::string &attr_value) |
void | setDefaultReq (const std::string &attr_value) |
void | setDefaultRank (classad::ExprTree *attr_value) |
void | setDefaultReq (classad::ExprTree *attr_value) |
void | setDefaultValues (bool val) |
Warnings Management | |
bool | hasWarnings () |
std::vector< std::string > | getWarnings () |
void | addWarning (const std::string &msg) |
void | addWarnings (const std::string &nodeName, Ad *ad) |
Protected Attributes | |
boost::shared_ptr< glite::jdl::DAGAd > | dagad |
Provide a Userinterface-friendly utilisation for DagAd class for the WMS environment The user is able to create , modify and check a DagAd in order to prepare it to the submission and to perform other simple operations
Possible attribute (of string type) to be set/get/removed from instance
glite::jdl::ExpDagAd::ExpDagAd | ( | const std::string & | jdl | ) |
Constructor from String
glite::jdl::ExpDagAd::ExpDagAd | ( | std::ifstream & | jdl_in | ) |
Constructor from Stream
glite::jdl::ExpDagAd::ExpDagAd | ( | const ExpDagAd & | dag | ) |
Constructor Copy
glite::jdl::ExpDagAd::ExpDagAd | ( | const classad::ClassAd & | classAd | ) |
Constructor From classad
glite::jdl::ExpDagAd::ExpDagAd | ( | DAGAd * | ad | ) |
Constructor from DagAd
virtual glite::jdl::ExpDagAd::~ExpDagAd | ( | ) | throw () [virtual] |
destructor
void glite::jdl::ExpDagAd::addWarning | ( | const std::string & | msg | ) |
Add a new warning message to Warnings may be due to usage of deprecated attributes, methods, procedures.
msg | the warning message to be appended |
void glite::jdl::ExpDagAd::addWarnings | ( | const std::string & | nodeName, | |
Ad * | ad | |||
) |
Add all warnings (if any) from a specified ad
nodeName | the name of the node | |
ad | the ad where to retrieves warning messages to be appended |
ExpDagAd* glite::jdl::ExpDagAd::check | ( | ) |
Check whether the instance can be submitted or not, verifying all the inserted attribute and their values return the parsed (possibly internally modified ExpDagAd)
void glite::jdl::ExpDagAd::delNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Remove (if present) the attribute from the specified nde
node | the name of the node to be looked for | |
attr_name | the name of the attributeto be retrieved |
void glite::jdl::ExpDagAd::delNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name | |||
) |
Delete the specified attribute for the selected node
node | the jobid to be analized | |
attr_name | the attribute to be removed |
void glite::jdl::ExpDagAd::expand | ( | ) |
Expand the "nodes" attribute into a vector of JobAds Load jdls for files-nodes type
std::vector<std::string> glite::jdl::ExpDagAd::getAttribute | ( | multiAttribute | attr_name | ) |
DEPRECATED Set the value of a vector of strings attribute in the DagAd
attr_name | the name of the attribute to be set |
std::string glite::jdl::ExpDagAd::getAttribute | ( | attribute | attr_name | ) |
Retrieve the value of an attribute in the DagAd
attr_name | the name of the attribute to be retrieved |
Ad glite::jdl::ExpDagAd::getAttributeAd | ( | const std::string & | attr_name | ) |
bool glite::jdl::ExpDagAd::getBool | ( | const std::string & | attr_name | ) |
Retrieve the boolean value of an attribute in the DagAd
attr_name | the name of the attribute to be retrieved |
const std::string glite::jdl::ExpDagAd::getDefaultRank | ( | ) |
Retrieve the default Rank value as set by the user
const std::string glite::jdl::ExpDagAd::getDefaultReq | ( | ) |
Retrieve the default Requrirements value as set by the user
ExtractedAd* glite::jdl::ExpDagAd::getExtractedAd | ( | ) |
Retrieve the local files to be for the current instance
std::vector<std::string> glite::jdl::ExpDagAd::getInputSandbox | ( | ) |
Retrieve the list of InputSandbox values of the DagAd
std::map<std::string,std::string> glite::jdl::ExpDagAd::getJobIdMap | ( | ) |
Retrieve the structure of the DagAd as a map of jobid,node all jobids must be already inserted (exception thrown otherwise)
void glite::jdl::ExpDagAd::getJobIdStruct | ( | JobIdStruct & | jobIdStruct | ) |
Retrieve the structure of the DagAd as in the current position. The first item is the Dag itself which has no node (NULL) and which contains all its children info inside all jobids must be already inserted (exception thrown otherwise)
jobIdStruct | the JobId structure of the DagAd. |
NodeAd glite::jdl::ExpDagAd::getNode | ( | const std::string & | nodeName | ) |
NodeAd glite::jdl::ExpDagAd::getNode | ( | const glite::jobid::JobId & | nodeId | ) |
std::string glite::jdl::ExpDagAd::getNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string value for the specified attribute
node | the name of the node to be looked for | |
attr_name | the name of the attributeto be retrieved |
bool glite::jdl::ExpDagAd::getNodeBool | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the name of the node to be looked for | |
attr_name | the name of the attributeto be retrieved |
bool glite::jdl::ExpDagAd::getNodeBool | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the jobid to be looked for | |
attr_name | the name of the attributeto be retrieved |
int glite::jdl::ExpDagAd::getNodeInt | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the name of the node to be looked for | |
attr_name | the name of the attributeto be retrieved |
int glite::jdl::ExpDagAd::getNodeInt | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the jobid to be looked for | |
attr_name | the name of the attributeto be retrieved |
std::vector<std::string> glite::jdl::ExpDagAd::getNodes | ( | ) |
Retrieve the DagAd nodes names
std::vector< std::string > glite::jdl::ExpDagAd::getNodeStringValue | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the name of the node to be looked for | |
attr_name | the name of the attributeto be retrieved |
std::vector< std::string > glite::jdl::ExpDagAd::getNodeStringValue | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name | |||
) |
Retrieve (if present) the string values for the specified attribute
node | the jobid to be looked for | |
attr_name | the name of the attributeto be retrieved |
std::string glite::jdl::ExpDagAd::getString | ( | const std::string & | attr_name | ) |
Retrieve the string value of an attribute in the DagAd
attr_name | the name of the attribute to be retrieved |
std::vector<std::string> glite::jdl::ExpDagAd::getStringValue | ( | const std::string & | attr_name | ) |
std::vector< std::pair< std::string , classad::ExprTree* > > glite::jdl::ExpDagAd::getSubAttributes | ( | const std::string & | attr_name | ) |
Retrieve the DagAd nodes values of a specified attribute
attr_name | the name of the attribute to be retrieved |
std::vector<std::string> glite::jdl::ExpDagAd::getSubmissionStrings | ( | std::vector< std::string > * | jobids = NULL |
) |
Check the node of the DagAd and retrieve their submission strings
jobids | fill the vector with jobids value in the same order as returned submission strings |
bool glite::jdl::ExpDagAd::gettoBretrieved | ( | ) | [inline] |
Return wheter are there any files to be retrieved This value has significant meaning only after a previous check
classad::Value glite::jdl::ExpDagAd::getTypeValue | ( | const std::string & | attr_name | ) |
std::vector<std::string> glite::jdl::ExpDagAd::getWarnings | ( | ) |
Retrieve all collected warnings Warnings may be due to usage of deprecated attributes, methods, procedures.
bool glite::jdl::ExpDagAd::hasAttribute | ( | const std::string & | attr_name | ) |
Check if an attribute is present inside the DagAd
attr_name | the name of the attribute to be looked for |
bool glite::jdl::ExpDagAd::hasNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name | |||
) |
Check wheter the attribute has been already specified for the jobid
node | the name of the node to be modified | |
attr_name | the name of the attribute to be inserted |
bool glite::jdl::ExpDagAd::hasNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name | |||
) |
Check wheter the attribute has been already specified for the jobid
node | the jobid of the node to be modified | |
attr_name | the name of the attribute to be inserted |
bool glite::jdl::ExpDagAd::hasWarnings | ( | ) |
Determine whether there are any warning. Warnings may be due to usage of deprecated attributes, methods, procedures.
void glite::jdl::ExpDagAd::inherit | ( | const std::string & | attr_name | ) |
Set an attribute to be inherited at once inside the ExpDagAd
attr_name | the attribute to be inherited |
std::string glite::jdl::ExpDagAd::jobid2node | ( | const std::string & | jobid | ) |
Retrieve the node for the specified Jobid
jobid | the string representatio of the required jobid |
void glite::jdl::ExpDagAd::operator= | ( | const ExpDagAd & | dag | ) |
Operator =
bool glite::jdl::ExpDagAd::removeAttribute | ( | const std::string & | attr_name | ) |
delete an attribue from the DagAd
attr_name | the name of the attribute to be removed |
bool glite::jdl::ExpDagAd::removeAttribute | ( | attribute | attr_name | ) |
delete an attribue from the DagAd
attr_name | the name of the attribute to be removed |
void glite::jdl::ExpDagAd::replaceNode | ( | const std::string & | nodeName, | |
NodeAd & | nodeAd | |||
) |
Set the couple attribute = value for the specified node inside the classad
nodeName | the name of the node to be replaced | |
nodeAd | the NodeAd to be set for the specified node |
void glite::jdl::ExpDagAd::replaceNode | ( | const glite::jobid::JobId & | nodeId, | |
NodeAd & | nodeAd | |||
) |
void glite::jdl::ExpDagAd::setAttribute | ( | multiAttribute | attr_name, | |
const std::vector< std::string > & | attr_values | |||
) |
Set the value of a vector of strings attribute in the DagAd
attr_name | the name of the attribute to be set | |
attr_values | the multiAttribute of the value to be set as a vector of strings |
void glite::jdl::ExpDagAd::setAttribute | ( | attribute | attr_name, | |
const std::string & | attr_value | |||
) |
Set the string value of an attribute in the DagAd
attr_name | the name of the attribute to be set | |
attr_value | the attribute of the value to be set |
void glite::jdl::ExpDagAd::setDefaultRank | ( | classad::ExprTree * | attr_value | ) |
Set the default value for Rank attribute (take in consideration if not specified in JDL)
attr_value | the value to be set to the default rank |
void glite::jdl::ExpDagAd::setDefaultRank | ( | const std::string & | attr_value | ) |
Set the default value for Rank attribute (take in consideration if not specified in JDL)
attr_value | the value to be set to the default rank |
void glite::jdl::ExpDagAd::setDefaultReq | ( | classad::ExprTree * | attr_value | ) |
Set the default value for Requirements attribute (take in consideration if not specified in JDL)
attr_value | the value to be set to the default requirements |
void glite::jdl::ExpDagAd::setDefaultReq | ( | const std::string & | attr_value | ) |
Set the default value for Requirements attribute (take in consideration if not specified in JDL)
attr_value | the value to be set to the default requirements |
void glite::jdl::ExpDagAd::setDefaultValues | ( | bool | val | ) | [inline] |
Set the default values for UI manipulation such as: userTag UI node name
val | whether to set (true) or not (false) such values while submitting |
void glite::jdl::ExpDagAd::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
lookInto | allow all the check methods to access to the local hard disk (true) or skip the check (false) |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name, | |||
const std::vector< std::string > & | attr_value | |||
) |
Set a vector of strings for the specified attribute and node
node | the name of the node to be modified | |
attr_name | the attribute to be added | |
attr_value | the list of values (expressed as a vector of strings) to be inserted |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name, | |||
const std::vector< std::string > & | attr_value | |||
) |
Set a vector of strings for the specified attribute and node
node | the jobid to be modified | |
attr_name | the attribute to be added | |
attr_value | the list of values (expressed as a vector of strings) to be inserted |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name, | |||
bool & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the name of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the boolean attribute to be inserted for the specified attribute |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name, | |||
bool & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the jobid of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the boolean attribute to be inserted for the specified attribute |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name, | |||
int & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the name of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the integer attribute to be inserted for the specified attribute |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name, | |||
int & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the jobid of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the integer attribute to be inserted for the specified attribute |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const std::string & | node, | |
const std::string & | attr_name, | |||
const std::string & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the name of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the string attribute to be inserted for the specified attribute |
void glite::jdl::ExpDagAd::setNodeAttribute | ( | const glite::jobid::JobId & | node, | |
const std::string & | attr_name, | |||
const std::string & | attr_value | |||
) |
Set the couple attribute = value for the specified node inside the classad
node | the jobid of the node to be modified | |
attr_name | the name of the attribute to be inserted | |
attr_value | the value of the string attribute to be inserted for the specified attribute |
std::string glite::jdl::ExpDagAd::showDependencies | ( | ) |
Represent dependency by a formatted string
std::size_t glite::jdl::ExpDagAd::size | ( | ) |
DagAd dimension retrieval
std::string glite::jdl::ExpDagAd::toString | ( | const level & | lev = CURRENT |
) |
Return the string representation of the DagAd
lev | one of the allowed level |
boost::shared_ptr<glite::jdl::DAGAd> glite::jdl::ExpDagAd::dagad [protected] |
Internal DAGAd instance