ualbertalib / HydraNorth

This repo is deprecated. Succeeded by https://github.com/ualbertalib/jupiter. This codebase was a IR built based on Samvera/Sufia
11 stars 4 forks source link

Multi-valued fields in Dataverse to map to single-valued Hydranorth fields #451

Closed weiweishi closed 8 years ago

weiweishi commented 9 years ago

The following fields are multi-valued fields in Dataverse but single-valued in Hydranorth. We'll need a strategy to either change the property of the fields, or handle the values appropriately.

Note: The first three metadata properties have been changed to allow multi-value in dataverse-migration branch.

johnhuck commented 9 years ago

Many of these fields are present more than once because of many-to-one relationships in the mapping between metadata fields in DDI and elements in DC (i.e., several different types of 'temporal' metadata are mapped to the one 'temporal' element in the DC_OAI output, which also includes an introductory phrase in the content of the element.)

I am looking to find new predicates outside of dcterms that can better accommodate the different varieties of temporal, spatial, etc., values, so that the introductory phrase can be excluded. This would also go towards address this issue, although there might still be an occasional need to accommodate multiple values for these elements.

sfarnel commented 9 years ago

We need to ensure that this is discussed in the context of data models and the deposit form, noting that the deposit form and data model(s) will be uncoupled in the future. That is, we don't want to introduce competing predicates for the same semantic property simply because we want/need it to be repeatable in general but want it to be non-repeatable on the deposit form. The form, which is but one of many sources of metadata, should not dictate overall practice.

On Mon, Jul 6, 2015 at 4:22 PM, johnhuck notifications@github.com wrote:

Many of these fields are present more than once because of many-to-one relationships in the mapping between metadata fields in DDI and elements in DC (i.e., several different types of 'temporal' metadata are mapped to the one 'temporal' element in the DC_OAI output, which also includes an introductory phrase in the content of the element.

I am looking to find new predicates outside of dcterms that can better accommodate the different varieties of temporal, spatial, etc., values, so that the introductory phrase can be excluded. This would also go towards address this issue, although there might still be an occasional need to accommodate multiple values for these elements.

— Reply to this email directly or view it on GitHub https://github.com/ualbertalib/HydraNorth/issues/451#issuecomment-119014895 .

Sharon Farnel Metadata Coordinator University of Alberta Libraries sharon.farnel@ualberta.ca 780-492-3685

pbinkley commented 9 years ago

Could we concatenate multi-value Dataverse fields into single fields?

So: we'll go ahead and merge the current PR (making description, temporal and spatial fields multi-value), and adjust from there after consultation with stakeholders.

pbinkley commented 9 years ago

ERA migration rake task was altered to allow for multivalued temporal and spatial fields in 88bef6f .

pgwillia commented 9 years ago

This breaks backward compatibility with data migrated before this change. Upon deployment of HydraNorth 0.1.5

App 26532 stderr: [ 2015-07-14 10:31:21.1158 26569/0x000000015334b8(Worker 1) utils.rb:84 ]: *** Exception ActionView::Template::Error in Rack application object (You attempted to set the property `description' to a scalar value. However, this property is declared as being multivalued.) (process 26569, thread 0x000000015334b8(Worker 1)):
App 26532 stderr:       from :in `description='
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/attributes.rb:24:in `block in attributes='
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/attributes.rb:23:in `each'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/attributes.rb:23:in `attributes='
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/attributes/serializers.rb:26:in `attributes='
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/loadable_from_json.rb:112:in `init_with_json'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/solr_instance_loader.rb:30:in `allocate_object'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/solr_instance_loader.rb:21:in `object'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/active-fedora-9.1.2/lib/active_fedora/indexing.rb:93:in `load_instance_from_solr'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/sufia-6.0.0/app/models/concerns/sufia/solr_document_behavior.rb:33:in `to_model'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_controller/model_naming.rb:5:in `convert_to_model'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/routing/polymorphic_routes.rb:113:in `polymorphic_url'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/actionpack-4.1.11/lib/action_dispatch/routing/polymorphic_routes.rb:148:in `polymorphic_path'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/blacklight-5.13.1/app/helpers/blacklight/url_helper_behavior.rb:92:in `session_tracking_path'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/blacklight-5.13.1/app/helpers/blacklight/url_helper_behavior.rb:85:in `session_tracking_params'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/blacklight-5.13.1/app/helpers/blacklight/url_helper_behavior.rb:44:in `document_link_params'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/blacklight-5.13.1/app/helpers/blacklight/url_helper_behavior.rb:40:in `link_to_document'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/blacklight-5.13.1/app/helpers/blacklight/catalog_helper_behavior.rb:191:in `render_thumbnail_tag'
App 26532 stderr:       from /var/www/sites/hydranorth/vendor/ruby/2.1.0/gems/sufia-6.0.0/app/views/homepage/_recent_document.html.erb:6:in `block in _vendor_ruby_______gems_sufia
weiweishi commented 8 years ago

@johnhuck has fixed the multivalue metadata in the stylesheet.