80369: Add thumbnail link to Item & Bitstream models

This commit is contained in:
Yura Bondarenko
2021-06-25 17:17:56 +02:00
parent 0d5fc8a1c0
commit acff2186b4
3 changed files with 15 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ import { ITEM } from './item.resource-type';
import { ChildHALResource } from './child-hal-resource.model';
import { Version } from './version.model';
import { VERSION } from './version.resource-type';
import { BITSTREAM } from './bitstream.resource-type';
import { Bitstream } from './bitstream.model';
/**
* Class representing a DSpace Item
@@ -69,6 +71,7 @@ export class Item extends DSpaceObject implements ChildHALResource {
owningCollection: HALLink;
templateItemOf: HALLink;
version: HALLink;
thumbnail: HALLink;
self: HALLink;
};
@@ -100,6 +103,13 @@ export class Item extends DSpaceObject implements ChildHALResource {
@link(RELATIONSHIP, true)
relationships?: Observable<RemoteData<PaginatedList<Relationship>>>;
/**
* The thumbnail for this Item
* Will be undefined unless the thumbnail {@link HALLink} has been resolved.
*/
@link(BITSTREAM, false, 'thumbnail')
thumbnail?: Observable<RemoteData<Bitstream>>;
/**
* Method that returns as which type of object this object should be rendered
*/