retrieve data for all instruments for events during a time span
Created: 2010-04-21 15:13:00
This workflow uses the HEC to retrieve events for a time spane given by the user from a HEC table given by the user as well.
It uses all instruments available in the DPAS to retrieve data for the events
Output: XML as returned by the DPAS
This workflow uses the HEC to retrieve events for a time spane given by the user from a HEC table given by the user as well.
It uses all instruments available in the DPAS to retrieve data for the events; empty results are filtered out, the data is combind with the instrument name from which it was measured.
Output a list of events with lists of instrument and data values.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
![header=[] body=[This is the author information extracted from the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Authors (1)
![header=[] body=[These are the descriptive titles embedded within the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Titles (2)
retrieve data for all instruments for events during a time span |
retrive |
![header=[] body=[These are the descriptions embedded within the workflow version] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Descriptions (2)
This workflow uses the HEC to retrieve events for a time spane given by the user from a HEC table given by the user as well.
It uses all instruments available in the DPAS to retrieve data for the events
Output: XML as returned by the DPAS |
This workflow uses the HEC to retrieve events for a time spane given by the user from a HEC table given by the user as well.
It uses all instruments available in the DPAS to retrieve data for the events; empty results are filtered out, the data is combind with the instrument name from which it was measured.
Output a list of events with lists of instrument and data values. |
![header=[] body=[These are the listed dependencies of the workflow] cssheader=[boxoverTooltipHeader] cssbody=[boxoverTooltipBody] delay=[200] Information](/images/famfamfam_silk/information.png?1680607579)
Dependencies (0)
Inputs (3)
Name |
Description |
HEC_stop_date |
stop date time for the query; format YYYY-MM-dd hh:mm:ss
|
HEC_start_date |
start date for the query format YYYY-MM-dd hh:mm:ss
|
HEC_table |
which table should be qeried; see http://hec.ts.astro.it/sec_ui.php for a list of possible tables
which table should be qeried
which table should be qeried; see http://hec.ts.astro.it/sec_ui.php for documentation
|
Processors (14)
Name |
Type |
Description |
sql |
wsdl |
Wsdlhttp://helio.oato.inaf.it:8080/HECService/HECService?WSDLWsdl Operationsql |
sql_input |
xmlsplitter |
|
sql_base |
stringconstant |
ValueSELECT * FROM %table% WHERE time_start>='%start_date%' AND time_start<'%stop_date%' ORDER BY ntime_start; |
combine_sql_query |
beanshell |
Scriptsql_string = sql_base.replace("%start_date%",start_date);
sql_string = sql_string.replace("%stop_date%",stop_date);
sql_string = sql_string.replace("%table%", table); |
sql_output |
xmlsplitter |
|
getAllIventDates |
beanshell |
Scriptimport java.io.StringReader;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.apache.xerces.parsers.DOMParser;
private void getPositions(){
NodeList nodesVO = docVO.getElementsByTagName("FIELD");
for(int i=0; i< nodesVO.getLength(); i++){
Element voFieldNode = nodesVO.item(i);
String name = voFieldNode.getAttribute("name");
if(name.trim().equals("ntime_start")){
pos_start_vo = i;
} else if(name.trim().equals("ntime_end")){
pos_end_vo = i;
} else if(name.trim().equals("time_start")){
pos_startA_vo = i;
} else if(name.trim().equals("time_end")){
pos_endA_vo = i;
}
}
}
private void findDates() {
NodeList dataListVO = docVO.getElementsByTagName("TR");
debug= debug.concat(" length " + dataListVO.getLength()+ "\n");
for(int i = 0; i < dataListVO.getLength(); i++) {
debug= debug.concat(" i " + i+ "datalength " + dataListVO.getLength() +"\n" );
List date = new ArrayList();
NodeList voDataChilds = dataListVO.item(i).getChildNodes();
debug= debug.concat(" length2 " +voDataChilds.getLength()+ "\n");
if(voDataChilds.item(pos_start_vo).getFirstChild()!= null) {
date.add(voDataChilds.item(pos_start_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
startDates.add(voDataChilds.item(pos_start_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
} else {
date.add(voDataChilds.item(pos_startA_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
startDates.add(voDataChilds.item(pos_startA_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
}
if(voDataChilds.item(pos_end_vo).getFirstChild()!= null) {
date.add(voDataChilds.item(pos_end_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
endDates.add(voDataChilds.item(pos_end_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
} else {
date.add(voDataChilds.item(pos_endA_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
endDates.add(voDataChilds.item(pos_endA_vo).getFirstChild().getNodeValue().replaceAll("\\.\\d",""));
}
date.add(i);
positions.add(i);
dateList.add(date);
debug= debug.concat(" end " +i + " \n");
}
}
List dateList = new ArrayList();
List startDates = new ArrayList();
List endDates = new ArrayList();
List positions = new ArrayList();
String debug = "debug";
StringReader reader2 = new StringReader(voTable);
InputSource source2 = new InputSource(reader2);
Document docVO;
int pos_start_vo;
int pos_end_vo;
int pos_startA_vo;
int pos_endA_vo;
try {
DOMParser parser = new DOMParser();
parser.parse(source2);
docVO = parser.getDocument();
this.getPositions();
this.findDates();
reader2.close();
if(dateList.size()==0){
dateList.add(new ArrayList());
}
if(endDates.size()==0){
endDates.add("2008-00-00 00:00:01");
}
if(startDates.size()==0){
startDates.add("2008-00-00 00:00:00");
}
if(positions.size()==0){
positions.add("0");
}
}
catch (Exception e){
}
|
getInstruments |
wsdl |
Wsdlhttp://helio.i4ds.technik.fhnw.ch:8080/HelioDPAS-R1/services/QueryService?wsdlWsdl OperationgetInstruments |
getInstruments_output |
xmlsplitter |
|
comma |
stringconstant |
Value, |
Split_string_into_string_list_by_regular_expression_2 |
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]);
}
}
|
query |
wsdl |
Wsdlhttp://helio.i4ds.technik.fhnw.ch:8080/HelioDPAS-R1/services/QueryService?wsdlWsdl Operationquery |
query_input |
xmlsplitter |
|
query_output |
xmlsplitter |
|
CreateInputLists |
beanshell |
ScriptList instrumentsOut = new ArrayList();
List startOut = new ArrayList();
List stopOut = new ArrayList();
for(int i = 0; i < startDates.size(); i++) {
for(int j = 0; j < instruments.size(); j++) {
instrumentsOut.add(instruments.get(j));
startOut.add(startDates.get(i));
stopOut.add(stopDates.get(i));
}
} |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
combine_sql_query |
|
start_date
stop_date
sql_base
table
|
sql_string
|
getAllIventDates |
|
voTable
|
startDates
endDates
positions
|
CreateInputLists |
|
instruments
startDates
stopDates
|
instrumentsOut
startOut
stopOut
|
Outputs (1)
Name |
Description |
dpas_queryReturn |
|
Datalinks (20)
Source |
Sink |
sql_input:output |
sql:parameters |
combine_sql_query:sql_string |
sql_input:arg0 |
sql_base:value |
combine_sql_query:sql_base |
HEC_stop_date |
combine_sql_query:stop_date |
HEC_start_date |
combine_sql_query:start_date |
HEC_table |
combine_sql_query:table |
sql:parameters |
sql_output:input |
sql_output:return |
getAllIventDates:voTable |
getInstruments:parameters |
getInstruments_output:input |
comma:value |
Split_string_into_string_list_by_regular_expression_2:regex |
getInstruments_output:getInstrumentsReturn |
Split_string_into_string_list_by_regular_expression_2:string |
query_input:output |
query:parameters |
CreateInputLists:instrumentsOut |
query_input:instruments |
CreateInputLists:stopOut |
query_input:stopTimes |
CreateInputLists:startOut |
query_input:startTimes |
query:parameters |
query_output:input |
Split_string_into_string_list_by_regular_expression_2:split |
CreateInputLists:instruments |
getAllIventDates:startDates |
CreateInputLists:startDates |
getAllIventDates:endDates |
CreateInputLists:stopDates |
query_output:queryReturn |
dpas_queryReturn |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (3)
(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
(5)
Only the first 2 workflows that use similar services are shown. View all workflows that use these services.
HEC standard query
(1)
calls the HEC web service;
inputs are start and stop time, which table should be queried and an optional where clause, as in an SQL statement
output is of VOTable format
Created: 2010-04-16
Log in to make a comment
Deprecated