Package gri.tasks.managers

Examples of gri.tasks.managers.JobSubmission


    public Object read(Element elem) throws IOException {
        return readJob(elem);
    }
   
    public JobSubmission readJob(Element elem) throws IOException {
        JobSubmission submission = new JobSubmission();
       
        List children = elem.getChildren();
        Element child;
       
        for(int i=0; i<children.size(); i++) {
            child = (Element)children.get(i);
            String name = child.getName().toLowerCase();
           
            if (name.equals("task"))
                submission.setTaskId(child.getText());
            else if (name.equals("parameters")) {
                Map params = (Map)mapSerializer.read(child);
                submission.setInputs(params);
            }
        }
       
        return submission;
    }
View Full Code Here


      }

      //set inputs:
      Iterator entries = inputs.entrySet().iterator();

      JobSubmission submission = new JobSubmission(taskInfo.getTaskId());
      while (entries.hasNext()) {
        Map.Entry entry = (Map.Entry)entries.next();
        String paramName = entry.getKey().toString();
        Object value = entry.getValue();
        submission.setInput(paramName, value);
      }

      try {
        submitJob(taskInfo, submission);
      }
View Full Code Here

TOP

Related Classes of gri.tasks.managers.JobSubmission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.