diff --git a/src/app/core/cache/models/normalized-collection.model.ts b/src/app/core/cache/models/normalized-collection.model.ts index 86a1ba177a..2114e4cc43 100644 --- a/src/app/core/cache/models/normalized-collection.model.ts +++ b/src/app/core/cache/models/normalized-collection.model.ts @@ -18,7 +18,7 @@ export class NormalizedCollection extends NormalizedDSpaceObject { * The Bitstream that represents the logo of this Collection */ @autoserialize - @relationship(NormalizedDSOType.NormalizedBitstream) + @relationship(ResourceType.Bitstream) logo: string; /** diff --git a/src/backend/bitstreams.ts b/src/backend/bitstreams.ts index da6a87e042..63eae94a98 100644 --- a/src/backend/bitstreams.ts +++ b/src/backend/bitstreams.ts @@ -52,6 +52,7 @@ export const BITSTREAMS = { }, "id": "8934", "uuid": "ba7d24f2-8fc7-4b8e-b7b6-6c32be1c12a6", + "type": "bitstream", "name": "license.txt", "size": 41183, "checksum": { diff --git a/src/backend/bundles.ts b/src/backend/bundles.ts index b7411c6412..06a38e6fac 100644 --- a/src/backend/bundles.ts +++ b/src/backend/bundles.ts @@ -51,6 +51,7 @@ export const BUNDLES = { }, "id": "8475", "uuid": "99f78e5e-3677-43b0-aaef-cddaa1a49092", + "type": "bundle", "name": "LICENSE", "metadata": [ { "key": "dc.title", "value": "LICENSE", "language": "en" } diff --git a/src/backend/items.ts b/src/backend/items.ts index 63913f8245..9598f334a2 100644 --- a/src/backend/items.ts +++ b/src/backend/items.ts @@ -17,12 +17,9 @@ export const ITEMS = { { "href": "/bundles/2355" }, - { - "href": "/bundles/5687" - }, - { - "href": "/bundles/8475" - } + // { + // "href": "/bundles/5687" + // } ] }, "id": "8871", @@ -94,7 +91,86 @@ export const ITEMS = { "value": "(not specified)", "language": "en" } - ] + ], + "_embedded": { + "parents": [ + { + "_links": { + "self": { "href": "/collections/5179" }, + "items": [ + { "href": "/items/8871" }, + { "href": "/items/9978" } + ] + }, + "id": "5179", + "uuid": "9e32a2e2-6b91-4236-a361-995ccdc14c60", + "type": "collection", + "name": "A Test Collection", + "handle": "123456789/5179", + }, + { + "_links": { + "self": { "href": "/collections/6547" }, + "items": [ + { "href": "/items/8871" }, + { "href": "/items/9978" } + ] + }, + "id": "6547", + "uuid": "598ce822-c357-46f3-ab70-63724d02d6ad", + "type": "collection", + "name": "Another Test Collection", + "handle": "123456789/6547", + } + ], + "bundles": [ + { + "_links": { + "self": { "href": "/bundles/2355" }, + "items": [ + { "href": "/items/8871" } + ], + "bitstreams": [ + { "href": "/bitstreams/3678" }, + ], + "primaryBitstream": { "href": "/bitstreams/3678" } + }, + "id": "2355", + "uuid": "35e0606d-5e18-4f9c-aa61-74fc751cc3f9", + "type": "bundle", + "name": "ORIGINAL", + "metadata": [ + { "key": "dc.title", "value": "ORIGINAL", "language": "en" } + ], + "_embedded": { + "bitstreams": [ + { + "_links": { + "self": { "href": "/bitstreams/3678" }, + "bundle": { "href": "/bundles/35e0606d-5e18-4f9c-aa61-74fc751cc3f9" }, + "retrieve": { "href": "/bitstreams/43c57c2b-206f-4645-8c8f-5f10c84b09fa/retrieve" } + }, + "id": "3678", + "uuid": "43c57c2b-206f-4645-8c8f-5f10c84b09fa", + "type": "bitstream", + "name": "do_open_access_CRL.pdf", + "size": 636626, + "checksum": { + "value": "063dfbbbac873aa3fca479b878eccff3", + "algorithm": "MD5" + }, + "metadata": [ + { "key": "dc.title", "value": "do_open_access_CRL.pdf", "language": null }, + { "key": "dc.description", "value": "Conference Paper", "language": "en" } + ], + "format": "Adobe PDF", + "mimetype": "application/pdf" + } + ] + } + } + ] + } }, { "_links": { @@ -113,9 +189,9 @@ export const ITEMS = { { "href": "/bundles/2355" }, - { - "href": "/bundles/5687" - } + // { + // "href": "/bundles/5687" + // } ] }, "id": "9978", @@ -167,6 +243,15 @@ export const ITEMS = { "value": "(not specified)", "language": "en" } + ], + "_embedded": { + "parents": [ + { + "_links": { + "self": { "href": "/collections/5179" }, + "items": [ + { "href": "/items/8871" }, + { "href": "/items/9978" } ] } ]