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

Dynamically populate BF Refs when retrieving a Resource #192

Closed
jermnelson opened this issue Oct 1, 2021 · 0 comments · Fixed by #209
Closed

Dynamically populate BF Refs when retrieving a Resource #192

jermnelson opened this issue Oct 1, 2021 · 0 comments · Fixed by #209
Assignees

Comments

@jermnelson
Copy link
Contributor

jermnelson commented Oct 1, 2021

When retrieving a resource from the API, dynamically query MongoDB to populate some of the following bfAdminMetadataRefs,
bfItemRefs, bfInstanceRefs, and bfWorksRefs fields with the corresponding resource URIs.

For a bf:Instance:

  • Populate bfWorksRefs with BF Work URLs from the bf:Instance resource's bf:instanceOf triples. We should also query MongoDB for the inverse property of any bf:Works that have bf:hasInstance properties with the bf:Instance's URL.
  • Populate bfItemRefs with BF Item URLs from the bf:Instance resource's bf:hasItem triples. We should also query MongoDB for the inverse property of any bf:Items that have bf:itemOf properties with the bf:Instance's URL
  • Populate bfAdminMetadataRefs with BF AdminMetadataRefs URLs from the bf:Instance resource's bf:adminMetadata resources. There is not a corresponding inverse property.

For a bf:Work

  • Populate bfInstanceRefs with the BF Instance URLs from the bf:Work resource's bf:hasInstance triples. We should also query MongoDB for the inverse property of any bf:instanceOf that have bf:instanceOf properties with the bf:Work resource URL.
  • Populate bfAdminMetadataRefs with BF AdminMetadataRefs URLs from the bf:Work resource's bf:adminMetadata resources. There is not a corresponding inverse property.

For a bf:Item

  • Populate bfInstanceRefs with the BF Instance URLs from the bf:Item resource's bf:itemOf triples. We should also query MongoDB for the inverse property of any bf:Instances that have bf:hasItem properties with the bf:Item resource URL.
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

Successfully merging a pull request may close this issue.

2 participants