myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3560] branches/packs: changed resource_uri to re


From: noreply
Subject: [myexperiment-hackers] [3560] branches/packs: changed resource_uri to resource_path in annotations
Date: Thu, 23 May 2013 08:25:37 +0000 (UTC)

Revision
3560
Author
dgc
Date
2013-05-23 08:25:37 +0000 (Thu, 23 May 2013)

Log Message

changed resource_uri to resource_path in annotations

Modified Paths

Diff

Modified: branches/packs/app/models/research_object.rb (3559 => 3560)


--- branches/packs/app/models/research_object.rb	2013-05-22 13:45:00 UTC (rev 3559)
+++ branches/packs/app/models/research_object.rb	2013-05-23 08:25:37 UTC (rev 3560)
@@ -203,7 +203,7 @@
       end
 
       annotated_resources_statements.each do |annotated_resource|
-        resource.annotation_resources.build(:resource_uri => annotated_resource.object.to_s)
+        resource.annotation_resources.build(:resource_path => relative_uri(annotated_resource.object, uri))
         links << { :link => annotated_resource.object.to_s, :rel => "http://purl.org/ao/annotatesResource" }
       end
 
@@ -372,7 +372,7 @@
       })
 
       request_links["http://purl.org/ao/annotatesResource"].each do |annotated_resource_uri|
-        annotation_stub.annotation_resources.build(:resource_uri => relative_uri(annotated_resource_uri, uri))
+        annotation_stub.annotation_resources.build(:resource_path => relative_uri(annotated_resource_uri, uri))
         links << { :link => annotated_resource_uri, :rel => "http://purl.org/ao/annotatesResource" }
       end
 

Modified: branches/packs/app/models/resource.rb (3559 => 3560)


--- branches/packs/app/models/resource.rb	2013-05-22 13:45:00 UTC (rev 3559)
+++ branches/packs/app/models/resource.rb	2013-05-23 08:25:37 UTC (rev 3560)
@@ -67,7 +67,7 @@
       graph << [uri, RDF::URI("http://purl.org/ao/body"), ro_uri.join(ao_body_path)]
 
       annotation_resources.each do |resource|
-        graph << [uri, RDF::URI("http://purl.org/wf4ever/ro#annotatesAggregatedResource"), RDF::URI(resource.resource_uri)]
+        graph << [uri, RDF::URI("http://purl.org/wf4ever/ro#annotatesAggregatedResource"), ro_uri.join(resource.resource_path)]
       end
     end
 

Modified: branches/packs/db/migrate/20130520145900_create_research_objects.rb (3559 => 3560)


--- branches/packs/db/migrate/20130520145900_create_research_objects.rb	2013-05-22 13:45:00 UTC (rev 3559)
+++ branches/packs/db/migrate/20130520145900_create_research_objects.rb	2013-05-23 08:25:37 UTC (rev 3560)
@@ -45,7 +45,7 @@
 
     create_table "annotation_resources" do |t|
       t.integer "annotation_id"
-      t.string  "resource_uri"
+      t.string  "resource_path"
     end
 
   end

Modified: branches/packs/db/schema.rb (3559 => 3560)


--- branches/packs/db/schema.rb	2013-05-22 13:45:00 UTC (rev 3559)
+++ branches/packs/db/schema.rb	2013-05-23 08:25:37 UTC (rev 3560)
@@ -44,7 +44,7 @@
 
   create_table "annotation_resources", :force => true do |t|
     t.integer "annotation_id"
-    t.string  "resource_uri"
+    t.string  "resource_path"
   end
 
   create_table "announcements", :force => true do |t|

reply via email to

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