MDES simple execution
Created: 2011-03-02 15:19:52
Last updated: 2014-03-12 13:16:40
workflow to query MDES, obtaining the DES results and from it extracting the VOTable and the PNG plot for the time range queried.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Anja Le Blanc
David Pérez-Suárez |
Titles (1)
Descriptions (1)
workflow to query MDES, obtaining the DES results and from it extracting the VOTable and the PNG plot for the time range queried. |
Dependencies (0)
Inputs (3)
Name |
Description |
WHERE |
PQL query to execute. The syntax is the following:
Function, Mission: Parameter:Argument_condition_1[:Argument_condition_i]
Missions: ACE, WIND, Ulisses, STEREO-A, STEREO-B
Parameters: V, N, B, BX, BY, BZ
DERIV,Mission:Parameter:DELTAF:AVERAGETIME
eg: DERIV, WIND:V:/100.0:600.0
SIGN,Mission:Parameter:AVERAGETIME
eg: SIGN, ACE:BX:600.0
VAR, Mission:Parameter:DELTAF:TIMEWINDOW:AVERAGETIME
eg: VAR, ACE:N:/16.0:1200.0:60.0
VALUE, Mission:Parameter:DELTAF:AVERAGETIME
eg: VALUE, WIND:N:100.0/:600.0
|
STARTTIME |
starttime of time intervall
|
STOPTIME |
endtime of time interval
|
Processors (17)
Name |
Type |
Description |
AMDA_DES_GetStatus |
wsdl |
Wsdlhttp://manunja.cesr.fr/Amda-Helio/WebServices/HelioLongQueryService.wsdlWsdl OperationGetStatus |
GetStatus_input |
xmlsplitter |
|
GetStatus_output |
xmlsplitter |
|
AMDA_DES_GetResult |
wsdl |
Wsdlhttp://manunja.cesr.fr/Amda-Helio/WebServices/HelioLongQueryService.wsdlWsdl OperationGetResult |
GetResult_input |
xmlsplitter |
|
GetResult_output |
xmlsplitter |
|
ExceptionHandling |
beanshell |
Scriptif(status.matches(".*ERROR.*")){
throw new Exception("error");
} |
AMDA_DES_LongQuery |
wsdl |
Wsdlhttp://manunja.cesr.fr/Amda-Helio/WebServices/HelioLongQueryService.wsdlWsdl OperationLongQuery |
AMDA_DES_LongQuery_input |
xmlsplitter |
|
AMDA_DES_LongQuery_output |
xmlsplitter |
|
ExtractVOTableURL_XPath_From_Text |
localworker |
Scriptimport org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
SAXReader reader = new SAXReader(false);
reader.setIncludeInternalDTDDeclarations(false);
reader.setIncludeExternalDTDDeclarations(false);
Document document = reader.read(new StringReader(xmltext));
List nodelist = document.selectNodes(xpath);
// Process the elements in the nodelist
ArrayList outputList = new ArrayList();
ArrayList outputXmlList = new ArrayList();
String val = null;
String xmlVal = null;
for (Iterator iter = nodelist.iterator(); iter.hasNext();) {
Node element = (Node) iter.next();
xmlVal = element.asXML();
val = element.getStringValue();
if (val != null && !val.equals("")) {
outputList.add(val);
outputXmlList.add(xmlVal);
}
}
List nodelist=outputList;
List nodelistAsXML=outputXmlList; |
xpath_VOTableURL |
stringconstant |
Value/ResultInfo/resultURI |
Get_VOTable_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();
|
XPath_From_VOTable |
workflow |
|
xpath_imageURL |
stringconstant |
Value/VOTABLE[1]/RESOURCE/LINK/@value |
Get_Image_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);
}
int bytesRead = 0;
int totalBytesRead = 0;
InputStream is = inputURL.openStream();
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[2048];
while (true) {
bytesRead = is.read(buffer);
if (bytesRead == -1) {
break;
}
os.write(buffer, 0, bytesRead);
}
image = os.toByteArray();
is.close();
os.close();
|
Version_value |
stringconstant |
Value1.2 |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
ExceptionHandling |
|
status
|
|
namespace_version |
Script to join the namespace and the version input. Unless version 1.1 specified it will output the VOTable namespace for version 1.2 |
namespace_url
version
|
namespace
|
XPath_modifier |
Simple regex to change the XPath in such way so it works for XPathFromVOTables core. |
xpath_in
|
xpath_out
|
Outputs (3)
Name |
Description |
AMDA_DES_ResultInfo |
|
VOTable |
|
PNGImage |
|
Datalinks (22)
Source |
Sink |
GetStatus_input:output |
AMDA_DES_GetStatus:parameters |
AMDA_DES_LongQuery_output:ID |
GetStatus_input:ID |
AMDA_DES_GetStatus:parameters |
GetStatus_output:input |
GetResult_input:output |
AMDA_DES_GetResult:parameters |
AMDA_DES_LongQuery_output:ID |
GetResult_input:ID |
AMDA_DES_GetResult:parameters |
GetResult_output:input |
GetStatus_output:Status |
ExceptionHandling:status |
AMDA_DES_LongQuery_input:output |
AMDA_DES_LongQuery:parameters |
WHERE |
AMDA_DES_LongQuery_input:WHERE |
STOPTIME |
AMDA_DES_LongQuery_input:ENDTIME |
STARTTIME |
AMDA_DES_LongQuery_input:STARTTIME |
AMDA_DES_LongQuery:parameters |
AMDA_DES_LongQuery_output:input |
xpath_VOTableURL:value |
ExtractVOTableURL_XPath_From_Text:xpath |
GetResult_output:ResultInfo |
ExtractVOTableURL_XPath_From_Text:xml-text |
ExtractVOTableURL_XPath_From_Text:nodelist |
Get_VOTable_from_URL:url |
Get_VOTable_from_URL:contents |
XPath_From_VOTable:VOTable |
xpath_imageURL:value |
XPath_From_VOTable:XPath |
Version_value:value |
XPath_From_VOTable:Version |
XPath_From_VOTable:nodelist |
Get_Image_From_URL:url |
GetResult_output:ResultInfo |
AMDA_DES_ResultInfo |
Get_VOTable_from_URL:contents |
VOTable |
Get_Image_From_URL:image |
PNGImage |
Coordinations (1)
Controller |
Target |
ExceptionHandling |
AMDA_DES_GetResult |
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 (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (2)
(Workflows/Files)
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(6)
Only the first 2 workflows that use similar services are shown. View all workflows that use these services.
Comments (0)
No comments yet
Log in to make a comment