PDL workflow for a VAMDC collision service
Created: 2013-09-11 18:01:41
Last updated: 2013-10-31 10:07:47
Example to show how to use a PDL description file implementation of a VAMDC collision asynchronous service
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
PDL workflow for a VAMDC collision service |
Descriptions (1)
Example to show how to use a PDL description file implementation of a VAMDC collision asynchronous service |
Dependencies (0)
Processors (8)
Name |
Type |
Description |
PDL_service |
pdl |
|
AtomSymbol_value |
stringconstant |
ValueO |
mail_value |
stringconstant |
Valuetetrarquis@gmail.com |
Split_string_into_string_list_by_regular_expression |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
regex_value |
stringconstant |
Value\n |
Read_Text_File |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Beanshell |
beanshell |
ScriptfileName = url.substring( url.lastIndexOf('/')+1, url.length() );
fileNameWithoutExtn = fileName.substring(0, fileName.lastIndexOf('.')); |
Tool |
externaltool |
|
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
Beanshell |
|
url
|
fileName
fileNameWithoutExtn
|
Outputs (4)
Name |
Description |
fileResult |
|
response_body |
|
status |
|
Read_Text_File_filecontents |
|
Datalinks (13)
Source |
Sink |
AtomSymbol_value:value |
PDL_service:AtomSymbol |
mail_value:value |
PDL_service:mail |
regex_value:value |
Split_string_into_string_list_by_regular_expression:regex |
Tool:outputFiles |
Split_string_into_string_list_by_regular_expression:string |
Split_string_into_string_list_by_regular_expression:split |
Read_Text_File:fileurl |
PDL_service:fileResult |
Beanshell:url |
Beanshell:fileName |
Tool:fileName |
Beanshell:fileNameWithoutExtn |
Tool:fileNameWithoutExtn |
PDL_service:fileResult |
Tool:tarURL |
PDL_service:fileResult |
fileResult |
PDL_service:responseBody |
response_body |
PDL_service:status |
status |
Read_Text_File:filecontents |
Read_Text_File_filecontents |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2 (latest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (1)
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment