Skip to content

Instantly share code, notes, and snippets.

@terrywbrady
Last active March 17, 2017 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terrywbrady/9fddc7cd31e5d975b503c97a7330aa6b to your computer and use it in GitHub Desktop.
Save terrywbrady/9fddc7cd31e5d975b503c97a7330aa6b to your computer and use it in GitHub Desktop.
Community/collection hierarchy navigation object
  • ChecksumRest (algorithm, value) - value object - no database id
  • MetadataEntryRest(key, value, language)
  • BaseObjectRest (id) - object with a database identifier (may or may not have metadata)
    • BitstreamFormatRest (description, mime, etc)
    • DSpaceObjectRest (uuid, type, name) - lightweight representation of an object id without metadata
      • BrowsableObjectRest(handle, link to breadcrumb list) - representation of a node with a handle and parents
        • ItemRest(metadata, item prop) - actual item object
        • BreadcrumbObjectRest - ancestor object without descendant nodes populated
          • DescendantTreeObjectRest(children) - representation of an ancestor node with descendants fully populated
          • HierarchicalObjectRest(metadata) - representation of a node with metadata
            • CollectionRest(collection prop)
            • CommunityRest(community prop)
            • SiteRest(site prop)
      • NonNavigableObjectRest(metadata) - non hiearchical objects that contain metadata
        • BitstreamRest
        • EPersonRest
        • EPersonGroupRest
DSpaceObjectRest extends BaseObjectRest {
private String uuid;
private String name;
private String type}
}
BrowsableObjectRest extends DSpaceObjectRest {
private String handle;
//link to breadcrumb trail
private List<BreadcrumbObjectRest> breadcrumbList;
//link to fully instatiated DSO
private DescibableObjectRest dso;
}
interface DescribableObjectRest {
public List<MetadataEntryRest> getMetadata();
}
ItemRest extends BrowsableObjectRest implementes DescribableObjectRest {
private List<MetadataEntryRest> metadata;
private boolean inArchive = false;
private boolean discoverable = false;
private boolean withdrawn = false;
private Date lastModified = new Date();
@JsonIgnore
private CollectionRest owningCollection;
@JsonIgnore
private CollectionRest templateItemOf;
//private EPerson submitter;
List<BitstreamRest> bitstreams;
}
BreadcrumbObjectRest extends BrowsableObjectRest {
}
//instantiation of a hiearchical node with all descendant nodes populated
DescendantTreeObjectRest extends BreadcrumbObjectRest {
List<AncestorObjectRest> children;
}
HierarchicalObjectRest extends BreadcrumbObjectRest imlements DescribableObjectRest {
private List<MetadataEntryRest> metadata;
//link to object returning descendants
List<DescendantTreeObjectRest> getDescendants();
}
CollectionRest extends HiearchicalObjectRest {
}
CommunityRest extends HiearchicalObjectRest {
}
SiteRest extends HiearchicalObjectRest {
}
//Bitstream, EPerson, EPersonGroup
NonNavigableObjectRest extends DSpaceObjectRest implements DescribableObjectRest {
private List<MetadataEntryRest> metadata;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment