Skip to content

Dynamically populate BF Refs when retrieving a Resource #192

@jermnelson

Description

@jermnelson

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions