myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3401] branches/wf4ever/app/controllers: fixed is


From: noreply
Subject: [myexperiment-hackers] [3401] branches/wf4ever/app/controllers: fixed issues with editing annotations
Date: Wed, 6 Feb 2013 01:31:17 +0000 (UTC)

Revision
3401
Author
dgc
Date
2013-02-06 01:31:16 +0000 (Wed, 06 Feb 2013)

Log Message

fixed issues with editing annotations

Modified Paths

Diff

Modified: branches/wf4ever/app/controllers/application_controller.rb (3400 => 3401)


--- branches/wf4ever/app/controllers/application_controller.rb	2013-02-06 01:13:12 UTC (rev 3400)
+++ branches/wf4ever/app/controllers/application_controller.rb	2013-02-06 01:31:16 UTC (rev 3401)
@@ -1114,10 +1114,12 @@
     end
 
     if params[:commit] == 'Edit'
-      if ao_body
-        agraph = ROSRS::RDFGraph.new(:data ="" ao_body.to_s, :format => :xml)
-
-        c, r, body_uri = session.update_internal_annotation(ro_uri, params[:stub_uri], resource_uri, agraph)
+      if ao_graph
+        begin
+          c, r, body_uri = session.update_internal_annotation(ro_uri, params[:stub_uri], resource_uri, ao_graph)
+        rescue ROSRS::Exception => e
+          contributable.errors.add(params[:template], 'Error from remote server')
+        end
       end
     end
 

Modified: branches/wf4ever/app/controllers/packs_controller.rb (3400 => 3401)


--- branches/wf4ever/app/controllers/packs_controller.rb	2013-02-06 01:13:12 UTC (rev 3400)
+++ branches/wf4ever/app/controllers/packs_controller.rb	2013-02-06 01:31:16 UTC (rev 3401)
@@ -98,7 +98,7 @@
 
   
   def edit_annotations
-    @annotations = get_annotations @pack.ro_uri, @pack.ro_uri   
+    @annotations = get_annotation_graphs(@pack.ro_uri, @pack.ro_uri)
   end
 
   def update_annotations
@@ -261,7 +261,7 @@
   def edit_resource_annotations
     @resource_uri = @pack.resolve_resource_uri(params[:resource_path])
     # FIXME: @annotations is really @annotations_graphs ()
-    @annotations = get_annotation_graphs(@pack.ro_uri, @pack.ro_uri)
+    @annotations = get_annotation_graphs(@pack.ro_uri, @resource_uri)
   end
 
   def update_resource_annotations

reply via email to

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