diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb
index 7f9d54aa6f..873248724e 100644
--- a/app/controllers/catalog_controller.rb
+++ b/app/controllers/catalog_controller.rb
@@ -119,6 +119,7 @@ class CatalogController < ApplicationController
config.add_facet_field 'date_ingested_ssim', label: 'Date Ingested', limit: 5, suggest: true, if: Proc.new {|context, config, opts| context.current_ability.can?(:read, :administrative_facets)}, group: "workflow"
config.add_facet_field 'has_captions_bsi', label: 'Has Captions', if: Proc.new {|context, config, opts| context.current_ability.can?(:read, :administrative_facets)}, group: "workflow", helper_method: :display_has_caption_or_transcript
config.add_facet_field 'has_transcripts_bsi', label: 'Has Transcripts', if: Proc.new {|context, config, opts| context.current_ability.can?(:read, :administrative_facets)}, group: "workflow", helper_method: :display_has_caption_or_transcript
+ config.add_facet_field 'physical_format_ssim', label: 'Physical Format', limit: 5, if: proc { |context, config, opts| context.current_ability.can?(:read, :administrative_facets) }, group:"workflow", helper_method: :physical_format_facet_display
config.add_facet_field 'subject_ssim', label: 'Subject', if: false
config.add_facet_field 'donor_ssim', label: 'Donors', if: false
diff --git a/app/helpers/blacklight/local_blacklight_helper.rb b/app/helpers/blacklight/local_blacklight_helper.rb
index e535bf41a4..728f450d77 100644
--- a/app/helpers/blacklight/local_blacklight_helper.rb
+++ b/app/helpers/blacklight/local_blacklight_helper.rb
@@ -17,6 +17,10 @@ def rights_statement_facet_display arg
ModsDocument::RIGHTS_STATEMENTS[arg]
end
+ def physical_format_facet_display arg
+ ModsDocument::PHYSICAL_FORMATS[arg]
+ end
+
def alternative_title_index_display args
field = args[:document][args[:field]]
field.first(3).map { |f| truncate(f, length: 32) }.join("; ")
diff --git a/app/models/concerns/media_object_intercom.rb b/app/models/concerns/media_object_intercom.rb
index eb0e4a79e9..d33ba19c1d 100644
--- a/app/models/concerns/media_object_intercom.rb
+++ b/app/models/concerns/media_object_intercom.rb
@@ -45,6 +45,7 @@ def to_ingest_api_hash(include_structure = true, remove_identifiers: false, publ
terms_of_use: terms_of_use,
table_of_contents: table_of_contents,
physical_description: physical_description,
+ physical_format: physical_format,
series: series,
record_identifier: record_identifier,
comment: comment.to_a,
diff --git a/app/models/concerns/media_object_mods.rb b/app/models/concerns/media_object_mods.rb
index 57f7ae5ae2..8bf21c0d4b 100644
--- a/app/models/concerns/media_object_mods.rb
+++ b/app/models/concerns/media_object_mods.rb
@@ -353,6 +353,15 @@ def physical_description=(value)
Array(value).each { |val| descMetadata.add_physical_description(val) if val.present? }
end
+ # has_attributes :physical_format, datastream: :descMetadata, at: [:physical_format], multiple: true
+ def physical_format
+ descMetadata.physical_format
+ end
+ def physical_format=(value)
+ delete_all_values(:physical_format)
+ Array(value).each { |val| descMetadata.add_physical_format(val) if val.present? }
+ end
+
# has_attributes :related_item_url, datastream: :descMetadata, at: [:related_item_url], multiple: true
def related_item_url
descMetadata.related_item_url.zip(descMetadata.related_item_label).map{|a|{url: a[0].strip, label: a[1]}}
diff --git a/app/models/iiif_manifest_presenter.rb b/app/models/iiif_manifest_presenter.rb
index 133c7f005b..91734a53bb 100644
--- a/app/models/iiif_manifest_presenter.rb
+++ b/app/models/iiif_manifest_presenter.rb
@@ -166,6 +166,16 @@ def display_rights_statement(media_object)
"#{label}"
end
+ def display_physical_format(media_object)
+ return nil unless media_object.physical_format.present?
+
+ media_object.physical_format.collect do |desc|
+ label = ModsDocument::PHYSICAL_FORMATS[desc]
+ next if label.blank?
+ "#{label}"
+ end
+ end
+
def display_summary(media_object)
return nil unless media_object.abstract.present?
media_object.abstract
@@ -211,6 +221,7 @@ def iiif_metadata_fields
metadata_field('Rights Statement', display_rights_statement(media_object)),
metadata_field('Terms of Use', media_object.terms_of_use),
metadata_field('Physical Description', media_object.physical_description),
+ metadata_field('Physical Format', display_physical_format(media_object)),
metadata_field('Series', display_series(media_object)),
metadata_field('Related Item', display_related_item(media_object)),
metadata_field('Access Restrictions', media_object.access_text),
diff --git a/app/models/media_object.rb b/app/models/media_object.rb
index 6276a1c8e3..f1409a8f64 100644
--- a/app/models/media_object.rb
+++ b/app/models/media_object.rb
@@ -371,6 +371,7 @@ def to_solr(include_child_fields: false)
all_text_values << solr_doc["genre_ssim"]
all_text_values << solr_doc["language_ssim"]
all_text_values << solr_doc["physical_description_ssim"]
+ all_text_values << solr_doc["physical_format_ssim"]
all_text_values << solr_doc["series_ssim"]
all_text_values << solr_doc["date_sim"]
all_text_values << solr_doc["notes_sim"]
diff --git a/app/models/mods_behaviors.rb b/app/models/mods_behaviors.rb
index 14d470243f..72ee40b5b6 100644
--- a/app/models/mods_behaviors.rb
+++ b/app/models/mods_behaviors.rb
@@ -75,6 +75,7 @@ def to_solr(solr_doc = Hash.new, opts = {})
solr_doc['language_ssim'] = gather_terms(self.find_by_terms(:language_text))
solr_doc['language_code_ssim'] = gather_terms(self.find_by_terms(:language_code))
solr_doc['physical_description_ssim'] = gather_terms(self.find_by_terms(:physical_description))
+ solr_doc['physical_format_ssim'] = gather_terms(self.find_by_terms(:physical_format))
solr_doc['related_item_url_sim'] = gather_terms(self.find_by_terms(:related_item_url))
solr_doc['related_item_label_sim'] = gather_terms(self.find_by_terms(:related_item_label))
solr_doc['terms_of_use_ssi'] = (self.find_by_terms(:terms_of_use) - self.find_by_terms(:rights_statement)).text
diff --git a/app/models/mods_document.rb b/app/models/mods_document.rb
index 20162eea48..270101c475 100644
--- a/app/models/mods_document.rb
+++ b/app/models/mods_document.rb
@@ -22,6 +22,7 @@ class ModsDocument < ActiveFedora::OmDatastream
IDENTIFIER_TYPES = Avalon::ControlledVocabulary.find_by_name(:identifier_types) || {"other" => "Local"}
NOTE_TYPES = Avalon::ControlledVocabulary.find_by_name(:note_types) || {"local" => "Local Note"}
RIGHTS_STATEMENTS = Avalon::ControlledVocabulary.find_by_name(:rights_statements)
+ PHYSICAL_FORMATS = Avalon::ControlledVocabulary.find_by_name(:physical_formats)
set_terminology do |t|
t.root(:path=>'mods',
@@ -95,7 +96,7 @@ class ModsDocument < ActiveFedora::OmDatastream
t.language_code(:proxy => [:language, :code])
t.language_text(:proxy => [:language, :text])
- # Physical Description
+ # Physical Description & Physical Format
t.mime_physical_description(:path => 'mods/oxns:physicalDescription') do
t.internet_media_type(:path => 'internetMediaType')
end
@@ -103,9 +104,11 @@ class ModsDocument < ActiveFedora::OmDatastream
t.original_related_item(:path => 'relatedItem', :attributes => { :type => 'original'}) do
t.physical_description(:path => 'physicalDescription') { t.extent }
+ t.physical_format(:path => 'physicalDescription') { t.form }
t.other_identifier(:path => 'identifier') { t.type_(:path => '@type', :namespace_prefix => nil) }
end
t.physical_description(:proxy => [:original_related_item, :physical_description, :extent])
+ t.physical_format(:proxy => [:original_related_item, :physical_format, :form])
t.other_identifier(:proxy => [:original_related_item, :other_identifier])
# Summary and Notes
diff --git a/app/models/mods_templates.rb b/app/models/mods_templates.rb
index e575fdf019..1262f349b1 100644
--- a/app/models/mods_templates.rb
+++ b/app/models/mods_templates.rb
@@ -176,6 +176,18 @@ def add_physical_description(value, opts={})
add_child_node(get_original_related_item, :_original_physical_description, value)
end
+ define_template :_original_physical_format do |xml, text|
+ xml.physicalDescription {
+ xml.form {
+ xml.text(text)
+ }
+ }
+ end
+
+ def add_physical_format(value, opts = {})
+ add_child_node(get_original_related_item, :_original_physical_format, value)
+ end
+
define_template :_other_identifier do |xml,text,type|
type = ModsDocument::IDENTIFIER_TYPES.keys.first if type.empty?
xml.identifier(:type => type) {
diff --git a/app/views/media_objects/_dropdown_field.html.erb b/app/views/media_objects/_dropdown_field.html.erb
index 0da586f9d7..8c611d7fa9 100644
--- a/app/views/media_objects/_dropdown_field.html.erb
+++ b/app/views/media_objects/_dropdown_field.html.erb
@@ -33,6 +33,6 @@ Unless required by applicable law or agreed to in writing, software distributed
<% count.times do |i| %>
<% value = values[i] %>
<% option_hash = (options[:dropdown_options].values).zip(options[:dropdown_options].keys) %>
- <%= select_tag fieldname.to_s, options_for_select(option_hash, value), class: "form-control" %>
+ <%= select_tag fieldname.to_s, options_for_select(option_hash, value), class: "form-control", include_blank: options[:include_blank] %>
<% end %>
diff --git a/app/views/media_objects/_resource_description.html.erb b/app/views/media_objects/_resource_description.html.erb
index a8a594b689..4bdd7baf02 100644
--- a/app/views/media_objects/_resource_description.html.erb
+++ b/app/views/media_objects/_resource_description.html.erb
@@ -13,8 +13,8 @@ Unless required by applicable law or agreed to in writing, software distributed
specific language governing permissions and limitations under the License.
--- END LICENSE_HEADER BLOCK ---
%>
-<% unless ModsDocument::IDENTIFIER_TYPES && ModsDocument::NOTE_TYPES && ModsDocument::RIGHTS_STATEMENTS %>
- <% raise Avalon::VocabularyNotFound.new "Rights statements, Identifier types, or Note types vocabulary not found." %>
+<% unless ModsDocument::IDENTIFIER_TYPES && ModsDocument::NOTE_TYPES && ModsDocument::RIGHTS_STATEMENTS && ModsDocument::PHYSICAL_FORMATS %>
+ <% raise Avalon::VocabularyNotFound.new "Physical Format, Rights statements, Identifier types, or Note types vocabulary not found." %>
<% end %>
@@ -77,6 +77,13 @@ Unless required by applicable law or agreed to in writing, software distributed
options: {display_label: "Physical Description",
multivalued: true}} %>
+ <%= render partial: 'dropdown_field',
+ locals: {form: form, field: :physical_format,
+ options: {display_label: 'Physical Format',
+ dropdown_options: ModsDocument::PHYSICAL_FORMATS,
+ multivalued: true,
+ include_blank: true }} %>
+
<%= render partial: 'text_field',
locals: {form: form, field: :series,
options: {display_label: "Series",
diff --git a/config/controlled_vocabulary.yml.example b/config/controlled_vocabulary.yml.example
index 95c2ac14e9..f5a2fb416a 100644
--- a/config/controlled_vocabulary.yml.example
+++ b/config/controlled_vocabulary.yml.example
@@ -34,3 +34,83 @@ rights_statements:
http://rightsstatements.org/vocab/CNE/1.0/: Copyright Not Evaluated
http://rightsstatements.org/vocab/UND/1.0/: Copyright Undetermined
http://rightsstatements.org/vocab/NKC/1.0/: No Known Copyright
+physical_formats:
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#1InchAudioTape: 1 inch audio tape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#1InchVideotape: 1 inch videotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#HalfInchAudioTape: 1/2 inch audio tape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#HalfInchVideotape: 1/2 inch videotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#QuarterInchAudioCassette: 1/4 inch audio cassette
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#QuarterInchAudioTape: 1/4 inch audio tape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#QuarterInchVideotape: 1/4 inch videotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#16mmFilm: 16mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#2InchAudioTape: 2 inch audio tape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#2InchVideotape: 2 inch videotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#22mmFilm: 22mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#28mmFilm: 28mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#35mmFilm: 35mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#70mmFilm: 70mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#8Track: 8-track
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#8mmFilm: 8mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#9andaHalfmmFilm: 9.5mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#AluminumDisc: Aluminum disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#AudioCD: Audio CD
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#AudioCassette: Audio cassette
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Betacam: Betacam
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#BetacamSX: Betacam SX
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Betamax: Betamax
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#BluRayDisc: Blu-ray disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Catrivision: Catrivision
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D1: D1
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D2: D2
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D3: D3
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D5: D5
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D6: D6
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#D9: D9
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#DAT: DAT
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DCT: DCT
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#DDS: DDS
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#DTRS: DTRS
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DV: DV
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DVCAM: DVCAM
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DVCPRO: DVCPRO
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DVD: DVD
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#DigitalBetacam: Digital Betacam
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Digital8: Digital8
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#EIAJ: EIAJ
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#EVD: EVD
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#Film: Film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#FlexiDisc: Flexi Disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#GroovedDictabelt: Grooved Dictabelt
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#GroovedAnalogDisc: Grooved analog disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#HDCAM: HDCAM
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#HDV: HDV
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Hi8: Hi8
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#LacquerDisc: Lacquer disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#LaserDisc: LaserDisc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#MII: MII
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#MagneticDictabelt: Magnetic Dictabelt
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#MiniCassette: Mini-cassette
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#MiniDV: MiniDV
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#OpenReelAudiotape: Open reel audiotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#OpenReelVideoTape: Open reel videotape
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#OpticalVideoDisc: Optical video disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#PCMBetamax: PCM Betamax
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#PCMUmatic: PCM U-matic
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#PCMVHS: PCM VHS
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#PianoRoll: Piano roll
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#PlasticCylinder: Plastic cylinder
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#ShellacDisc: Shellac disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#Super16mmFilm: Super 16mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#Super8mmFilm: Super 8mm film
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#SuperAudioCD: Super Audio CD
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#SuperVideoCD: Super Video CD
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Umatic: U-matic
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#UniversalMediaDisc: Universal Media Disc
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Vcord: V-Cord
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#VHS: VHS
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#VX: VX
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Video8: Video8
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-video-vocabulary/#Videocassette: Videocassette
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#VinylRecording: Vinyl recording
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#WaxCylinder: Wax cylinder
+ https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-audio-vocabulary/#WireRecording: Wire recording
diff --git a/config/initializers/presenter_config.rb b/config/initializers/presenter_config.rb
index 453adcf1c9..b6b84e7d7b 100644
--- a/config/initializers/presenter_config.rb
+++ b/config/initializers/presenter_config.rb
@@ -11,6 +11,7 @@
width: nil,
height: nil,
physical_description: nil,
+ physical_format: nil,
file_size: nil,
date_digitized: nil,
file_checksum: nil,
@@ -46,6 +47,7 @@
language_code: [],
terms_of_use: nil,
physical_description: [],
+ physical_format: [],
related_item_url: [],
note: [],
other_identifier: [],
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 08859c271a..c49e606508 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -139,6 +139,8 @@ en:
Terms of Use describes the conditions under which content may be used. This is an optional field.
physical_description: |
Physical Description is an optional field that will display information about the original resource being described.
+ physical_format: |
+ Physical Format is an optional field that will display information about the physical form of the original resource being described.
rights_statement: |
Rights Statement is used to communicate the copyright and re-use status of digital objects using a set of standardized rights statements provided by
RightsStatements.org
related_item_url: |
diff --git a/spec/controllers/catalog_controller_spec.rb b/spec/controllers/catalog_controller_spec.rb
index 893012ecdd..f9359ab798 100644
--- a/spec/controllers/catalog_controller_spec.rb
+++ b/spec/controllers/catalog_controller_spec.rb
@@ -335,7 +335,7 @@
describe "search fields" do
let(:media_object) { FactoryBot.create(:fully_searchable_media_object) }
- ["title_tesi", "alternative_title_ssim", "creator_ssim", "contributor_ssim", "unit_ssim", "collection_ssim", "abstract_ssi", "publisher_ssim", "topical_subject_ssim", "geographic_subject_ssim", "temporal_subject_ssim", "genre_ssim", "physical_description_ssim", "language_ssim", "date_sim", "notes_sim", "table_of_contents_ssim", "other_identifier_sim", "series_ssim", "bibliographic_id_ssi"].each do |field|
+ ["title_tesi", "alternative_title_ssim", "creator_ssim", "contributor_ssim", "unit_ssim", "collection_ssim", "abstract_ssi", "publisher_ssim", "topical_subject_ssim", "geographic_subject_ssim", "temporal_subject_ssim", "genre_ssim", "physical_description_ssim", "physical_format_ssim", "language_ssim", "date_sim", "notes_sim", "table_of_contents_ssim", "other_identifier_sim", "series_ssim", "bibliographic_id_ssi"].each do |field|
it "should find results based upon #{field}" do
query = Array(media_object.to_solr[field]).first
# split on ' ' and only search on the first word of a multiword field value
@@ -519,8 +519,8 @@
MediaObjectIndexingJob.perform_now(media_object.id)
end
["avalon_resource_type_ssim", "creator_ssim", "date_sim", "genre_ssim", "series_ssim", "collection_ssim", "unit_ssim", "language_ssim", "has_captions_bsi", "has_transcripts_bsi",
- "workflow_published_sim", "avalon_uploader_ssi", "read_access_group_ssim", "read_access_virtual_group_ssim", "date_digitized_ssim", "date_ingested_ssim", "subject_ssim",
- "donor_ssim", "rights_statement_ssi"].each do |field|
+ "workflow_published_sim", "avalon_uploader_ssi", "read_access_group_ssim", "read_access_virtual_group_ssim", "date_digitized_ssim", "date_ingested_ssim", "subject_ssim",
+ "donor_ssim", "rights_statement_ssi", "physical_format_ssim"].each do |field|
it "should facet results on #{field}" do
query = Array(media_object.to_solr(include_child_fields: true)[field]).first
# The following line is to check that the test is using a valid solr field name
diff --git a/spec/controllers/media_objects_controller_spec.rb b/spec/controllers/media_objects_controller_spec.rb
index fd8b321883..9a46c4f88e 100644
--- a/spec/controllers/media_objects_controller_spec.rb
+++ b/spec/controllers/media_objects_controller_spec.rb
@@ -274,6 +274,7 @@
:terms_of_use,
:table_of_contents,
:physical_description,
+ :physical_format,
:other_identifier,
:rights_statement,
:series
diff --git a/spec/factories/batch_entries.rb b/spec/factories/batch_entries.rb
index 0b61609dab..eb8c6fbd43 100644
--- a/spec/factories/batch_entries.rb
+++ b/spec/factories/batch_entries.rb
@@ -20,6 +20,6 @@
current_status { 'registered' }
error_message {}
media_object_pid { 'kfd39dnw' }
- payload { "{\"publish\":false,\"hidden\":false,\"fields\":{\"title\":[\"Dolorum\"],\"creator\":[\"Carroll, Nora\"],\"date_issued\":[\"2012\"],\"other_identifier\":[\"ABC123\"],\"other_identifier_type\":[\"local\"],\"related_item_url\":[\"http://www.example.com/text.pdf\"],\"related_item_label\":[\"Example Item PDF\"],\"rights_statement\":[\"http://rightsstatements.org/vocab/InC/1.0/\"],\"terms_of_use\":[\"Terms of Use Language\"],\"language\":[\"English\"],\"physical_description\":[\"16mm Reel\"],\"note\":[\"This is a test general note\"],\"note_type\":[\"general\"],\"abstract\":[\"Test abstract\"],\"statement_of_responsibility\":[\"Test Statement of Responsibility\"]},\"files\":[{\"file\":\"spec/fixtures/jazz-performance.mp3\",\"offset\":\"00:00:00.500\",\"label\":\"Quis quo\",\"date_digitized\":\"2015-10-30\"}],\"position\":3,\"user_key\":\"frances.dickens@reichel.com\",\"collection\":\"#{batch_registries.collection}\"}" }
+ payload { "{\"publish\":false,\"hidden\":false,\"fields\":{\"title\":[\"Dolorum\"],\"creator\":[\"Carroll, Nora\"],\"date_issued\":[\"2012\"],\"other_identifier\":[\"ABC123\"],\"other_identifier_type\":[\"local\"],\"related_item_url\":[\"http://www.example.com/text.pdf\"],\"related_item_label\":[\"Example Item PDF\"],\"rights_statement\":[\"http://rightsstatements.org/vocab/InC/1.0/\"],\"terms_of_use\":[\"Terms of Use Language\"],\"language\":[\"English\"],\"physical_description\":[\"1 reel\"],\"physical_format\":[\"16mm film\"],\"note\":[\"This is a test general note\"],\"note_type\":[\"general\"],\"abstract\":[\"Test abstract\"],\"statement_of_responsibility\":[\"Test Statement of Responsibility\"]},\"files\":[{\"file\":\"spec/fixtures/jazz-performance.mp3\",\"offset\":\"00:00:00.500\",\"label\":\"Quis quo\",\"date_digitized\":\"2015-10-30\"}],\"position\":3,\"user_key\":\"frances.dickens@reichel.com\",\"collection\":\"#{batch_registries.collection}\"}" }
end
end
diff --git a/spec/factories/media_objects.rb b/spec/factories/media_objects.rb
index 56e4c04735..c4f8f23b78 100644
--- a/spec/factories/media_objects.rb
+++ b/spec/factories/media_objects.rb
@@ -41,6 +41,7 @@
temporal_subject { [Faker::Lorem.word] }
geographic_subject { [Faker::Address.country] }
physical_description { [Faker::Lorem.word] }
+ physical_format { ['https://pbcore.org/pbcore-controlled-vocabularies/instantiationphysical-film-vocabulary/#Super8mmFilm'] }
table_of_contents { [Faker::Lorem.paragraph] }
note { [{ note: Faker::Lorem.paragraph, type: 'general' }, { note: Faker::Lorem.paragraph, type: 'local' }] }
other_identifier { [{ id: Faker::Lorem.unique.word, source: 'local' }] }
diff --git a/spec/models/iiif_manifest_presenter_spec.rb b/spec/models/iiif_manifest_presenter_spec.rb
index 7c946f53bf..126d789072 100644
--- a/spec/models/iiif_manifest_presenter_spec.rb
+++ b/spec/models/iiif_manifest_presenter_spec.rb
@@ -64,8 +64,8 @@
[
'Title', 'Alternative title', 'Publication date', 'Creation date', 'Main contributor', 'Summary', 'Contributor', 'Publisher', 'Genre', 'Subject',
- 'Time period', 'Geographic Subject', 'Collection', 'Unit', 'Language', 'Rights Statement', 'Terms of Use', 'Physical Description', 'Series',
- 'Related Item', 'Notes', 'Table of Contents', 'Local Note', 'Other Identifier', 'Access Restrictions', 'Bibliographic ID'
+ 'Time period', 'Geographic Subject', 'Collection', 'Unit', 'Language', 'Rights Statement', 'Terms of Use', 'Physical Description', 'Physical Format',
+ 'Series', 'Related Item', 'Notes', 'Table of Contents', 'Local Note', 'Other Identifier', 'Access Restrictions', 'Bibliographic ID'
].each do |field|
expect(subject).to include(field)
end
@@ -96,8 +96,8 @@
[
'Title', 'Publication date', 'Creation date', 'Main contributor', 'Summary', 'Contributor', 'Publisher', 'Genre', 'Subject',
- 'Time period', 'Geographic Subject', 'Collection', 'Unit', 'Language', 'Rights Statement', 'Terms of Use', 'Physical Description', 'Series',
- 'Related Item', 'Notes', 'Table of Contents', 'Local Note', 'Other Identifier', 'Access Restrictions', 'Bibliographic ID', 'Lending Period'
+ 'Time period', 'Geographic Subject', 'Collection', 'Unit', 'Language', 'Rights Statement', 'Terms of Use', 'Physical Description', 'Physical Format',
+ 'Series', 'Related Item', 'Notes', 'Table of Contents', 'Local Note', 'Other Identifier', 'Access Restrictions', 'Bibliographic ID', 'Lending Period'
].each do |field|
expect(subject).to include(field)
end
diff --git a/spec/models/media_object_spec.rb b/spec/models/media_object_spec.rb
index 9f0767c57c..1ffea85f0d 100644
--- a/spec/models/media_object_spec.rb
+++ b/spec/models/media_object_spec.rb
@@ -434,6 +434,7 @@
'language' => [''],
'table_of_contents' => [''],
'physical_description' => [''],
+ 'physical_format' => [''],
'record_identifier' => [''],
'note' => [{type:'',note:''}],
'other_identifier' => [{id:'',source:''}]
@@ -455,6 +456,7 @@
expect(media_object.language).to eq([])
expect(media_object.table_of_contents).to eq([])
expect(media_object.physical_description).to eq([])
+ expect(media_object.physical_format).to eq([])
expect(media_object.record_identifier).to eq([])
expect(media_object.note).to eq([])
expect(media_object.other_identifier).to eq([])
diff --git a/spec/presenters/speedy_af/proxy/media_object_spec.rb b/spec/presenters/speedy_af/proxy/media_object_spec.rb
index d25a980e2f..3f4b0cdbab 100644
--- a/spec/presenters/speedy_af/proxy/media_object_spec.rb
+++ b/spec/presenters/speedy_af/proxy/media_object_spec.rb
@@ -59,6 +59,7 @@
expect(presenter.rights_statement).to eq media_object.rights_statement
expect(presenter.terms_of_use).to eq media_object.terms_of_use
expect(presenter.physical_description).to eq media_object.physical_description
+ expect(presenter.physical_format).to eq media_object.physical_format
expect(presenter.related_item_url).to eq media_object.related_item_url
expect(presenter.table_of_contents).to eq media_object.table_of_contents
expect(presenter.note).to eq media_object.note