class Fedora::Repository

def export(object, extra_params={})


extra_params:: any other extra parameters to pass to fedora
method:: the method to fetch such as :export, :history, :versions, etc
object:: a fedora uri, pid, FedoraObject instance
== Parameters
Export the given object
def export(object, extra_params={})
  extra_params = {:format=>:foxml, :context=>:archive}.merge!(extra_params)
  if extra_params[:format].kind_of?(String)
    format = extra_params[:format]
  else
    format = case extra_params[: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
  fetch_custom(object, "export", :format=>format, :context=>extra_params[:context].to_s)
end