Class: GalterIrExporter::Export::CollectionConverter
- Defined in:
- lib/galter_ir_exporter/export/collection_converter.rb
Overview
Convert a Collection including metadata, permissions and member ids into a PORO so that the metadata can be exported in json format using to_json
Instance Method Summary collapse
-
#initialize(collection) ⇒ CollectionConverter
constructor
Create an instance of a Collection converter containing all the metadata for json export.
Methods inherited from Converter
Constructor Details
#initialize(collection) ⇒ CollectionConverter
Create an instance of a Collection converter containing all the metadata for json export
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/galter_ir_exporter/export/collection_converter.rb', line 10 def initialize(collection) @id = collection.id @title = collection.title @description = collection.description @creator = collection.creator.map { |c| c } @members = collection.members.map(&:id) = (collection) @depositor = collection.depositor @part_of = collection.part_of @contributor = collection.contributor @publisher = collection.publisher @date_created = collection.date_created @date_uploaded = collection.date_uploaded @date_modified = collection.date_modified @subject = collection.subject @language = collection.language @language = collection.language @resource_type = collection.resource_type @identifier = collection.identifier @based_near = collection.based_near @tag = collection.tag = collection. @abstract = collection.abstract @bibliographic_citation = collection.bibliographic_citation @digital_origin = collection.digital_origin @mesh = collection.mesh @lcsh = collection.lcsh @subject_geographic = collection.subject_geographic @subject_name = collection.subject_name @multi_page = collection.multi_page @institutional_collection = collection.institutional_collection @private_note = collection.private_note @member_ids = collection.member_ids @parent_id = collection.parent_id @combined_file_id = collection.combined_file_id end |