-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix up polymorphism for core model types #5
Conversation
I haven't yet tested the conversion script with these changes. I think it'll need a tweak or two. I'll try to get to that later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. These are suggestions for minor changes. Only one, the recommendation for DsMeta is for a potential bug.
Thanks for the suggestions! I've applied them all. |
Previously the manuscript, holding, and record classes weren't doing much. They were added with an eye toward polymorphism, but the ExportRepresenter was converting all item hashes unconditionally to a generic DsItem object with methods applicable to all three. This change gets ExportRepresenter working as intended so that Holding, Manuscript, and Record objects are created by ExportRepresenter where appropriate. DsItem is removed as no longer needed, and all unused methods of the core model types are removed as well. The spec helper export hash is also updated to accommodate these changes. Addresses comment on #3
Co-authored-by: emeryr-upenn <[email protected]>
8545195
to
bd1cfd5
Compare
Previously the manuscript, holding, and record classes weren't doing much. They were added with an eye toward polymorphism, but the ExportRepresenter was converting all item hashes unconditionally to a generic DsItem object with methods applicable to all three.
This change gets ExportRepresenter working as intended so that Holding, Manuscript, and Record objects are created by ExportRepresenter where appropriate. DsItem is removed as no longer needed, and all unused methods of the core model types are removed as well.
The spec helper export hash is also updated to support these changes.
Addresses comment on #3