Hi All, I have been following the thread for a while and have been trying to figure out whether myExperiment's RDF will help solve your problem.
Every "Processor" (web service, beanshell, etc.) RDF object in a myExperiment workflow has a pointer back to the workflow it originates from. Therefore if you can identify the Processor then you can find the workflow URI and consequently (through a regex) the ID of the workflow. I can see the problem is knowing the unique identifier for the Processor so that you can use myExperiment's SPARQL endpoint (http://rdf.myexperiment.org/sparql to find it. I know Taverna 2 uses unique identifiers for its dataflows which could be queried in the SPARQL endpoint. So if new the dataflows identifier you could find the workflow URI with a query like this: PREFIX mecontrib: <http://rdf.myexperiment.org/ontologies/contributions/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX mecomp: <http://rdf.myexperiment.org/ontologies/components/> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?workflow WHERE { ?dataflow dcterms:identifier ?identifier . ?workflow mecomp:executes-dataflow ?dataflow ; rdf:type mecontrib:Workflow FILTER regex(?identifier,'3bd356a4-fc82-4ec8-8fcb-5960f40b2e8f') } Below is the URL for automatically running this query on the SPARQL endpoint. http://rdf.myexperiment.org/sparql?query=PREFIX+mecontrib%3A+%3Chttp%3A% 2F%2Frdf.myexperiment.org%2Fontologies%2Fcontributions%2F%3E%0D%0APREFIX +rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E% 0D%0APREFIX+mecomp%3A+%3Chttp%3A%2F%2Frdf.myexperiment.org%2Fontologies% 2Fcomponents%2F%3E%0D%0APREFIX+dcterms%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc% 2Fterms%2F%3E%0D%0ASELECT+%3Fworkflow%0D%0AWHERE+%7B+%0D%0A++%3Fdataflow +dcterms%3Aidentifier+%3Fidentifier+.%0D%0A++%3Fworkflow+mecomp% 3Aexecutes-dataflow+%3Fdataflow+%3B%0D%0A++++rdf%3Atype+mecontrib% 3AWorkflow%0D%0A++FILTER+regex%28%3Fidentifier%2C% 273bd356a4-fc82-4ec8-8fcb-5960f40b2e8f%27%29%0D%0A%7D Bear in mind that a workflow may have more than one version. Assuming that the same file is modified to produce each new version, each workflow version will a dataflow with the same identifier. The above query can be modified to return all workflow versions that use the same identifier for their top level dataflow. PREFIX mecontrib: <http://rdf.myexperiment.org/ontologies/contributions/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX mecomp: <http://rdf.myexperiment.org/ontologies/components/> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?workflow WHERE { ?dataflow dcterms:identifier ?identifier . ?workflow mecomp:executes-dataflow ?dataflow ; rdf:type mecontrib:WorkflowVersion FILTER regex(?identifier,'3bd356a4-fc82-4ec8-8fcb-5960f40b2e8f') } As a side issue, I had a number of people comment to me that it would be useful yo have an ID field in the myExperiment RDF to save need to perform a regex on URIs to get out the ID number. Would people actually find this useful or would they rarely need to perform such a regex? Regards David Newman On Wed, 2010-07-07 at 11:00 +0100, Stian Soiland-Reyes wrote: > On Wed, Jul 7, 2010 at 10:47, Stian Soiland-Reyes > <[email protected]> wrote: > > // Note - not the one in workflowmodel.impl > > import net.sf.taverna.t2.workflowmodel.utils.Tools; > > You might need to add this dependency to import Tool: > > <dependency> > <groupId>net.sf.taverna.t2.core</groupId> > <artifactId>workflowmodel-impl</artifactId> > <version>${t2.core.version}</version> > </dependency> > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ 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/
