taverna-t2flow 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.rdoc +5 -3
- data/README.rdoc +1 -1
- data/lib/t2flow/model.rb +23 -0
- data/lib/t2flow/parser.rb +1 -4
- metadata +3 -3
data/ChangeLog.rdoc
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
= Version 0.
|
1
|
+
= Version 0.2.0
|
2
2
|
Released:: Tuesday, July 27, 2010
|
3
3
|
|
4
|
-
==
|
5
|
-
-
|
4
|
+
== Changes
|
5
|
+
- Updated the unit tests which can now be run by entering "ruby tests/run_tests.rb"
|
6
|
+
- Misc. bug fixes.
|
7
|
+
- Added the following methods to the T2Flow::Model class: coordinates, all_coordinates, name
|
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Taverna[http://taverna.sourceforge.net] 2 Interaction Gem
|
2
2
|
|
3
3
|
Authors:: Mannie Tagarira, David Withers
|
4
|
-
Version:: 0.
|
4
|
+
Version:: 0.2.0
|
5
5
|
Contact:: mailto:mannie@mygrid.org.uk
|
6
6
|
URL:: http://taverna.sourceforge.net/
|
7
7
|
Licence:: LGPL 3 (See LICENCE or http://www.gnu.org/licenses/lgpl.html)
|
data/lib/t2flow/model.rb
CHANGED
@@ -13,6 +13,12 @@ module T2Flow # :nodoc:
|
|
13
13
|
# Creates an empty model for a Taverna 2 workflow.
|
14
14
|
def initialize
|
15
15
|
@dataflows = []
|
16
|
+
@dependencies = []
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieve the top level dataflow's name
|
20
|
+
def name
|
21
|
+
main.name
|
16
22
|
end
|
17
23
|
|
18
24
|
# Retrieve the top level dataflow ie the MAIN (containing) dataflow
|
@@ -72,6 +78,19 @@ module T2Flow # :nodoc:
|
|
72
78
|
@dataflows.each { |dataflow| procs << dataflow.processors }
|
73
79
|
return procs.flatten
|
74
80
|
end
|
81
|
+
|
82
|
+
# Retrieve coordinations from the top level of a nested workflow.
|
83
|
+
# If the workflow is not nested, retrieve all coordinations.
|
84
|
+
def coordinations
|
85
|
+
self.main.coordinations
|
86
|
+
end
|
87
|
+
|
88
|
+
# Retrieve ALL the coordinations found in a nested workflow
|
89
|
+
def all_coordinations
|
90
|
+
coordinations =[]
|
91
|
+
@dataflows.each { |dataflow| coordinations << dataflow.coordinations }
|
92
|
+
return coordinations.flatten
|
93
|
+
end
|
75
94
|
|
76
95
|
# Retrieve the sources(inputs) to the workflow
|
77
96
|
def sources
|
@@ -282,6 +301,10 @@ module T2Flow # :nodoc:
|
|
282
301
|
|
283
302
|
# A list of authors of the dataflow
|
284
303
|
attr_accessor :authors
|
304
|
+
|
305
|
+
def initialize
|
306
|
+
@authors, @descriptions, @titles = [], [], []
|
307
|
+
end
|
285
308
|
end
|
286
309
|
|
287
310
|
|
data/lib/t2flow/parser.rb
CHANGED
@@ -235,7 +235,7 @@ module T2Flow
|
|
235
235
|
end
|
236
236
|
|
237
237
|
def add_coordination(dataflow, condition) # :nodoc:
|
238
|
-
return if condition.nil?
|
238
|
+
return if condition.nil?
|
239
239
|
|
240
240
|
coordination = Coordination.new
|
241
241
|
|
@@ -254,13 +254,10 @@ module T2Flow
|
|
254
254
|
|
255
255
|
case content_node["class"]
|
256
256
|
when /freetextdescription/i
|
257
|
-
dataflow.annotations.descriptions ||= []
|
258
257
|
dataflow.annotations.descriptions << content
|
259
258
|
when /descriptivetitle/i
|
260
|
-
dataflow.annotations.titles ||= []
|
261
259
|
dataflow.annotations.titles << content
|
262
260
|
when /author/i
|
263
|
-
dataflow.annotations.authors ||= []
|
264
261
|
dataflow.annotations.authors << content
|
265
262
|
end # case
|
266
263
|
end
|