Package LONI.tree.module

Examples of LONI.tree.module.Value


    // TODO Auto-generated constructor stub
  }

  @Override
  public Map<String, String> mapFromObject(Object o) {
    Value v = (Value) o;
    Map<String, String> map = new TreeMap<String, String>();
    String value = v.getValue();
    String metadata= v.getMetadata();
    // TODO Auto-generated method stub
    if(value != null)
      map.put(VALUE_TAG, v.getValue());
    if(metadata != null)
      map.put("metadata", metadata);
   
    return map;
  }
View Full Code Here


    String metadata;
    String value;
    metadata = attributes.get("metadata");
    value = attributes.get(VALUE_TAG);
    if(metadata == null) metadata = "";
    return new Value(metadata, value);
  }
View Full Code Here

    setupScript.setFileFormat(new Format());
    setupScript.getFileFormat().setCardinality(1);
    setupScript.getFileFormat().setType("String");
    setupScript.setOrder(0);
    setupScript.setName("setupScript");
    Value scriptValue = new Value();
    scriptValue.setValue("{"+SCRIPT_DIR+"}setup_workflow.py");
    setupScript.getValues().addValue(scriptValue);
    setupModule.getInputs().add(setupScript);
   
    //Create the String Parameter that contains the Galaxy API Key
    //for the setupScript Module.
    LONI.tree.module.Parameter setupAPI = new LONI.tree.module.Parameter();
    setupAPI.setEnabled(true);
    setupAPI.setFileFormat(new Format());
    setupAPI.getFileFormat().setCardinality(1);
    setupAPI.getFileFormat().setType("String");
    setupAPI.setOrder(1);
    setupAPI.setName("Galaxy API Key");
    setupAPI.setPrefix("-api-key");
    setupAPI.setPrefixSpaced(true);
    Value apiValue = new Value();
    apiValue.setValue("{"+API_KEY+"}");
    setupAPI.getValues().addValue(apiValue);
    setupModule.getInputs().add(setupAPI);
   
    /*
     * Initialize and add the String parameter that contains the Galaxy Root Directory
     * to the setup Module. This directory is used to call python scripts inside Galaxy.
     */
    LONI.tree.module.Parameter setupGalRootDir = new LONI.tree.module.Parameter();
    setupGalRootDir.setEnabled(true);
    setupGalRootDir.setFileFormat(new Format());
    setupGalRootDir.getFileFormat().setCardinality(1);
    setupGalRootDir.getFileFormat().setType("String");
    setupGalRootDir.setOrder(1);
    setupGalRootDir.setName("Galaxy Root Dir");
    setupGalRootDir.setPrefix("-galaxy-root-dir");
    setupGalRootDir.setPrefixSpaced(true);
    Value setupGalRootDirValue = new Value();
    setupGalRootDirValue.setValue("{"+GALAXY_DIR+"}");
    setupGalRootDir.getValues().addValue(setupGalRootDirValue);
    setupModule.getInputs().add(setupGalRootDir);
   
    /*
     * Initialize and add String parameter containing Galaxy server url to setup module.
     */
    LONI.tree.module.Parameter setupGalURLDir = new LONI.tree.module.Parameter();
    setupGalURLDir.setEnabled(true);
    setupGalURLDir.setFileFormat(new Format());
    setupGalURLDir.getFileFormat().setCardinality(1);
    setupGalURLDir.getFileFormat().setType("String");
    setupGalURLDir.setOrder(2);
    setupGalURLDir.setPrefixSpaced(true);
    setupGalURLDir.setName("Galaxy URL");
    setupGalURLDir.setPrefix("-galaxy-url");
    Value setupGalaxyURLValue = new Value();
    setupGalaxyURLValue.setValue("{"+GALAXY_URL+"}");
    setupGalURLDir.getValues().addValue(setupGalaxyURLValue);
    setupModule.getInputs().add(setupGalURLDir);
   
    /*
     * Initialize and add String cookie parameter containing cookie for website
     * to setup module.
     */
    LONI.tree.module.Parameter setupCookie = new LONI.tree.module.Parameter();
    setupCookie.setEnabled(true);
    setupCookie.setFileFormat(new Format());
    setupCookie.getFileFormat().setCardinality(1);
    setupCookie.getFileFormat().setType("String");
    setupCookie.setOrder(2);
    setupCookie.setName("Cookie for galaxy site");
    setupCookie.setPrefix("-cookie");
    setupCookie.setPrefixSpaced(true);
    Value setupCookieValue = new Value();
    setupCookieValue.setValue("{"+COOKIE+"}");
    setupCookie.getValues().addValue(setupCookieValue);
    setupModule.getInputs().add(setupCookie);
   
    /*
     * Initialize and fill in the run module.
     *
     */
    runModule = new Module();
    runModule.setRotation(4);
    runContext = new LoniContext();
    runModule.setId("Run");
    runModule.setLocation(ConverterConstants.LOCALHOST_PATH + ConverterConfig.PYTHON_BIN);
   
    //Add the String script parameter containing the name of the script to run.
    LONI.tree.module.Parameter runScript = new LONI.tree.module.Parameter();
    runScript.setEnabled(true);
    runScript.setFileFormat(new Format());
    runScript.getFileFormat().setCardinality(1);
    runScript.getFileFormat().setType("String");
    runScript.setOrder(0);
    runScript.setName("runScript");
    scriptValue = new Value();
    scriptValue.setValue("{"+SCRIPT_DIR+"}run_workflow.py");
    runScript.getValues().addValue(scriptValue);
    runModule.getInputs().add(runScript);
   
    //Create the workflow output to the run module. This output contains
View Full Code Here

        output.getFormat().setTransformationBase("");
       
        // Create and fill in file types for format
        output.getFormat().getFileTypes().addFileType(new FileType(TavernaType, "", ""))
       
        output.getValues().addValue(new Value("hi", "there"));
        dataModule.addOutput(output);
        break;
      }
    }
    return dataModule;
View Full Code Here

    scriptParam.setEnabled(true);
    scriptParam.setOrder(0);
    scriptParam.setFileFormat(new Format());
    scriptParam.getFileFormat().setType("String");
    scriptParam.getFileFormat().setCardinality(1);
    Value val = new Value();
    val.setValue(wrapper);
    scriptParam.getValues().addValue(val);
    args.add(scriptParam);       
   
    if(c.getlWACB() != null){
      Parameter scriptBody = new Parameter();
      scriptBody.setName("Beanshell script body");
      scriptBody.setEnabled(true);
      scriptBody.setOrder(1);
      scriptBody.setPrefix("@");
      scriptBody.setPrefixSpaced(false);
      scriptBody.setFileFormat(new Format());
      scriptBody.getFileFormat().setType("String");
      scriptBody.getFileFormat().setCardinality(1);
      Value myval = new Value();
      myval.setValue(cleanStringValue(c.getlWACB().getScript()));
      scriptBody.getValues().addValue(myval);
      args.add(scriptBody);
     
      List<Parameter> inputs = (List<Parameter> ) visit(c.getlWACB().getIWACBIn());
      List<Output> outputs = (List<Output>) visit(c.getlWACB().getiWACBOut());
View Full Code Here

TOP

Related Classes of LONI.tree.module.Value

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.