Examples of JythonScript


Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

        File workflowFile = new File("tmp/simple-math.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Creates a Jython script
        File jythonFile = new File("tmp/simple-math.py");
        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
        IOUtil.writeToFile(script.getJythonString(), jythonFile);
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

        File graphFile = new File("tmp/complex-math.xwf");
        XMLUtil.saveXML(workflow.toXML(), graphFile);

        // Creates a Jython script
        File jythonFile = new File("tmp/complex-math.py");
        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
        IOUtil.writeToFile(script.getJythonString(), jythonFile);
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

    /**
     * Exports a Jython script to the local file
     */
    public void exportJythonScript() {
        Workflow workflow = this.engine.getWorkflow();
        JythonScript script = new JythonScript(workflow, this.engine
                .getConfiguration());

        // Check if there is any errors in the workflow first.
        ArrayList<String> warnings = new ArrayList<String>();
        if (!script.validate(warnings)) {
            StringBuilder buf = new StringBuilder();
            for (String warning : warnings) {
                buf.append("- ");
                buf.append(warning);
                buf.append("\n");
            }
            this.engine.getErrorWindow().warning(buf.toString());
            return;
        }

        int returnVal = this.jythonFileChooser.showSaveDialog(this.engine
                .getGUI().getFrame());
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = this.jythonFileChooser.getSelectedFile();
            logger.finest(file.getPath());

            // Put ".py" at the end of the file name
            String path = file.getPath();
            if (!path.endsWith(XBayaConstants.JYTHON_SCRIPT_SUFFIX)) {
                file = new File(path + XBayaConstants.JYTHON_SCRIPT_SUFFIX);
            }

            try {
                // Create the script.
                script.create();
                // Write to a file
                IOUtil.writeToFile(script.getJythonString(), file);
            } catch (IOException e) {
                this.engine.getErrorWindow().error(
                        ErrorMessages.WRITE_FILE_ERROR, e);
            } catch (GraphException e) {
                this.engine.getErrorWindow().error(
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

    try {
      if (this.xregistryClient == null) {
        connectToXRegistry();
      }
      Workflow workflow = this.engine.getWorkflow();
      JythonScript script = new JythonScript(workflow, this.engine.getConfiguration());

      // Check if there is any errors in the workflow first.
      ArrayList<String> warnings = new ArrayList<String>();
      if (!script.validate(warnings)) {
        StringBuilder buf = new StringBuilder();
        for (String warning : warnings) {
          buf.append("- ");
          buf.append(warning);
          buf.append("\n");
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

        Workflow workflow = creator.createGFacWorkflow();

        File workflowFile = new File("tmp/gfac-test.xwf");
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
        String jythonString = script.getJythonString();
        String filename = "tmp/gfac-test.py";
        IOUtil.writeToFile(jythonString, filename);

        // String[] argv = new String[] { filename, "-TestCMD_Simple_wsdl",
        // GFAC_TEST_WSDL };
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

        this.engine = engine;
        this.workflow = this.engine.getWorkflow();
        this.topicTextField = topicTextField;
        this.parameterTextFields = parameterTextFields;
        this.gfacTextField = new XBayaTextField();
        this.script = new JythonScript(this.workflow, this.engine
                .getConfiguration());

        MonitorConfiguration notifConfig = this.engine.getMonitor()
                .getConfiguration();
        if (notifConfig.getBrokerURL() == null) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

    /**
     * Shows the dialog.
     */
    public void show() {
        this.workflow = this.engine.getWorkflow();
        this.script = new JythonScript(this.workflow, this.engine
                .getConfiguration());

        MonitorConfiguration notifConfig = this.engine.getMonitor()
                .getConfiguration();
        if (notifConfig.getBrokerURL() == null) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

        assertEquals(workflowFileString, workflowFile2String);

        // Create a Jython script
        File jythonFile = new File(this.temporaryDirectory,
                "web-complex-math.py");
        JythonScript script = new JythonScript(workflow, this.configuration);
        script.create();
        IOUtil.writeToFile(script.getJythonString(), jythonFile);
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

  /**
   * Shows the dialog.
   */
  public void show() {
    this.workflow = this.engine.getWorkflow();
    this.script = new JythonScript(this.workflow,
        this.engine.getConfiguration());

    MonitorConfiguration notifConfig = this.engine.getMonitor()
        .getConfiguration();
    if (notifConfig.getBrokerURL() == null) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.jython.script.JythonScript

      return;
    }

    // Check if the workflow is valid before the user types in input
    // values.
    JythonScript jythonScript = new JythonScript(this.workflow,
        this.engine.getConfiguration());
    ArrayList<String> warnings = new ArrayList<String>();
    if (!jythonScript.validate(warnings)) {
      StringBuilder buf = new StringBuilder();
      for (String warning : warnings) {
        buf.append("- ");
        buf.append(warning);
        buf.append("\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.