Extracting Quantities from HyperLEDA
Created: 2011-10-05 09:21:40
Last updated: 2011-10-05 09:21:39
This workflow receives the name of the property to compare and a file with a list of names of galaxies. The property name must be the same used in the HTML file returned by the HyperLEDA service.
The workflow calls to HyperLEda service, using as input the names of the galaxies in order to get a HTML file with information about each galaxy. From each HTML file, it extracts the value of the property selected by the user.
The workflow uses a python tool to parse the HTML file (one for each galaxy) and extracts the value of the property. In order to build a file, it has to merge the output of the python tool using thel local service "Merge_String_List_to_a_String"
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Extracting values of one porperty from LEDA
|
Descriptions (1)
This workflow receives the name of the property to compare and a file with a list of names of galaxies. The property name must be the same used in the HTML file returned by the HyperLEDA service.
The workflow calls to HyperLEda service, using as input the names of the galaxies in order to get a HTML file with information about each galaxy. From each HTML file, it extracts the value of the property selected by the user.
The workflow uses a python tool to parse the HTML file (one for each galaxy) and extracts the value of the property. In order to build a file, it has to merge the output of the python tool using thel local service "Merge_String_List_to_a_String" |
Dependencies (0)
Inputs (1)
Name |
Description |
property |
|
Processors (10)
Name |
Type |
Description |
REST_Service |
rest |
|
extractPropertyValue |
externaltool |
|
Write_Text_File |
localworker |
Script
BufferedWriter out;
if (encoding == void) {
out = new BufferedWriter(new FileWriter(outputFile));
}
else {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding));
}
out.write(filecontents);
out.flush();
out.close();
outputFile = filecontents;
|
encoding_value_1 |
stringconstant |
Valueutf-8 |
outputFile_value |
stringconstant |
Valuefiletmp.txt |
readLinesFile |
workflow |
|
Names_galaxies |
stringconstant |
ValueEnter file with the name of galaxies list |
Merge_String_List_to_a_String |
localworker |
ScriptString seperatorString = "\n";
if (seperator != void) {
seperatorString = seperator;
}
StringBuffer sb = new StringBuffer();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
sb.append(item);
if (i.hasNext()) {
sb.append(seperatorString);
}
}
concatenated = sb.toString();
|
Write_Text_File_3 |
localworker |
Script
BufferedWriter out;
if (encoding == void) {
out = new BufferedWriter(new FileWriter(outputFile));
}
else {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding));
}
out.write(filecontents);
out.flush();
out.close();
outputFile = filecontents;
|
outputFile_value_2 |
stringconstant |
ValueBMagnitude.txt |
Outputs (1)
Name |
Description |
remoteValues |
|
Datalinks (12)
Source |
Sink |
readLinesFile:lines |
REST_Service:object_name |
Write_Text_File:outputFile |
extractPropertyValue:filetmp |
property |
extractPropertyValue:property |
encoding_value_1:value |
Write_Text_File:encoding |
REST_Service:responseBody |
Write_Text_File:filecontents |
outputFile_value:value |
Write_Text_File:outputFile |
Names_galaxies:value |
readLinesFile:title |
extractPropertyValue:STDOUT |
Merge_String_List_to_a_String:stringlist |
encoding_value_1:value |
Write_Text_File_3:encoding |
Merge_String_List_to_a_String:concatenated |
Write_Text_File_3:filecontents |
outputFile_value_2:value |
Write_Text_File_3:outputFile |
Write_Text_File_3:outputFile |
remoteValues |
Uploader
License
All versions of this Workflow are
licensed under:
BSD License
Version 1
(of 1)
Credits (0)
(People/Groups)
None
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
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