Geospatial maps: Revert metadata-representation-list.component.ts changes

Note: Might interfere with some nice virtual authority compatibility
This commit is contained in:
Kim Shepherd
2025-03-13 13:12:38 +01:00
parent d4dee96823
commit 1f760d882a

View File

@@ -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[] = [];