jdl-api-cpp-3.4.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
collectionad.h
Go to the documentation of this file.
1 /*
2 Copyright (c) Members of the EGEE Collaboration. 2004.
3 See http://www.eu-egee.org/partners/ for details on the
4 copyright holders.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15 either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 */
19 
20 #ifndef GLITE_WMS_COMMON_REQUESTAD_COLLECTIONAD_H
21 #define GLITE_WMS_COMMON_REQUESTAD_COLLECTIONAD_H
22 /*
23  * collectionad.h
24  * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved.
25  * Contributors are mentioned in the code where appropriate.
26  */
27 
28 #include "Ad.h"
29 #include "NodeAd.h"
30 #include "extractfiles.h"
31 namespace glite {
32 namespace jdl {
42 public:
44  CollectionAd( const classad::ClassAd& classAd );
46  CollectionAd();
48  CollectionAd( const std::string& classAd );
50  void operator=(const CollectionAd& collect) ;
52  virtual ~CollectionAd() throw();
60  std::string toSubmissionString();
66  std::vector< std::string > getNodeStringValue (const std::string &node, const std::string &attr_name);
73  std::vector< std::pair<std::string ,std::vector< std::string > > >
74  getNodeStringValues (const std::string &attr_name);
81  std::map<std::string, std::vector< std::string > >
82  getNodeStringValuesMap (const std::string &attr_name);
83 
89  void setLocalAccess(bool lookInto);
94  void setDefaultRank (classad::ExprTree* attr_value);
95 
100  void setDefaultReq (classad::ExprTree* attr_value );
105  bool gettoBretrieved(){return toBretrieved;}
116  void addNode(Ad node);
117 private:
118  void checkNode(NodeAd &nodead,std::vector<std::string> &extracted);
119  void checkNodes(CollectionAd *collect,std::vector<std::string> &extracted);
120  // decide whether to check file extistence (EXISTENCE) or not (WMPROXY)
121  checkType lookInto_b;
122  bool toBretrieved ;
123  // Default special attributes:
124  classad::ExprTree *defaultRank ;
125  classad::ExprTree *defaultReq ;
126  // extracted local files
127  ExtractedAd *extractedAd ;
128 };
129 
130 } // jdl namespace
131 } // glite namespace
132 
133 #endif
134 
135 //EOF
Provides a representation of the job description in the JDL language.
Definition: NodeAd.h:43
bool gettoBretrieved()
Definition: collectionad.h:105
Provides a representation of collection (bunch) of jobs.
Definition: collectionad.h:41
CollectionAd * check()
std::string toSubmissionString()
Definition: Ad.h:67
std::vector< std::pair< std::string,std::vector< std::string > > > getNodeStringValues(const std::string &attr_name)
void setLocalAccess(bool lookInto)
void setDefaultReq(classad::ExprTree *attr_value)
void operator=(const CollectionAd &collect)
std::vector< std::string > getNodeStringValue(const std::string &node, const std::string &attr_name)
std::map< std::string, std::vector< std::string > > getNodeStringValuesMap(const std::string &attr_name)
Definition: extractfiles.h:56
ExtractedAd * getExtractedAd()
void setDefaultRank(classad::ExprTree *attr_value)
checkType
Provides a method for extracting files from a specified path.
Definition: extractfiles.h:215