Package gri.data.serializers.jdom

Examples of gri.data.serializers.jdom.MissingElementException


    ModuleManager moduleManager;
    RunScriptTask runScriptTask;

    Element moduleElem = elem.getChild("modules");
    if (moduleElem == null)
      throw new MissingElementException("modules");
    moduleManager = (ModuleManager)moduleManagerSerializer.read(moduleElem);

    Element scriptElem = elem.getChild("script");
    if (scriptElem == null)
      throw new MissingElementException("script");
    runScriptTask = (RunScriptTask)scriptSerializer.read(scriptElem);

    return new GridpTaskManager(moduleManager, runScriptTask);
  }
View Full Code Here


  elem.addContent(outputElem);
    }
    public WorkflowOutputReference readRef(Element elem) throws IOException {
  Element taskElem = elem.getChild("task");
  if (taskElem == null)
      throw new MissingElementException("task", elem);
  int taskIndex = Integer.parseInt(taskElem.getText());

  Element outputElem = elem.getChild("output");
  if (outputElem == null)
      throw new MissingElementException("output", elem);
  String outputName = outputElem.getText();

  return new WorkflowOutputReference(taskIndex, outputName);
    }
View Full Code Here

     */
    public static String readTaskId(Element elem) throws IOException {
 
  Element taskElem = elem.getChild("task");
  if (taskElem == null)
      throw new MissingElementException("task", elem);
 
  return taskElem.getText();
 
    }
View Full Code Here

    public WorkflowInfo readWorkflowInfo(Element elem) throws IOException {
       
  //id:
  Element idElem = elem.getChild("id");
  if (idElem == null)
      throw new MissingElementException("id");
  String id = idElem.getText();
       
  //jobs:
  Element jobsElem = elem.getChild("jobs");
  if (jobsElem == null)
      throw new MissingElementException("jobs");
  List jobs = jobInfoListSerializer.readList(jobsElem);

        WorkflowInfo info = new WorkflowInfo(id, toInfoArray(jobs));
       
        //status:
View Full Code Here

      */
    }

    //validate:
    if (task.getSessionFactory() == null)
      throw new MissingElementException("ssh", elem);
    if (task.getScriptFileName() == null)
      throw new MissingElementException("scriptFile", elem);
    if (task.getExecutionCommand() == null)
      throw new MissingElementException("execCommand", elem);

    return task;
  }
View Full Code Here

        return null;
    }

    Element baseDirElem = elem.getChild("baseDir");
    if (baseDirElem == null)
      throw new MissingElementException("baseDir", elem);

    return new SimpleRemoteFolderFactory(baseDirElem.getText());
  }
View Full Code Here

TOP

Related Classes of gri.data.serializers.jdom.MissingElementException

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.