Skip to content

Commit

Permalink
Merge pull request #11 from gisktzh/feature/gb3-1675-geometadata-redu…
Browse files Browse the repository at this point in the history
…ced-content

Feature/gb3 1675 geometadata reduced content
  • Loading branch information
TIL-EBP authored Oct 28, 2024
2 parents 92c64fc + e809ec2 commit 897d10d
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 25 deletions.
60 changes: 56 additions & 4 deletions src/app/shared/models/gb3-api-generated.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,23 @@ export interface MetadataDataset {
}

export interface MetadataDatasets {
datasets: Dataset[];
datasets: {
/** UUID */
uuid: string;
/** Kurzbeschreibung */
kurzbeschreibung: string;
/** Name des Geodatensatzes */
name: string;
/** Kontakt: Zuständig für Geometadaten */
kontakt_metadaten: {
/** Amt */
amt: string;
};
/** Abgabeformate */
abgabeformate: string[];
/** Verfügbarkeit OGD/NOGD */
ogd: boolean;
}[];
}

export interface MetadataGeoshopProducts {
Expand All @@ -182,23 +198,59 @@ export interface MetadataMap {
}

export interface MetadataMaps {
maps: Map[];
maps: {
/** Map UUID */
uuid: string;
/** Beschreibung der Karte */
beschreibung: string;
/** Kartenname */
name: string;
/** Kontakt: Zuständig für Geometadaten */
kontakt_metadaten: {
/** Amt */
amt: string;
};
}[];
}

export interface MetadataProduct {
product: Product;
}

export interface MetadataProducts {
products: Product[];
products: {
/** Product UUID */
uuid: string;
/** Beschreibung des Geoproduktes */
beschreibung: string;
/** Name des Geodatenprodukts */
name: string;
/** Kontakt: Zuständig für Geometadaten */
kontakt_metadaten: {
/** Amt */
amt: string;
};
}[];
}

export interface MetadataService {
service: Service;
}

export interface MetadataServices {
services: Service[];
services: {
/** Service UUID */
uuid: string;
/** Beschreibung des Geodienstes */
beschreibung: string;
/** Name des Geodienstes */
name: string;
/** Kontakt: Zuständig für Geometadaten */
kontakt_metadaten: {
/** Amt */
amt: string;
};
}[];
}

export interface MunicipalitiesList {
Expand Down
34 changes: 13 additions & 21 deletions src/app/shared/services/apis/gb3/gb3-metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@ export class Gb3MetadataService extends Gb3ApiService {
result.datasets.map((dataset) => {
const {
uuid: guid,
shortDescription,
kurzbeschreibung: shortDescription,
name,
contact: {
metadata: {department},
},
outputFormat,
kontakt_metadaten: {amt: department},
abgabeformate: outputFormat,
ogd,
} = this.transformDatasetsDetailDataToDatasetMetadata(dataset);
} = dataset;
return new DatasetOverviewMetadataItem(guid, name, shortDescription, department, outputFormat, ogd);
}),
),
Expand All @@ -103,12 +101,10 @@ export class Gb3MetadataService extends Gb3ApiService {
result.products.map((product) => {
const {
uuid: guid,
description,
beschreibung: description,
name,
contact: {
metadata: {department},
},
} = this.transformProductDetailToProductMetadata(product);
kontakt_metadaten: {amt: department},
} = product;
return new ProductOverviewMetadataItem(guid, name, description, department);
}),
),
Expand All @@ -123,12 +119,10 @@ export class Gb3MetadataService extends Gb3ApiService {
result.maps.map((mapMetadata) => {
const {
uuid: guid,
description,
beschreibung: description,
name,
contact: {
geodata: {department},
},
} = this.transformMapsDetailToMapMetadata(mapMetadata);
kontakt_metadaten: {amt: department},
} = mapMetadata;
return new MapOverviewMetadataItem(guid, name, description, department);
}),
),
Expand All @@ -143,12 +137,10 @@ export class Gb3MetadataService extends Gb3ApiService {
result.services.map((service) => {
const {
uuid: guid,
description,
beschreibung: description,
name,
contact: {
metadata: {department},
},
} = this.transformServicesDetailToServiceMetadata(service);
kontakt_metadaten: {amt: department},
} = service;
return new ServiceOverviewMetadataItem(guid, name, description, department);
}),
),
Expand Down

0 comments on commit 897d10d

Please sign in to comment.