lib/ddr/models/solr_document.rb in ddr-models-2.0.0.pre.2 vs lib/ddr/models/solr_document.rb in ddr-models-2.0.0.pre.3

- old
+ new

@@ -214,9 +214,19 @@ def display_format get(Ddr::IndexFields::DISPLAY_FORMAT) end + def struct_maps + JSON.parse(fetch(Ddr::IndexFields::STRUCT_MAPS)) + rescue + {} + end + + def struct_map(type='default') + struct_maps.present? ? struct_maps.fetch(type) : nil + end + private def targets_query "#{Ddr::IndexFields::IS_EXTERNAL_TARGET_FOR}:#{internal_uri_for_query}" end