/** * @param file * @return The XmlElement in the document. * @throws IOException */ public static org.xmlpull.infoset.XmlElement loadXML(File file) throws IOException { return loadXML(new FileInputStream(file)); }
/** * Constructs a workflow from a given URI. * @param workflowFilePath The workflow URI path. * @throws GraphException If an error occurred while creating workflow. * @throws ComponentException If an error occurred while parsing the workflow content. */ public Workflow(URI workflowFilePath) throws GraphException, ComponentException { this(); try { XmlElement workflowElement = XMLUtil.loadXML(workflowFilePath.toURL().openStream()); parse(workflowElement); } catch (RuntimeException e) { throw new GraphException(e); } catch (IOException e) { throw new GraphException(e); } }
workflow = Workflow.graphToWorkflow(graph); } else { XmlElement workflowElement = XMLUtil.loadXML(file); workflow = new Workflow(workflowElement);
importedWorkflow = Workflow.graphToWorkflow(importedGraph); } else { XmlElement importedWorkflowElement = XMLUtil.loadXML(file); importedWorkflow = new Workflow(importedWorkflowElement);