13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/active_fedora/fixture_exporter.rb', line 13
def self.export(pid, ={})
= {:format=>:foxml, :context=>:archive}.merge!()
if [:format].kind_of?(String)
format = [:format]
else
format = case [:format]
when :atom then "info:fedora/fedora-system:ATOM-1.1"
when :atom_zip then "info:fedora/fedora-system:ATOMZip-1.1"
when :mets then "info:fedora/fedora-system:METSFedoraExt-1.1"
when :foxml then "info:fedora/fedora-system:FOXML-1.1"
else "info:fedora/fedora-system:FOXML-1.1"
end
end
ActiveFedora::Base.connection_for_pid(pid).export(:pid=>pid, :format=>format, :context=>[:context].to_s)
end
|