facet, filter, pagination implementation using rest api

This commit is contained in:
Lotte Hofstede
2018-03-29 15:30:46 +02:00
parent cdf1dc402a
commit 86fcf44977
30 changed files with 513 additions and 341 deletions

View File

@@ -117,9 +117,13 @@ export abstract class BaseResponseParsingService {
this.objectCache.add(co, this.EnvConfig.cache.msToLive, requestHref);
}
protected processPageInfo(pageObj: any): PageInfo {
processPageInfo(pageObj: any): PageInfo {
if (isNotEmpty(pageObj)) {
return new DSpaceRESTv2Serializer(PageInfo).deserialize(pageObj);
const pageInfoObject = new DSpaceRESTv2Serializer(PageInfo).deserialize(pageObj);
if (pageInfoObject.currentPage >= 0) {
Object.assign(pageInfoObject, { currentPage: pageInfoObject.currentPage + 1 });
}
return pageInfoObject
} else {
return undefined;
}