lib/krikri/map_crosswalk.rb in krikri-0.10.1 vs lib/krikri/map_crosswalk.rb in krikri-0.11.0

- old
+ new

@@ -132,11 +132,10 @@ get_label(genre) end set_value(sr, :relation, parent_sr.relation) set_value(sr, :rights, parent_sr.rights, true) - set_value(sr, :temporal, parent_sr.temporal) set_value(sr, :title, parent_sr.title) set_value(sr, :collection, parent_sr.collection) do |coll| build_collection(coll) end @@ -147,10 +146,14 @@ set_value(sr, :date, parent_sr.date) do |date| build_time_span(date) end + set_value(sr, :temporal, parent_sr.temporal) do |temporal| + build_time_span(temporal) + end + set_value(sr, :spatial, parent_sr.spatial) do |place| build_place(place) end set_value(sr, :subject, parent_sr.subject) do |subj| @@ -171,10 +174,10 @@ end def build_time_span(source) return unless source.is_a? DPLA::MAP::TimeSpan date = {} - date[:displayDate] + set_value(date, :displayDate, source.prefLabel, true, &:as_json) set_value(date, :begin, source.begin, true, &:as_json) set_value(date, :end, source.end, true, &:as_json) date.any? ? date : nil end