caDSR Data service query in caGrid
Created: 2010-05-25 19:16:58
Last updated: 2010-06-11 04:50:15
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (1)
Name |
Description |
cqlClause |
A sample caDSRDataService workflow.
|
Processors (7)
Name |
Type |
Description |
queryProject |
wsdl |
Wsdlhttp://cadsr-dataservice.nci.nih.gov:80/wsrf/services/cagrid/CaDSRDataService?wsdlWsdl Operationquery |
queryProject_input |
xmlsplitter |
|
queryProject_cqlQuery |
xmlsplitter |
|
queryClass |
wsdl |
Wsdlhttp://cadsr-dataservice.nci.nih.gov:80/wsrf/services/cagrid/CaDSRDataService?wsdlWsdl Operationquery |
queryClass_input |
xmlsplitter |
|
queryClass_cqlQuery |
xmlsplitter |
|
Beanshell |
beanshell |
Scriptimport java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
out ="";
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilderFactory.setNamespaceAware(true);
DocumentBuilder docBuilder;
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc1 = docBuilder.parse( new InputSource(new StringReader(in)));
Element projectsEL = doc1.getDocumentElement();
XPath xpath1 = XPathFactory.newInstance().newXPath();
String findProjectName =
"//*[local-name()='Project' and namespace-uri()='gme://caDSR.caDSR/4.0/gov.nih.nci.cadsr.umlproject.domain']/@longName";
NodeList projectNode = (NodeList) xpath1.evaluate(findProjectName, projectsEL, XPathConstants.NODESET);
//System.out.println(projectNode.getTextContent());
out ="";
//out = "";
System.out.println(projectNode.getLength());
for(int i=0;i";
}
System.out.println(out);
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XPathExpressionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} |
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
Beanshell |
|
in
|
out
|
Outputs (1)
Name |
Description |
classInformation |
|
Datalinks (8)
Source |
Sink |
queryProject_input:output |
queryProject:parameters |
queryProject_cqlQuery:output |
queryProject_input:cqlQuery |
cqlClause |
queryProject_cqlQuery:CQLQuery |
queryClass_input:output |
queryClass:parameters |
queryClass_cqlQuery:output |
queryClass_input:cqlQuery |
Beanshell:out |
queryClass_cqlQuery:CQLQuery |
queryProject:parameters |
Beanshell:in |
queryClass:parameters |
classInformation |
Uploader
License
All versions of this Workflow are
licensed under:
Version 3 (latest)
(of 3)
Credits (1)
(People/Groups)
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