-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 520: Merge 2673-BugsAndFeatures to master
Version update for the aeon_fulfillment plugin for ArchivesSpace. Related Work Items: #2673
- Loading branch information
Showing
7 changed files
with
591 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class AccessionMapper < RecordMapper | ||
|
||
def initialize(accession) | ||
super(accession) | ||
end | ||
|
||
# Returns a hash that maps from Aeon OpenURL values to values in the provided record. | ||
def record_fields | ||
mappings = super | ||
|
||
if record.use_restrictions_note && record.use_restrictions_note.present? | ||
mappings['use_restrictions_note'] = record.use_restrictions_note | ||
end | ||
|
||
if record.access_restrictions_note && record.access_restrictions_note.present? | ||
mappings['access_restrictions_note'] = record.access_restrictions_note | ||
end | ||
|
||
mappings['language'] = self.record['language'] | ||
|
||
return mappings | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class ArchivalObjectMapper < RecordMapper | ||
|
||
def initialize(archival_object) | ||
super(archival_object) | ||
end | ||
|
||
|
||
# Override for RecordMapper json_fields method. | ||
def json_fields | ||
mappings = super | ||
|
||
json = self.record.json | ||
if !json | ||
return mappings | ||
end | ||
|
||
if json['repository_processing_note'] && json['repository_processing_note'].present? | ||
mappings['repository_processing_note'] = json['repository_processing_note'] | ||
end | ||
|
||
return mappings | ||
end | ||
|
||
|
||
# Returns a hash that maps from Aeon OpenURL values to values in the provided record. | ||
def record_fields | ||
mappings = super | ||
|
||
mappings['component_id'] = self.record['component_id'] | ||
|
||
return mappings | ||
end | ||
end |
Oops, something went wrong.