<activity xmlns="http://taverna.sf.net/2008/xml/t2flow"><class>net.sf.taverna.t2.activities.localworker.LocalworkerActivity</class><inputMap /><outputMap><map from="outputText" to="outputText" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean xmlns=""> | |
<script>if ((id == void) || (id == null) || id.equals("")) { | |
throw new RunTimeException("port id must have a non-empty value"); | |
} | |
URL url = new URL ("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gbc&db=nucleotide&retmode=xml&id=" + id); | |
BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream())); | |
StringWriter writer = new StringWriter(); | |
char[] buffer = new char[1024]; | |
while (true) { | |
int r = reader.read(buffer); | |
if (r <= 0) { | |
break; | |
} | |
writer.write(buffer, 0, r); | |
} | |
reader.close(); | |
outputText = writer.toString(); | |
</script> | |
<dependencies /> | |
<inputs> | |
<net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean> | |
<handledReferenceSchemes /> | |
<translatedElementType>java.lang.String</translatedElementType> | |
<allowsLiteralValues>true</allowsLiteralValues> | |
<name>id</name> | |
<depth>0</depth> | |
<mimeTypes> | |
<string>'text/plain'</string> | |
</mimeTypes> | |
</net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean> | |
</inputs> | |
<outputs> | |
<net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean> | |
<granularDepth>0</granularDepth> | |
<name>outputText</name> | |
<depth>0</depth> | |
<mimeTypes> | |
<string>'text/plain'</string> | |
</mimeTypes> | |
</net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean> | |
</outputs> | |
</net.sf.taverna.t2.activities.localworker.LocalworkerActivityConfigurationBean></configBean></activity> |