taverna-t2flow 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ChangeLog.rdoc +1 -2
  2. data/README.rdoc +1 -1
  3. data/lib/t2flow/parser.rb +10 -10
  4. metadata +3 -3
data/ChangeLog.rdoc CHANGED
@@ -1,6 +1,5 @@
1
- = Version 0.1.4
1
+ = Version 0.1.5
2
2
  Released:: Monday, July 26, 2010
3
3
 
4
4
  == Added Functionality
5
5
  - Bug fixes in the parser.
6
- - Added Dataflow#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.1.4
4
+ Version:: 0.1.5
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/parser.rb CHANGED
@@ -223,11 +223,11 @@ module T2Flow
223
223
  link.each do |sink_source|
224
224
  case sink_source.name
225
225
  when "sink"
226
- datalink.sink = sink_source.first.content
227
- datalink.sink += ":" + sink_source.last.content if sink_source["type"] == "processor"
226
+ datalink.sink = sink_source.child.next.content
227
+ datalink.sink += ":" + sink_source.last.prev.content if sink_source["type"] == "processor"
228
228
  when "source"
229
- datalink.source = sink_source.first.content
230
- datalink.source += ":" + sink_source.last.content if sink_source["type"] == "processor"
229
+ datalink.source = sink_source.child.next.content
230
+ datalink.source += ":" + sink_source.last.prev.content if sink_source["type"] == "processor"
231
231
  end
232
232
  end
233
233
 
@@ -235,7 +235,7 @@ module T2Flow
235
235
  end
236
236
 
237
237
  def add_coordination(dataflow, condition) # :nodoc:
238
- return if coordination.nil? || coordination.content.chomp.strip.empty?
238
+ return if condition.nil? || condition.content.chomp.strip.empty?
239
239
 
240
240
  coordination = Coordination.new
241
241
 
@@ -250,17 +250,17 @@ module T2Flow
250
250
 
251
251
  node = LibXML::XML::Parser.string("#{annotation}").parse
252
252
  content_node = node.find_first("//annotationBean")
253
- content = content_node.child.next.content
254
-
253
+ content = content_node.child.child.content
254
+
255
255
  case content_node["class"]
256
256
  when /freetextdescription/i
257
- dataflow.annotations.descriptions = [] unless dataflow.annotations.descriptions
257
+ dataflow.annotations.descriptions ||= []
258
258
  dataflow.annotations.descriptions << content
259
259
  when /descriptivetitle/i
260
- dataflow.annotations.titles = [] unless dataflow.annotations.titles
260
+ dataflow.annotations.titles ||= []
261
261
  dataflow.annotations.titles << content
262
262
  when /author/i
263
- dataflow.annotations.authors = [] unless dataflow.annotations.authors
263
+ dataflow.annotations.authors ||= []
264
264
  dataflow.annotations.authors << content
265
265
  end # case
266
266
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taverna-t2flow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mannie Tagarira