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

Helper class methods for constructing resource metadata #1

Open
kshepherd opened this issue Feb 10, 2022 · 0 comments
Open

Helper class methods for constructing resource metadata #1

kshepherd opened this issue Feb 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kshepherd
Copy link
Collaborator

At the moment, constructing an actual API resource object from scratch (eg. for creation) is mostly left up to the developer.
It would be nice to have class methods for base DSO and if applicable, higher-level objects so that it is easy to add, update or otherwise manipulate a metadata value(s) (with field, value, language, authority, confidence as arguments) in a DSO that we're putting together in the python script. It could work something like

item = new Item()
item.add_metadata('dc.creator', 'Family-name, First-name', 'en') (authority=None, confidence=-1 defaults)

Or, we could make item.metadata use a Metadata class and add methods to that like
item.metadata.add(....)
item.metadata.clear_by_field('dc.creator')

And so on.

@kshepherd kshepherd added the enhancement New feature or request label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant