Available instruments through DPAS
Created: 2010-04-15 13:51:09
Last updated: 2012-03-16 15:11:00
This workflow uses a DPAS servlet to obtain all available intrument keys in the DPAS (Data Provider Access Service) and formats the return as VOTable.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Available instruments through DPAS |
Descriptions (1)
This workflow uses a DPAS servlet to obtain all available intrument keys in the DPAS (Data Provider Access Service) and formats the return as VOTable. |
Dependencies (0)
Processors (5)
Name |
Type |
Description |
Get_Web_Page_from_URL |
localworker |
Scriptif ((url == void) || (url == null)) {
throw new RuntimeException("The url must be specified");
}
URL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
}
else {
inputURL = new URL(url);
}
URLConnection con = inputURL.openConnection();
InputStream in = con.getInputStream();
StringBuffer result = new StringBuffer();
BufferedReader reader;
String encoding = con.getContentEncoding();
if (encoding == null) {
reader = new BufferedReader(new InputStreamReader(in));
} else {
reader = new BufferedReader(new InputStreamReader(in, encoding));
}
String line = null;
String NEWLINE = System.getProperty("line.separator");
while ((line = reader.readLine()) != null) {
result.append(line);
result.append(NEWLINE);
}
reader.close();
contents = result.toString();
|
dpas_url_servlet |
stringconstant |
Valuehttp://msslkz.mssl.ucl.ac.uk/helio-dpas/HelioPatServlet |
RetrieveContent |
beanshell |
Scriptcontent = new ArrayList();
instruments = new ArrayList();
String [] rows = csv.split("\n");
for (int i =0; i< rows.length; i++) {
ArrayList values = new ArrayList();
String [] part = rows[i].split(",");
instruments.add(part[0]);
for (int j = 0; j< part.length; j++){
values.add(part[j]);
}
content.add(values);
}
|
Remove_String_Duplicates |
localworker |
ScriptList strippedlist = new ArrayList();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
if (strippedlist.contains(item) == false) {
strippedlist.add(item);
}
}
|
writeVOTable |
beanshell |
ScriptStringBuilder sb = new StringBuilder();
sb.append("\n");
sb.append("\nDPAS instruments\n");
sb.append("\n");
sb.append("\n");
sb.append("\n\n");
for(int i=0; i\n "+instruments.get(i)+" | \n \n");
}
sb.append("\n\n \n\n");
votable=sb.toString(); |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
RetrieveContent |
|
csv
|
content
instruments
|
writeVOTable |
|
instruments
|
votable
|
Outputs (1)
Name |
Description |
DPAS_instruments |
VOTable with observatory-instrument keys
|
Datalinks (5)
Source |
Sink |
dpas_url_servlet:value |
Get_Web_Page_from_URL:url |
Get_Web_Page_from_URL:contents |
RetrieveContent:csv |
RetrieveContent:instruments |
Remove_String_Duplicates:stringlist |
Remove_String_Duplicates:strippedlist |
writeVOTable:instruments |
writeVOTable:votable |
DPAS_instruments |
Uploader
License
All versions of this Workflow are
licensed under:
Version 5 (latest)
(of 5)
Credits (0)
(People/Groups)
None
Attributions (0)
(Workflows/Files)
None
[ edit ]
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (1)
(Workflows/Files)
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