mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
Geospatial maps: Revert metadata-representation-list.component.ts changes
Note: Might interfere with some nice virtual authority compatibility
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import {
|
||||
Observable,
|
||||
of,
|
||||
zip as observableZip,
|
||||
} from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
@@ -94,17 +93,14 @@ export class MetadataRepresentationListComponent extends AbstractIncrementalList
|
||||
* @param metadata The list of all metadata values
|
||||
* @param page The page to return representations for
|
||||
*/
|
||||
resolveMetadataRepresentations(metadata: MetadataValue[], page: number): Observable<MetadataRepresentation[]|any[]> {
|
||||
resolveMetadataRepresentations(metadata: MetadataValue[], page: number): Observable<MetadataRepresentation[]> {
|
||||
return observableZip(
|
||||
...metadata
|
||||
.slice((this.objects.length * this.incrementBy), (this.objects.length * this.incrementBy) + this.incrementBy)
|
||||
.map((metadatum: any) => Object.assign(new MetadataValue(), metadatum))
|
||||
.map((metadatum: MetadataValue) => {
|
||||
if (this.metadataService.isVirtual(metadatum) && !metadatum.authority.includes('http')) {
|
||||
if (this.metadataService.isVirtual(metadatum)) {
|
||||
return this.relationshipService.resolveMetadataRepresentation(metadatum, this.parentItem, this.itemType);
|
||||
} else if (this.metadataService.isVirtual(metadatum) && metadatum.authority.includes('http')) {
|
||||
// TODO: we could do authority virtual handling here?
|
||||
return of([]);
|
||||
} else {
|
||||
// Check for a configured browse link and return a standard metadata representation
|
||||
let searchKeyArray: string[] = [];
|
||||
|
Reference in New Issue
Block a user