lib/bulkrax.rb in bulkrax-1.0.2 vs lib/bulkrax.rb in bulkrax-2.0.0

- old
+ new

@@ -3,16 +3,18 @@ require "bulkrax/engine" require 'active_support/all' module Bulkrax class << self + # TODO: remove collection_field_mapping when releasing v2 mattr_accessor :parsers, :default_work_type, :default_field_mapping, :collection_field_mapping, :fill_in_blank_source_identifiers, - :parent_child_field_mapping, + :related_children_field_mapping, + :related_parents_field_mapping, :reserved_properties, :field_mappings, :import_path, :export_path, :removed_image_path, @@ -31,29 +33,19 @@ self.import_path = 'tmp/imports' self.export_path = 'tmp/exports' self.removed_image_path = Bulkrax::Engine.root.join('spec', 'fixtures', 'removed.png').to_s self.server_name = 'bulkrax@example.com' - # @todo, merge parent_child_field_mapping and collection_field_mapping into field_mappings, - # or make them settable per import some other way. - - # Field_mapping for establishing a parent-child relationship (FROM parent TO child) - # This can be a Collection to Work, or Work to Work relationship - # This value IS NOT used for OAI, so setting the OAI Entries here will have no effect - # The mapping is supplied per Entry, provide the full class name as a string, eg. 'Bulkrax::CsvEntry' - # Example: - # { - # 'Bulkrax::RdfEntry' => 'http://opaquenamespace.org/ns/contents', - # 'Bulkrax::CsvEntry' => 'children' - # } - # By default no parent-child relationships are added - self.parent_child_field_mapping = {} - + # NOTE: Creating Collections using the collection_field_mapping will no longer be supported as of Bulkrax version 3.0. + # Please configure Bulkrax to use related_parents_field_mapping and related_children_field_mapping instead. + # TODO: remove collection_field_mapping when releasing v2 # Field_mapping for establishing a collection relationship (FROM work TO collection) # This value IS NOT used for OAI, so setting the OAI Entries here will have no effect # The mapping is supplied per Entry, provide the full class name as a string, eg. 'Bulkrax::CsvEntry' # The default value for CSV is collection - self.collection_field_mapping = {} + self.collection_field_mapping = { + 'Bulkrax::CsvEntry' => 'collection' + } # Hash of Generic field_mappings for use in the view # There must be one field_mappings hash per view parial # Based on Hyrax CoreMetadata && BasicMetadata # Override at application level to change