Modified: branches/component-querying/lib/workflow_processors/taverna2.rb (3518 => 3519)
--- branches/component-querying/lib/workflow_processors/taverna2.rb 2013-04-25 08:14:32 UTC (rev 3518)
+++ branches/component-querying/lib/workflow_processors/taverna2.rb 2013-04-25 13:32:19 UTC (rev 3519)
@@ -414,7 +414,7 @@
def extract_rdf_structure(workflow)
rdf = ''
- IO.popen("java -jar #{RAILS_ROOT}/vendor/java/scufl2-wfdesc/scufl2-wfdesc-0.3.0-20130328.142841-60-standalone.jar", 'r+') do |converter|
+ IO.popen("java -jar #{RAILS_ROOT}/vendor/java/scufl2-wfdesc/scufl2-wfdesc-0.3.0-SNAPSHOT-standalone.jar", 'r+') do |converter|
converter.puts(workflow.content_blob.data)
converter.close_write
rdf = converter.read
@@ -423,7 +423,7 @@
raise "Error generating wfdesc" if rdf.blank?
# The code below is a hack put in place because the wfdesc tool does not yet merge in semantic annotations
-
+ # *** Start of hack ***
structure = RDF::Graph.new
structure.insert(RDF::Reader.for(:turtle).new(StringIO.new(rdf)))
@@ -471,6 +471,7 @@
end
input_uri = query.execute(structure).first.uri
+
if input.semantic_annotation
RDF::Reader.for(:n3).new(StringIO.new(input.semantic_annotation.content), :base_uri => input_uri.to_s).each_statement do |s|
structure << s
@@ -500,6 +501,8 @@
writer << statement
end
end
+
+ # *** End of hack ***
end
# End Instance Methods