mannie-taverna-t2flow 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/t2flow/model.rb +50 -6
- metadata +1 -1
data/lib/t2flow/model.rb
CHANGED
@@ -36,24 +36,68 @@ module T2Flow # :nodoc:
|
|
36
36
|
}
|
37
37
|
return beanshells
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
|
+
# Retrieve ALL the datalinks within the workflow
|
41
|
+
def datalinks
|
42
|
+
links = []
|
43
|
+
@dataflows.each { |dataflow|
|
44
|
+
dataflow.datalinks.each { |link|
|
45
|
+
links << link
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return links
|
49
|
+
end
|
50
|
+
|
40
51
|
# Retrieve the annotations within the workflow.
|
41
52
|
# In the event that the workflow is nested,
|
42
53
|
# retrieve the top-level annotations.
|
43
54
|
def annotations
|
44
55
|
@dataflows[0].annotations
|
45
56
|
end
|
46
|
-
|
47
|
-
# Retrieve the
|
57
|
+
|
58
|
+
# Retrieve ALL the processors within the workflow
|
59
|
+
def processors
|
60
|
+
procs =[]
|
61
|
+
@dataflows.each { |dataflow|
|
62
|
+
dataflow.processors.each { |proc|
|
63
|
+
procs << proc
|
64
|
+
}
|
65
|
+
}
|
66
|
+
return procs
|
67
|
+
end
|
68
|
+
|
69
|
+
# Retrieve the sources(inputs) to the workflow
|
48
70
|
def sources
|
49
71
|
@dataflows[0].sources
|
50
72
|
end
|
51
|
-
|
52
|
-
# Retrieve the
|
73
|
+
|
74
|
+
# Retrieve ALL the sources(inputs) within the workflow
|
75
|
+
def all_sources
|
76
|
+
sources =[]
|
77
|
+
@dataflows.each { |dataflow|
|
78
|
+
dataflow.sources.each { |source|
|
79
|
+
sources << source
|
80
|
+
}
|
81
|
+
}
|
82
|
+
return sources
|
83
|
+
end
|
84
|
+
|
85
|
+
# Retrieve the sinks(outputs) to the workflow
|
53
86
|
def sinks
|
54
87
|
@dataflows[0].sinks
|
55
88
|
end
|
56
|
-
|
89
|
+
|
90
|
+
# Retrieve ALL the sinks(outputs) within the workflow
|
91
|
+
def all_sinks
|
92
|
+
sinks =[]
|
93
|
+
@dataflows.each { |dataflow|
|
94
|
+
dataflow.sinks.each { |sink|
|
95
|
+
sinks << sink
|
96
|
+
}
|
97
|
+
}
|
98
|
+
return sinks
|
99
|
+
end
|
100
|
+
|
57
101
|
# Retrieve the unique dataflow ID for the top level dataflow.
|
58
102
|
def dataflow_id
|
59
103
|
@dataflows[0].dataflow_id
|