Available instruments through DPAS which are not part of ICS instruments table
Created: 2012-03-16 15:45:57
Last updated: 2012-03-16 15:55:59
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 which are not part of ICS instruments table |
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 (12)
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 not part of ICS\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(); |
SQLSelect |
wsdl |
Wsdlhttp://msslkz.mssl.ucl.ac.uk/helio-ics/HelioTavernaService?wsdlWsdl OperationSQLSelect |
SQLSelect_sql_select |
xmlsplitter |
|
FROM_value |
stringconstant |
Valueinstrument |
WHAT_value |
stringconstant |
Valuedistinct obsinst_key |
Split_VOTable_into_its_values |
workflow |
|
String_List_Difference |
localworker |
ScriptList difference = new ArrayList();
for (Iterator i = list1.iterator(); i.hasNext();) {
Object o = i.next();
if (!list2.contains(o)) {
difference.add(o);
}
} |
Flatten_List |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
RetrieveContent |
|
csv
|
content
instruments
|
writeVOTable |
|
instruments
|
votable
|
createLists |
|
votable
|
name
ucd
utype
values
|
Outputs (2)
Name |
Description |
DPAS_instruments |
VOTable with observatory-instrument keys
|
instruments_vector |
Vector of instruments names which are available in the dpas but not mentioned in the ICS instruments
|
Datalinks (13)
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 |
String_List_Difference:difference |
writeVOTable:instruments |
SQLSelect_sql_select:output |
SQLSelect:sql_select |
FROM_value:value |
SQLSelect_sql_select:FROM |
WHAT_value:value |
SQLSelect_sql_select:WHAT |
SQLSelect:response |
Split_VOTable_into_its_values:votable |
Remove_String_Duplicates:strippedlist |
String_List_Difference:list1 |
Flatten_List:outputlist |
String_List_Difference:list2 |
Split_VOTable_into_its_values:values |
Flatten_List:inputlist |
writeVOTable:votable |
DPAS_instruments |
String_List_Difference:difference |
instruments_vector |
Uploader
License
All versions of this Workflow are
licensed under:
BSD License
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (2)
(Workflows/Files)
Shared with Groups (1)
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
(1)
Comments (0)
No comments yet
Log in to make a comment