Hello,
On 07/03/2011 18:37, John Alexander wrote:
Thank you Alan.
I believe I am going to have to be adding a few more dependencies to
my plugin and I was wondering if a list exist for which dependencies
allow access to which Objects?
No, there is no such list as there is a huge number of objects. We do
have a list of version numbers for all modules in a particular Taverna
release:
http://www.mygrid.org.uk/dev/wiki/display/developer/Maven+module+version+numbers
You can also learn how to find your way round Taverna source code and
which class is in which module and how to find such a module in our SVN
repository so you can check it out.
A good starting point for developing a plugin for Taverna is our
Developer's Guide.
http://www.mygrid.org.uk/dev/wiki/display/developer/Developers+Guide
Developer's Guide contains documentation on Taverna source code
architecture and how it is organised into maven modules:
http://www.mygrid.org.uk/dev/wiki/display/developer/Maven+Modules
Maven plugin for Eclipse /will /*fetch Taverna Maven dependencies*// for
your plugin (specified in your pom file) and you might want to have a
peak at the Taverna source code. Maven plugin for Eclipse can fetch this
from our Maven repositories, to do so right click on the project and
select *Maven -> Download sources*.
After this you can browse the source by opening jar files inside the
Maven dependencies container and double-click on a Java class. You
should also be able to see the source code from *Navigate -> Open Type*
or by following references with *Open Declaration (F3)*.
Navigating though classes will help you discover which modules they
belong to and then you'll know which module you need to add as your
dependency if you are missing something.
For example, I am trying to pull in the following object:
*WSDLActivityConfigurationBean*
*
*
and it says that it exists within the package:
*net.sf.taverna.t2.activities.wsdl.WSDLActivityConfigurationBean*
*WSDLActivityConfigurationBean is inside module called wsdl-activity
(which in turn is in parent module net.sf.taverna.t2.activities together
with other activities):
<groupId>net.sf.taverna.t2.activities</groupId>
<artifactId>wsdl-activity</artifactId>
**<version>1.2</version>*
Version is 1.2 assuming you are developing against the Taverna 2.2
codebase. Check
http://www.mygrid.org.uk/dev/wiki/display/developer/Maven+module+version+numbers
for correct version numbers of modules.
*The module is available from:
*https://taverna.googlecode.com/svn/taverna/engine/net.sf.taverna.t2.activities/tags/activities-1.2/wsdl-activity
*
*
however, that package no longer seems to exist? or its in an oddly
named maven dependency?
I am trying to look over a t1 or t2 file to see if it contains
WSDLActivities. The only way I know how as of this moment is the
following code:
********************************************
public void handleProcessors(){
Namespace ns = Namespace.getNamespace("",
"http://taverna.sf.net/2008/xml/t2flow");
// Step over each processor in the dataflow
for(Processor processor :
(List<Processor>)currentDataflow.getProcessors()){
// This list will have a size of 1 Activity
List<Activity<?>> activity =
(List<Activity<?>>)processor.getActivityList();
// This list will have a size of 1 Element
List<Element> wsdlNode = ((Element)activity.get(0).getConfiguration())
.getChild("configBean", ns).getChildren();
// If this Element object matches the n
if(wsdlNode.get(0).getName()
.equals("net.sf.taverna.t2.activities.wsdl.WSDLActivityConfigurationBean"))
System.out.println(wsdlNode.get(0).toString());
}
}
**************************************
Not sure what you want to do with workflows that contain WSDL activity
but instead parsing the the workflow file into a Dataflow object (which
can often fail if, for example, wsdl service is no longer available or
for many other reasons) you can just simply and quickly parse the XML of
the workflow file, e.g. using XPath, to identify the WSDLActivity nodes,
if any. This is in case you do not actually want the Dataflow object,
just to parse the workflow file.
What is it that you want to do next after you discover that a workflow
contains a WSDLActivity?
However, I found code that would populate a Configuration bean like so:
***********************************************************
<activity><raven><group>net.sf.taverna.t2.activities</group><artifact>wsdl-activity</artifact><version>0.4</version></raven><class>net.sf.taverna.t2.activities.wsdl.WSDLActivity</class>
(..)
<configBean encoding="xstream">
<net.sf.taverna.t2.activities.wsdl.WSDLActivityConfigurationBean xmlns="">
<wsdl>http://soap.genome.jp/KEGG.wsdl</wsdl>
<operation>get_paralogs_by_gene</operation>
</net.sf.taverna.t2.activities.wsdl.WSDLActivityConfigurationBean>
</configBean>
</activity>
When deserialising Taverna would do (in pseudocode) something like:
plugin = raven.getPlugin("net.sf.taverna.t2.activities", "wsdl-activity", "0.4")
activity = plugin.loadClass("net.sf.taverna.t2.activities.wsdl.WSDLActivity")
bean = new net.sf.taverna.t2.activities.wsdl.WSDLActivityConfigurationBean()
bean.wsdl = "http://soap.genome.jp/KEGG.wsdl"
<http://soap.genome.jp/KEGG.wsdl%22>;
bean.operation = "get_paralogs_by_gene"
activity.configure(bean)
*********************************************
How would I setup my depencies to do something like this? Im aware
this is psuedocode but is there code online that may point me in the
right direction?
Is your plugin a plugin to Taverna Workbench or is it an independent
application that wants to do something with the workflow file. Because
if if it is a Taverna plugin - parsing the workflow and populating
configuration beans from the workflow file is done by Taverna for you
and you get a Dataflow object that you can inspect at will.
If you could provide us with a bit more details about what exactly you
are trying to achieve, we might be able to help you better.
Kindest regards,
Alex
- John
On Mon, Mar 7, 2011 at 10:38 AM, Alan R Williams <[email protected]
<mailto:[email protected]>> wrote:
Hello,
ScuflFileType is in
<groupId>net.sf.taverna.t2.ui-exts</groupId>
<artifactId>file-translator</artifactId>
<version>1.2</version>
It should also pull in the activities and the translators for them.
Out of interest, what does your plugin do?
Alan
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/