Package Galaxy.Tree.Tool.Command

Source Code of Galaxy.Tree.Tool.Command.ParsedCommand

package Galaxy.Tree.Tool.Command;

import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import Galaxy.Tree.Workflow.ToolState;
import Galaxy.Tree.Workflow.ToolState.Primitive;

public class ParsedCommand {
  List<String> fieldValues;
  List<String> fieldMetadataValues;
  String script;
 
  private String process(String text, Map<String,Primitive> map){
    for(String key : map.keySet()){
      Primitive p = map.get(key);
      text = text.replaceAll(key, p.toString());
    }
    return text;
  }
 
  private String[] tokenize(String line){
    String[] tokens;
    String cleanline;
    if(line.charAt(0) == '#'){
      cleanline = line.replaceFirst("#", "");
    }
    else{
      cleanline = line;
    }
    tokens = cleanline.split("[   ()=]");;
    return tokens;
  }
  public ParsedCommand(String code, Map<String,Primitive> paramMap){
    script = "/bin/bash/!\n";
    String staticCode = process(code, paramMap);
    System.out.println(staticCode);
   
  }
 
}
TOP

Related Classes of Galaxy.Tree.Tool.Command.ParsedCommand

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.