Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying a record #5

Open
lannonbr opened this issue Oct 20, 2016 · 1 comment
Open

Modifying a record #5

lannonbr opened this issue Oct 20, 2016 · 1 comment

Comments

@lannonbr
Copy link
Contributor

Hey AnatolyI,

Our next task we wanted to add was the ability to modify a Record. what I was thinking on how to implement this was to have the ability to be able to add, modify, or remove a field / subfield at first. When you would do this, you would have to change the directory based on these modifications and then change the length of the record which is stored in the leader.

If you have any other suggestions on how it should be implemented, feel free to respond.

~ Benjamin

@blackbeam
Copy link
Owner

Record modification is a tricky topic for me.

Current modification-related primitives (RecordBuilder::filter_fields, RecordBuilder::filter_subfields and FieldRepr::filter_subfields) was implemented because i faced a concrete task earlier.

I was needed to remove every 979$a fields in a record and add one concrete 979$a field but MARC allows records to have any amount of fields with same tag and any amount of subfields with same identifier and i saw such combinations in records provided for this task.
So i come up with mentioned methods as a convenient way to remove every XXX or XXX$y in a record which hides the actual field-subfield layout complexity.

I did not really see a task related to record modification or record creation that requires something bigger than current RecordBuilder and FieldRepr API so i have nothing to tell about the topic.

If your case reveals some problems with convenience or functionality of current API and you will come up with a solution - it will be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants