myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3729] branches/packs/app/controllers/items_contr


From: noreply
Subject: [myexperiment-hackers] [3729] branches/packs/app/controllers/items_controller.rb: show only top level workflow runs
Date: Thu, 26 Sep 2013 14:36:58 +0000 (UTC)

Revision
3729
Author
dgc
Date
2013-09-26 14:36:57 +0000 (Thu, 26 Sep 2013)

Log Message

show only top level workflow runs

Modified Paths

Diff

Modified: branches/packs/app/controllers/items_controller.rb (3728 => 3729)


--- branches/packs/app/controllers/items_controller.rb	2013-09-26 14:36:29 UTC (rev 3728)
+++ branches/packs/app/controllers/items_controller.rb	2013-09-26 14:36:57 UTC (rev 3729)
@@ -43,7 +43,12 @@
       @requires_hardware = @statements.query(address@hidden, RDF::URI("http://purl.org/wf4ever/roterms#requiresHardware"), nil]).objects
       @requires_software = @statements.query(address@hidden, RDF::URI("http://purl.org/wf4ever/roterms#requiresSoftware"), nil]).objects
       @roles_in_time = @statements.query([nil, RDF::URI("http://purl.org/spar/pro/relatesToEntity"), @item.uri]).subjects
-      @workflow_runs = @statements.query([nil, RDF.type, RDF::URI("http://purl.org/wf4ever/wfprov#WorkflowRun")]).subjects
+
+      # Get the top-level workflow runs by selecting only those that were not
+      # part of other workflow runs.
+
+      @workflow_runs = @statements.query([nil, RDF.type, RDF::URI("http://purl.org/wf4ever/wfprov#WorkflowRun")]).subjects.to_a
+      @workflow_runs -= @statements.query([nil, RDF::URI("http://purl.org/wf4ever/wfprov#wasPartOfWorkflowRun"), nil]).subjects.to_a
     end
 
     if @item.is_folder

reply via email to

[Prev in Thread] Current Thread [Next in Thread]