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

Find a solution for method get_derives_from of EntitySnapshot #11

Open
iosonopersia opened this issue Apr 21, 2021 · 0 comments
Open

Find a solution for method get_derives_from of EntitySnapshot #11

iosonopersia opened this issue Apr 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@iosonopersia
Copy link
Collaborator

iosonopersia commented Apr 21, 2021

Method get_derives_from of class EntitySnapshot has a big problem which must be addressed in future releases of oc_ocdm.

When references to other EntitySnaphots are found, either an EntitySnapshot instance already contained in the ProvSet is returned or a new one must be created and added to the ProvSet. In the latter case there's a problem: the constructor of a ProvEntity (superclass of EntitySnapshot) requires the prov_subject parameter, which the method is uncapable of retrieving as for now.

Should the prov_subject parameter be removed from the constructor's signature of ProvSet (by also adapting the rest of the code with the new assumption that a prov_subject could sometimes be unknown)? Or maybe there's a viable way to retrieve that information?

  • If the parent snapshot(s) are stored in the same ProvSet instance, than there's no problem: add_se(None, uri) will not have to create any new entity and it will simply return the one that has that particular uri.
  • If the parent snapshot(s) are NOT stored in the same ProvSet instance, we've currently no way to find out what their prov_subject is (calling add_se(None, uri) will create a new snapshot entity with None as prov_subject).

A TODO comment is put in place here:

# TODO: what is the prov_subject of these snapshots?

@iosonopersia iosonopersia added the bug Something isn't working label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant