Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/embl/ebi/escience/scufl/talisman/Scufl2XScufl.java


1   /**
2    * This file is a component of the Taverna project,
3    * and is licensed under the GNU LGPL.
4    * Copyright Tom Oinn, EMBL-EBI
5    */
6   package org.embl.ebi.escience.scufl.talisman;
7   
8   import javax.servlet.http.HttpServletRequest;
9   import javax.servlet.http.HttpServletResponse;
10  import org.embl.ebi.escience.scufl.parser.Scufl2XScuflParser;
11  import org.embl.ebi.escience.talisman.*;
12  
13  
14  /**
15   * Provides a Talisman action plugin that parses
16   * a Scufl definition found in a named 'input' field and
17   * writes the XScufl version of it out to a second 'output'
18   * field.
19   * @author Tom Oinn
20   */
21  public class Scufl2XScufl implements ActionWorker {
22  
23      public void process(HttpServletRequest request , HttpServletResponse response, Action action) 
24    throws AbortActionException, NodeResolutionException, UnknownResolutionProtocolException {
25  
26    // Get the fields
27    action.requireParameters("input,output");
28    Field input = Resolver.getField(action.props.getProperty("input"),action);
29    Field output = Resolver.getField(action.props.getProperty("output"),action);
30    output.setValue(Scufl2XScuflParser.parse(input.getValue()));
31      
32      }
33  
34  }