Class: ExportsController
Instance Method Summary
collapse
#archivesspace, can_access?, permission_mappings, set_access_control
Instance Method Details
#container_labels ⇒ Object
10
11
12
13
|
# File 'frontend/app/controllers/exports_controller.rb', line 10
def container_labels
@resource = JSONModel(:resource).find(params[:id], find_opts)
render :layout => false
end
|
#container_template ⇒ Object
74
75
76
77
|
# File 'frontend/app/controllers/exports_controller.rb', line 74
def container_template
uri = "/repositories/#{JSONModel::repository}/resources/#{params[:id]}/templates/top_container_creation.csv"
csv_response(uri)
end
|
#digital_object_template ⇒ Object
79
80
81
82
|
# File 'frontend/app/controllers/exports_controller.rb', line 79
def digital_object_template
uri = "/repositories/#{JSONModel::repository}/resources/#{params[:id]}/templates/digital_object_creation.csv"
csv_response(uri, {}, 'digital_object_template_')
end
|
#download_dc ⇒ Object
24
25
26
27
|
# File 'frontend/app/controllers/exports_controller.rb', line 24
def download_dc
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/dublin_core/#{params[:id]}.xml")
end
|
#download_eac ⇒ Object
54
55
56
57
|
# File 'frontend/app/controllers/exports_controller.rb', line 54
def download_eac
download_export(
"/repositories/#{JSONModel::repository}/archival_contexts/#{params[:type].sub(/^agent_/, '').pluralize}/#{params[:id]}.xml")
end
|
#download_ead ⇒ Object
42
43
44
45
46
47
48
49
50
51
|
# File 'frontend/app/controllers/exports_controller.rb', line 42
def download_ead
url = "/repositories/#{JSONModel::repository}/resource_descriptions/#{params[:id]}.xml"
download_export(url,
:include_unpublished => (params[:include_unpublished] ? params[:include_unpublished] : false),
:include_daos => (params[:include_daos] ? params[:include_daos] : false),
:include_uris => (params[:include_uris] ? params[:include_uris] : false),
:numbered_cs => (params[:numbered_cs] ? params[:numbered_cs] : false),
:ead3 => (params[:ead3] ? params[:ead3] : false))
end
|
#download_marc ⇒ Object
16
17
18
19
20
21
|
# File 'frontend/app/controllers/exports_controller.rb', line 16
def download_marc
download_export(
"/repositories/#{JSONModel::repository}/resources/marc21/#{params[:id]}.xml",
:include_unpublished_marc => params[:include_unpublished_marc]
)
end
|
#download_marc_auth ⇒ Object
59
60
61
62
|
# File 'frontend/app/controllers/exports_controller.rb', line 59
def download_marc_auth
download_export(
"/repositories/#{JSONModel::repository}/agents/#{params[:type].sub(/^agent_/, '').pluralize}/marc21/#{params[:id]}.xml")
end
|
#download_mets ⇒ Object
36
37
38
39
|
# File 'frontend/app/controllers/exports_controller.rb', line 36
def download_mets
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/mets/#{params[:id]}.xml", :dmd => params[:dmd_scheme])
end
|
#download_mods ⇒ Object
30
31
32
33
|
# File 'frontend/app/controllers/exports_controller.rb', line 30
def download_mods
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/mods/#{params[:id]}.xml")
end
|
#print_to_pdf ⇒ Object
64
65
66
67
|
# File 'frontend/app/controllers/exports_controller.rb', line 64
def print_to_pdf
@resource = JSONModel(:resource).find(params[:id], find_opts)
render :layout => false
end
|
#resource_duplicate ⇒ Object
69
70
71
72
|
# File 'frontend/app/controllers/exports_controller.rb', line 69
def resource_duplicate
@resource = JSONModel(:resource).find(params[:id], find_opts)
render :layout => false
end
|