Modified: branches/wf4ever/app/helpers/research_objects_helper.rb (3413 => 3414)
--- branches/wf4ever/app/helpers/research_objects_helper.rb 2013-02-11 13:32:10 UTC (rev 3413)
+++ branches/wf4ever/app/helpers/research_objects_helper.rb 2013-02-11 13:57:40 UTC (rev 3414)
@@ -50,7 +50,12 @@
end
def resource_types(annotations, resource_uri)
- annotations.graph.query([RDF::URI(resource_uri), RDF::type, nil]).map do |s,p,type|
+ if annotations.is_a?(ROSRS::RDFGraph)
+ graph = annotations.graph
+ else
+ graph = annotations
+ end
+ graph.query([RDF::URI(resource_uri), RDF::type, nil]).map do |s,p,type|
type.to_s
end
end
Modified: branches/wf4ever/app/views/packs/_items.rhtml (3413 => 3414)
--- branches/wf4ever/app/views/packs/_items.rhtml 2013-02-11 13:32:10 UTC (rev 3413)
+++ branches/wf4ever/app/views/packs/_items.rhtml 2013-02-11 13:57:40 UTC (rev 3414)
@@ -100,8 +100,7 @@
<%
label = e.ro_local_uri
label = label.split("/").last unless label.starts_with?("http:")
- annotations = get_annotations(pack.ro_uri, e.uri)
- types = resource_types_as_labels(annotations, e.uri)
+ types = resource_types_as_labels(@all_annotations, e.uri)
%>
<li>
<%= link_to(label, pack_resources_path(pack) + '/' + e.ro_local_uri) -%>