Skip to content

Instantly share code, notes, and snippets.

@terrywbrady
Last active March 20, 2017 16:13
Show Gist options
  • Save terrywbrady/3ad113963ee88078d25d0623573805be to your computer and use it in GitHub Desktop.
Save terrywbrady/3ad113963ee88078d25d0623573805be to your computer and use it in GitHub Desktop.
Community/Collection Hierarchy in DSpace 7 REST
/*
* Only items, collections, communities, and sites have handles, so handle should move out to a separate object.
* Every navigable item has a breadcrumb trail.
*/
NavigableObjectRest extends DSpaceObjectRest {
private String handle;
//Is this embedded - too slow
//Is this retrieved through a separate endpoint - cumbersome
//Is this embedded but populated only on request - how do we represent that in our framework
private List<NavigableObjectRest> breadcrumbList;
}
/*
* Site and Community objects have descendant hierarchies
*/
HierarchicalObjectRest extends NavigableObjectRest {
//Is this embedded - too slow
//Is this retrieved through a separate endpoint - cumbersome
//Is this embedded but populated only on request - how do we represent that in our framework
private List<NavigableObjectRest> descendandHierarchyList;
}
@terrywbrady
Copy link
Author

@abollini, It is helpful to know your thoughts for optional/lazy loaded properties. Currently, we keep data in _embed and in _links. We probably also need _optional to house optional properties. If you look at the 3rd gist (https://gist.github.com/terrywbrady/9fddc7cd31e5d975b503c97a7330aa6b) I posted on Friday, I started to brainstorm how we might want to access breadcrumbs and hierarchy. I would be curious how that data would be represented with lazy loading.

@terrywbrady
Copy link
Author

I created a Jira ticket to track this as well. https://jira.duraspace.org/browse/DS-3533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment