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