geonetwork-ui 2.5.0-dev.22c177ea1 → 2.5.0-dev.4e621e7b5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +11 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +20 -17
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +22 -2
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -4
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +23 -15
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +7 -4
- package/esm2022/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +2 -2
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +4 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -2
- package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +4 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -2
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +9 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +19 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +6 -1
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +78 -0
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -2
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +14 -4
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +10 -3
- package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +5 -4
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-cache.mjs +12 -0
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-file.mjs +3 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base.mjs +1 -1
- package/esm2022/libs/util/data-fetcher/src/lib/readers/csv.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/excel.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/geojson.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/gml.mjs +5 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/json.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +19 -11
- package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +9 -7
- package/esm2022/translations/de.json +3 -4
- package/esm2022/translations/en.json +4 -13
- package/esm2022/translations/es.json +3 -4
- package/esm2022/translations/fr.json +15 -16
- package/esm2022/translations/it.json +20 -20
- package/esm2022/translations/nl.json +3 -4
- package/esm2022/translations/pt.json +3 -4
- package/fesm2022/geonetwork-ui.mjs +407 -207
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +2 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -0
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +2 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +1 -0
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts +16 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +5 -0
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +4 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts +16 -0
- package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -2
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts +8 -0
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts.map +1 -0
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts +5 -3
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +7 -4
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/utils.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +25 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +22 -16
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +41 -2
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +3 -1
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +4 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +75 -0
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +42 -21
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +2 -1
- package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +1 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +1 -1
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +16 -0
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +21 -2
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +15 -0
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +30 -1
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +12 -0
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.css +0 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +25 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.ts +70 -0
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +6 -0
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +37 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +8 -2
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +2 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +6 -0
- package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +13 -4
- package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +14 -0
- package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +2 -1
- package/src/libs/util/data-fetcher/src/lib/readers/base.ts +2 -2
- package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +7 -7
- package/src/libs/util/data-fetcher/src/lib/readers/json.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +34 -11
- package/src/libs/util/data-fetcher/src/lib/utils.ts +36 -32
- package/translations/de.json +3 -4
- package/translations/en.json +4 -13
- package/translations/es.json +3 -4
- package/translations/fr.json +15 -16
- package/translations/it.json +20 -20
- package/translations/nl.json +3 -4
- package/translations/pt.json +3 -4
- package/translations/sk.json +3 -4
|
@@ -5,7 +5,7 @@ export declare function openDataset(url: string, typeHint?: SupportedType, optio
|
|
|
5
5
|
namespace?: string;
|
|
6
6
|
wfsVersion?: WfsVersion;
|
|
7
7
|
wfsFeatureType?: string;
|
|
8
|
-
}): Promise<BaseReader>;
|
|
8
|
+
}, cacheActive?: boolean): Promise<BaseReader>;
|
|
9
9
|
/**
|
|
10
10
|
* This fetches the full dataset at the given URL and parses it according to its mime type.
|
|
11
11
|
* All items in the dataset are converted to GeoJSON features, even if they do not bear any spatial geometry.
|
|
@@ -15,7 +15,7 @@ export declare function openDataset(url: string, typeHint?: SupportedType, optio
|
|
|
15
15
|
* 2. otherwise, look for a Content-Type header in the response with a supported mime type
|
|
16
16
|
* 3. if no valid mime type was found, look for an explicit file extension in the url (.csv, .geojson etc.)
|
|
17
17
|
*/
|
|
18
|
-
export declare function readDataset(url: string, typeHint?: SupportedType, options?: any): Promise<DataItem[]>;
|
|
18
|
+
export declare function readDataset(url: string, typeHint?: SupportedType, options?: any, cacheActive?: boolean): Promise<DataItem[]>;
|
|
19
19
|
/**
|
|
20
20
|
* This fetches only the header of the dataset at the given URL, giving info on size, mime-type and last update if available.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/data-fetcher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAc,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,
|
|
1
|
+
{"version":3,"file":"data-fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/data-fetcher.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAc,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,EACD,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,UAAU,CAAC,CAoCrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,GAAG,EACb,WAAW,UAAO,GACjB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAOrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAEvE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseReader } from './base';
|
|
2
|
+
export declare abstract class BaseCacheReader extends BaseReader {
|
|
3
|
+
protected url: string;
|
|
4
|
+
protected cacheActive: boolean;
|
|
5
|
+
constructor(url: string, cacheActive?: boolean);
|
|
6
|
+
setCacheActive(value: boolean): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=base-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-cache.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/base-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,8BAAsB,eAAgB,SAAQ,UAAU;IAEpD,SAAS,CAAC,GAAG,EAAE,MAAM;IACrB,SAAS,CAAC,WAAW;gBADX,GAAG,EAAE,MAAM,EACX,WAAW,UAAO;IAK9B,cAAc,CAAC,KAAK,EAAE,OAAO;CAG9B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseReader } from './base';
|
|
2
1
|
import { DataItem, DatasetInfo, PropertyInfo } from '../model';
|
|
2
|
+
import { BaseCacheReader } from './base-cache';
|
|
3
3
|
type ParseResult = {
|
|
4
4
|
items: DataItem[];
|
|
5
5
|
properties: PropertyInfo[];
|
|
6
6
|
};
|
|
7
|
-
export declare class BaseFileReader extends
|
|
7
|
+
export declare class BaseFileReader extends BaseCacheReader {
|
|
8
8
|
private parseResult_;
|
|
9
9
|
protected getData(): Promise<ParseResult>;
|
|
10
10
|
load(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-file.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/base-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-file.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/base-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,YAAY,EAAE,CAAA;CAC3B,CAAA;AAED,qBAAa,cAAe,SAAQ,eAAe;IACjD,OAAO,CAAC,YAAY,CAAsB;IAE1C,SAAS,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC;IAIzC,IAAI;IAIJ,IAAI,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAExC;IAED,IAAI,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,CAO/B;IAEK,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;CA8BlC"}
|
|
@@ -2,8 +2,8 @@ import { DataItem, DatasetInfo, FieldAggregation, FieldFilter, FieldGroupBy, Fie
|
|
|
2
2
|
export declare class BaseReader {
|
|
3
3
|
protected url: string;
|
|
4
4
|
protected selected: FieldName[];
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
groupedBy: FieldGroupBy[];
|
|
6
|
+
aggregations: FieldAggregation[];
|
|
7
7
|
protected filter: FieldFilter;
|
|
8
8
|
protected sort: FieldSort[];
|
|
9
9
|
protected startIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,UAAU,CAAA;AAEjB,qBAAa,UAAU;IAST,SAAS,CAAC,GAAG,EAAE,MAAM;IARjC,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAO;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,UAAU,CAAA;AAEjB,qBAAa,UAAU;IAST,SAAS,CAAC,GAAG,EAAE,MAAM;IARjC,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAO;IAC/B,SAAS,EAAE,YAAY,EAAE,CAAO;IAChC,YAAY,EAAE,gBAAgB,EAAE,CAAO;IAC9C,SAAS,CAAC,MAAM,EAAE,WAAW,CAAO;IACpC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,CAAO;IAClC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAO;IACnC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAO;gBAER,GAAG,EAAE,MAAM;IAEjC,IAAI;IAIJ,IAAI,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAExC;IAED,IAAI,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,CAE/B;IAED,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAI3B,SAAS,IAAI,IAAI;IASjB,MAAM,CAAC,GAAG,cAAc,EAAE,SAAS,EAAE,GAAG,IAAI;IAM5C,OAAO,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,GAAG,IAAI;IAKzC,SAAS,CAAC,GAAG,YAAY,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAIpD,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAIhC,OAAO,CAAC,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI;IAIzC,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAK/C"}
|
|
@@ -6,9 +6,11 @@ export declare function parseGml(text: string, namespace: string, version: strin
|
|
|
6
6
|
properties: PropertyInfo[];
|
|
7
7
|
};
|
|
8
8
|
export declare class GmlReader extends BaseFileReader {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
protected url: string;
|
|
10
|
+
protected namespace: string;
|
|
11
|
+
protected version: WfsVersion;
|
|
12
|
+
protected cacheActive: boolean;
|
|
13
|
+
constructor(url: string, namespace: string, version: WfsVersion, cacheActive?: boolean);
|
|
12
14
|
protected getData(): Promise<{
|
|
13
15
|
items: DataItem[];
|
|
14
16
|
properties: PropertyInfo[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gml.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/gml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd;IACD,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,YAAY,EAAE,CAAA;CAC3B,CAuBA;AAED,qBAAa,SAAU,SAAQ,cAAc;
|
|
1
|
+
{"version":3,"file":"gml.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/gml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd;IACD,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,YAAY,EAAE,CAAA;CAC3B,CAuBA;AAED,qBAAa,SAAU,SAAQ,cAAc;IAEzC,SAAS,CAAC,GAAG,EAAE,MAAM;IACrB,SAAS,CAAC,SAAS,EAAE,MAAM;IAC3B,SAAS,CAAC,OAAO,EAAE,UAAU;IAC7B,SAAS,CAAC,WAAW;gBAHX,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,UAAU,EACnB,WAAW,UAAO;IAK9B,SAAS,CAAC,OAAO;eArCV,QAAQ,EAAE;oBACL,YAAY,EAAE;;CAyC3B"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { WfsEndpoint, WfsVersion } from '@camptocamp/ogc-client';
|
|
2
2
|
import { DataItem, DatasetInfo, PropertyInfo } from '../model';
|
|
3
|
-
import { BaseReader } from './base';
|
|
4
3
|
import { GmlReader } from './gml';
|
|
5
4
|
import { GeojsonReader } from './geojson';
|
|
6
|
-
|
|
5
|
+
import { BaseCacheReader } from './base-cache';
|
|
6
|
+
export declare class WfsReader extends BaseCacheReader {
|
|
7
7
|
endpoint: WfsEndpoint;
|
|
8
8
|
featureTypeName: string;
|
|
9
9
|
version: WfsVersion;
|
|
10
|
-
constructor(url: string, wfsEndpoint: WfsEndpoint, featureTypeName: string);
|
|
10
|
+
constructor(url: string, wfsEndpoint: WfsEndpoint, featureTypeName: string, cacheActive?: boolean);
|
|
11
11
|
get properties(): Promise<PropertyInfo[]>;
|
|
12
12
|
get info(): Promise<DatasetInfo>;
|
|
13
13
|
static createReader(wfsUrlEndpoint: string, featureTypeName?: string): Promise<GeojsonReader | GmlReader | WfsReader>;
|
|
14
|
-
|
|
14
|
+
getData(aggregation?: any, groupedBy?: any): Promise<{
|
|
15
15
|
items: DataItem[];
|
|
16
16
|
properties: PropertyInfo[];
|
|
17
|
+
} | {
|
|
18
|
+
items: any;
|
|
17
19
|
}>;
|
|
20
|
+
getQueryData(): Promise<any>;
|
|
18
21
|
load(): void;
|
|
19
22
|
read(): Promise<DataItem[]>;
|
|
20
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wfs.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/wfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"wfs.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/data-fetcher/src/lib/readers/wfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAgB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,qBAAa,SAAU,SAAQ,eAAe;IAC5C,QAAQ,EAAE,WAAW,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,UAAU,CAAA;gBAGjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,EACvB,WAAW,CAAC,EAAE,OAAO;IAQvB,IAAI,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAiBxC;IAED,IAAI,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,CAO/B;WAEY,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM;IA4C7D,OAAO,CAAC,WAAW,CAAC,KAAA,EAAE,SAAS,CAAC,KAAA;;;;;;IAiChC,YAAY;IAkBzB,IAAI;IAIE,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;CAGlC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DataItem, DatasetHeaders, PropertyInfo, SupportedType } from './model';
|
|
2
2
|
export declare function inferDatasetType(url: string, typeHint?: SupportedType): Promise<SupportedType>;
|
|
3
3
|
export declare function fetchHeaders(url: string): Promise<DatasetHeaders>;
|
|
4
|
-
export declare function fetchDataAsText(url: string): Promise<string>;
|
|
5
|
-
export declare function fetchDataAsArrayBuffer(url: string): Promise<ArrayBuffer>;
|
|
4
|
+
export declare function fetchDataAsText(url: string, cacheActive: boolean): Promise<string>;
|
|
5
|
+
export declare function fetchDataAsArrayBuffer(url: string, cacheActive: boolean): Promise<ArrayBuffer>;
|
|
6
6
|
export declare function tryParseDate(input: unknown): Date | null;
|
|
7
7
|
export declare function tryParseNumber(input: string): number | null;
|
|
8
8
|
export declare function jsonToGeojsonFeature(object: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EACZ,aAAa,EAEd,MAAM,SAAS,CAAA;AAMhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,aAAa,CAAC,CAsBxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAWjE;AAED,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/libs/util/data-fetcher/src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EAEd,YAAY,EACZ,aAAa,EAEd,MAAM,SAAS,CAAA;AAMhB,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,aAAa,GACvB,OAAO,CAAC,aAAa,CAAC,CAsBxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAWjE;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,MAAM,CAAC,CAcjB;AACD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,WAAW,CAAC,CAmBtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAkBxD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI3D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,QAAQ,CAsB7E;AAqBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EAAE,EACjB,UAAU,UAAQ,GACjB;IACD,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,YAAY,EAAE,CAAA;CAC3B,CA0DA;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EAAE,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAgB3B"}
|
package/package.json
CHANGED
|
@@ -277,6 +277,31 @@ export class Gn4FieldMapper {
|
|
|
277
277
|
},
|
|
278
278
|
output
|
|
279
279
|
),
|
|
280
|
+
featureTypes: (output, source) =>
|
|
281
|
+
this.addExtra(
|
|
282
|
+
{
|
|
283
|
+
featureTypes: selectField(source, 'featureTypes'),
|
|
284
|
+
},
|
|
285
|
+
output
|
|
286
|
+
),
|
|
287
|
+
related: (output, source) => {
|
|
288
|
+
const fcatSource = selectField(
|
|
289
|
+
getFirstValue(
|
|
290
|
+
selectField(
|
|
291
|
+
<SourceWithUnknownProps>selectField(source, 'related'),
|
|
292
|
+
'fcats'
|
|
293
|
+
)
|
|
294
|
+
),
|
|
295
|
+
'_source'
|
|
296
|
+
)
|
|
297
|
+
const featureCatalogIdentifier = selectField(
|
|
298
|
+
<SourceWithUnknownProps>fcatSource,
|
|
299
|
+
'uuid'
|
|
300
|
+
)
|
|
301
|
+
return featureCatalogIdentifier
|
|
302
|
+
? this.addExtra({ featureCatalogIdentifier }, output)
|
|
303
|
+
: output
|
|
304
|
+
},
|
|
280
305
|
isPublishedToAll: (output, source) =>
|
|
281
306
|
this.addExtra(
|
|
282
307
|
{
|
|
@@ -297,6 +297,25 @@ export class ElasticsearchService {
|
|
|
297
297
|
return queryParts.length > 0 ? (queryParts as FilterQuery) : undefined
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
+
private mustNotFilters(): Record<string, unknown>[] {
|
|
301
|
+
return [
|
|
302
|
+
{
|
|
303
|
+
...this.queryFilterOnValues('resourceType', [
|
|
304
|
+
'service',
|
|
305
|
+
'map',
|
|
306
|
+
'map/static',
|
|
307
|
+
'mapDigital',
|
|
308
|
+
]),
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
query_string: {
|
|
312
|
+
query:
|
|
313
|
+
'resourceType:featureCatalog AND !resourceType:dataset AND !cl_level.key:dataset',
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
|
|
300
319
|
private buildPayloadQuery(
|
|
301
320
|
{ any, ...fieldSearchFilters }: SearchFilters,
|
|
302
321
|
configFilters: SearchFilters,
|
|
@@ -304,14 +323,7 @@ export class ElasticsearchService {
|
|
|
304
323
|
geometry?: Geometry
|
|
305
324
|
) {
|
|
306
325
|
const must = [] as Record<string, unknown>[]
|
|
307
|
-
const must_not =
|
|
308
|
-
...this.queryFilterOnValues('resourceType', [
|
|
309
|
-
'service',
|
|
310
|
-
'map',
|
|
311
|
-
'map/static',
|
|
312
|
-
'mapDigital',
|
|
313
|
-
]),
|
|
314
|
-
}
|
|
326
|
+
const must_not = this.mustNotFilters()
|
|
315
327
|
const should = [] as Record<string, unknown>[]
|
|
316
328
|
const filter = [this.queryFilterOnValues('isTemplate', 'n')] as Record<
|
|
317
329
|
string,
|
|
@@ -413,14 +425,8 @@ export class ElasticsearchService {
|
|
|
413
425
|
},
|
|
414
426
|
},
|
|
415
427
|
],
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
'service',
|
|
419
|
-
'map',
|
|
420
|
-
'map/static',
|
|
421
|
-
'mapDigital',
|
|
422
|
-
]),
|
|
423
|
-
},
|
|
428
|
+
|
|
429
|
+
must_not: this.mustNotFilters(),
|
|
424
430
|
},
|
|
425
431
|
},
|
|
426
432
|
_source: ['resourceTitleObject', 'uuid'],
|
|
@@ -12,7 +12,10 @@ import {
|
|
|
12
12
|
Iso19139Converter,
|
|
13
13
|
} from '../../../../../../libs/api/metadata-converter/src'
|
|
14
14
|
import { PublicationVersionError } from '../../../../../../libs/common/domain/src/lib/model/error'
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
CatalogRecord,
|
|
17
|
+
DatasetFeatureCatalog,
|
|
18
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
16
19
|
import {
|
|
17
20
|
Aggregations,
|
|
18
21
|
AggregationsParams,
|
|
@@ -27,6 +30,7 @@ import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain
|
|
|
27
30
|
import {
|
|
28
31
|
RecordsApiService,
|
|
29
32
|
SearchApiService,
|
|
33
|
+
FeatureResponseApiModel,
|
|
30
34
|
} from '../../../../../../libs/data-access/gn4/src'
|
|
31
35
|
import {
|
|
32
36
|
combineLatest,
|
|
@@ -124,7 +128,7 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
124
128
|
return this.gn4SearchApi
|
|
125
129
|
.search(
|
|
126
130
|
'bucket',
|
|
127
|
-
|
|
131
|
+
['fcats'],
|
|
128
132
|
JSON.stringify(
|
|
129
133
|
this.gn4SearchHelper.getMetadataByIdPayload(uniqueIdentifier)
|
|
130
134
|
)
|
|
@@ -137,6 +141,41 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
137
141
|
)
|
|
138
142
|
}
|
|
139
143
|
|
|
144
|
+
getFeatureCatalog(
|
|
145
|
+
record: CatalogRecord,
|
|
146
|
+
visited: Set<string> = new Set() // prevent looping
|
|
147
|
+
): Observable<DatasetFeatureCatalog | null> {
|
|
148
|
+
if (
|
|
149
|
+
record.extras &&
|
|
150
|
+
record.extras['featureTypes'] &&
|
|
151
|
+
record.extras['featureTypes'][0]?.attributeTable &&
|
|
152
|
+
Array.isArray(record.extras['featureTypes'][0].attributeTable)
|
|
153
|
+
) {
|
|
154
|
+
return of({
|
|
155
|
+
attributes: record.extras['featureTypes'][0]?.attributeTable?.map(
|
|
156
|
+
(attr) => ({
|
|
157
|
+
name: attr.name,
|
|
158
|
+
title: attr.definition,
|
|
159
|
+
})
|
|
160
|
+
),
|
|
161
|
+
} as DatasetFeatureCatalog)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const featureCatalogIdentifier = record.extras[
|
|
165
|
+
'featureCatalogIdentifier'
|
|
166
|
+
] as string
|
|
167
|
+
if (featureCatalogIdentifier && !visited.has(featureCatalogIdentifier)) {
|
|
168
|
+
visited.add(featureCatalogIdentifier)
|
|
169
|
+
return this.getRecord(featureCatalogIdentifier).pipe(
|
|
170
|
+
switchMap((record) =>
|
|
171
|
+
record ? this.getFeatureCatalog(record, visited) : of(null)
|
|
172
|
+
)
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return of(null)
|
|
177
|
+
}
|
|
178
|
+
|
|
140
179
|
getSimilarRecords(similarTo: CatalogRecord): Observable<CatalogRecord[]> {
|
|
141
180
|
return this.gn4SearchApi
|
|
142
181
|
.search(
|
|
@@ -226,7 +226,9 @@ export interface DatasetRecord extends BaseRecord {
|
|
|
226
226
|
temporalExtents: Array<DatasetTemporalExtent>
|
|
227
227
|
spatialRepresentation?: SpatialRepresentationType
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
export type DatasetFeatureCatalog = {
|
|
230
|
+
attributes: Array<{ name: string; title: string }>
|
|
231
|
+
}
|
|
230
232
|
export interface ServiceEndpoint {
|
|
231
233
|
endpointUrl: URL
|
|
232
234
|
protocol: string
|
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
SearchParams,
|
|
7
7
|
SearchResults,
|
|
8
8
|
} from '../model/search'
|
|
9
|
-
import { CatalogRecord } from '../model/record'
|
|
9
|
+
import { CatalogRecord, DatasetFeatureCatalog } from '../model/record'
|
|
10
10
|
|
|
11
11
|
export abstract class RecordsRepositoryInterface {
|
|
12
12
|
abstract search(params: SearchParams): Observable<SearchResults>
|
|
13
13
|
abstract getMatchesCount(filters: FieldFilters): Observable<number>
|
|
14
14
|
abstract getRecord(uniqueIdentifier: string): Observable<CatalogRecord | null>
|
|
15
|
+
abstract getFeatureCatalog(
|
|
16
|
+
record: CatalogRecord
|
|
17
|
+
): Observable<DatasetFeatureCatalog | null>
|
|
15
18
|
abstract aggregate(params: AggregationsParams): Observable<Aggregations>
|
|
16
19
|
abstract getSimilarRecords(
|
|
17
20
|
similarTo: CatalogRecord
|
|
@@ -160,6 +160,38 @@ As such, **it is not very interesting at all.**`,
|
|
|
160
160
|
extras: {
|
|
161
161
|
isPublishedToAll: true,
|
|
162
162
|
edit: true,
|
|
163
|
+
featureTypes: [
|
|
164
|
+
{
|
|
165
|
+
attributeTable: [
|
|
166
|
+
{
|
|
167
|
+
code: 'OBJECTID',
|
|
168
|
+
name: 'OBJECTID',
|
|
169
|
+
link: '',
|
|
170
|
+
definition: 'Object identifier',
|
|
171
|
+
type: 'OID',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
code: 'NOM',
|
|
175
|
+
name: 'Nom',
|
|
176
|
+
link: '',
|
|
177
|
+
definition: 'Nom de la rue',
|
|
178
|
+
type: 'String (48)',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
code: 'RUE',
|
|
182
|
+
name: 'Rue',
|
|
183
|
+
link: '',
|
|
184
|
+
definition: '',
|
|
185
|
+
type: 'String (50)',
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
code: '',
|
|
189
|
+
aliases: '',
|
|
190
|
+
typeName: "Catalogue d'attributs",
|
|
191
|
+
definition: '',
|
|
192
|
+
isAbstract: 'false',
|
|
193
|
+
},
|
|
194
|
+
],
|
|
163
195
|
},
|
|
164
196
|
},
|
|
165
197
|
{
|
|
@@ -312,6 +344,49 @@ export const simpleDatasetRecordFixture = (): DatasetRecord => ({
|
|
|
312
344
|
translations: {},
|
|
313
345
|
})
|
|
314
346
|
|
|
347
|
+
export const simpleDatasetRecordWithFcatsFixture = (): DatasetRecord => ({
|
|
348
|
+
uniqueIdentifier: 'my-dataset-with-fcats',
|
|
349
|
+
extras: {
|
|
350
|
+
featureCatalogIdentifier: 'feature-catalog-identifier',
|
|
351
|
+
},
|
|
352
|
+
kind: 'dataset',
|
|
353
|
+
otherLanguages: [],
|
|
354
|
+
defaultLanguage: 'en',
|
|
355
|
+
recordUpdated: new Date('2022-02-01T14:12:00.000Z'),
|
|
356
|
+
resourceCreated: new Date('2022-09-01T12:18:19.000Z'),
|
|
357
|
+
resourceUpdated: new Date('2022-12-04T14:12:00.000Z'),
|
|
358
|
+
status: 'ongoing',
|
|
359
|
+
title: 'A very interesting dataset with a related feature catalog',
|
|
360
|
+
abstract: `This dataset has been established for testing purposes.`,
|
|
361
|
+
ownerOrganization: { name: 'MyOrganization', translations: {} },
|
|
362
|
+
contacts: [
|
|
363
|
+
{
|
|
364
|
+
email: 'bob@org.net',
|
|
365
|
+
position: 'developer',
|
|
366
|
+
organization: { name: 'MyOrganization', translations: {} },
|
|
367
|
+
role: 'point_of_contact',
|
|
368
|
+
firstName: 'Bob',
|
|
369
|
+
lastName: 'TheGreat',
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
contactsForResource: [],
|
|
373
|
+
keywords: [],
|
|
374
|
+
topics: ['testData'],
|
|
375
|
+
licenses: [],
|
|
376
|
+
legalConstraints: [],
|
|
377
|
+
securityConstraints: [],
|
|
378
|
+
otherConstraints: [],
|
|
379
|
+
lineage:
|
|
380
|
+
'This record was edited manually to test the feature catalog parsing',
|
|
381
|
+
spatialRepresentation: 'grid',
|
|
382
|
+
overviews: [],
|
|
383
|
+
spatialExtents: [],
|
|
384
|
+
temporalExtents: [],
|
|
385
|
+
onlineResources: [],
|
|
386
|
+
updateFrequency: { per: 'month', updatedTimes: 3 },
|
|
387
|
+
translations: {},
|
|
388
|
+
})
|
|
389
|
+
|
|
315
390
|
export const simpleDatasetRecordAsXmlFixture =
|
|
316
391
|
(): string => `<?xml version="1.0" encoding="UTF-8"?>
|
|
317
392
|
<mdb:MD_Metadata xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/2.0" xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0" xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0" xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0" xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0" xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0" xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mmi="http://standards.iso.org/iso/19115/-3/mmi/1.0" xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0" xmlns:mrl="http://standards.iso.org/iso/19115/-3/mrl/2.0">
|
|
@@ -2,7 +2,9 @@ import {
|
|
|
2
2
|
ChangeDetectionStrategy,
|
|
3
3
|
ChangeDetectorRef,
|
|
4
4
|
Component,
|
|
5
|
+
Inject,
|
|
5
6
|
Input,
|
|
7
|
+
Optional,
|
|
6
8
|
Output,
|
|
7
9
|
} from '@angular/core'
|
|
8
10
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
@@ -65,6 +67,7 @@ marker('chart.aggregation.count')
|
|
|
65
67
|
standalone: true,
|
|
66
68
|
})
|
|
67
69
|
export class ChartViewComponent {
|
|
70
|
+
@Input() cacheActive = true
|
|
68
71
|
@Input() set link(value: DatasetOnlineResource) {
|
|
69
72
|
this.currentLink$.next(value)
|
|
70
73
|
}
|
|
@@ -134,7 +137,7 @@ export class ChartViewComponent {
|
|
|
134
137
|
switchMap((link) => {
|
|
135
138
|
this.error = null
|
|
136
139
|
this.loading = true
|
|
137
|
-
return this.dataService.getDataset(link).pipe(
|
|
140
|
+
return this.dataService.getDataset(link, this.cacheActive).pipe(
|
|
138
141
|
catchError((error) => {
|
|
139
142
|
this.handleError(error)
|
|
140
143
|
return EMPTY
|
|
@@ -164,18 +164,26 @@ export class DataService {
|
|
|
164
164
|
wfsLink.url.toString(),
|
|
165
165
|
wfsLink.name
|
|
166
166
|
).pipe(
|
|
167
|
-
map((urls) =>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
167
|
+
map((urls) => {
|
|
168
|
+
if (urls.geojson) {
|
|
169
|
+
urls.all['application/json'] = urls.geojson
|
|
170
|
+
}
|
|
171
|
+
return urls
|
|
172
|
+
}),
|
|
173
|
+
map((urls) => {
|
|
174
|
+
const resources: DatasetOnlineResource[] = Object.keys(urls.all).map(
|
|
175
|
+
(format) => ({
|
|
176
|
+
...wfsLink,
|
|
177
|
+
name: wfsLink.name,
|
|
178
|
+
type: 'download' as const,
|
|
179
|
+
url: new URL(urls.all[format]),
|
|
180
|
+
mimeType: getMimeTypeForFormat(
|
|
181
|
+
getFileFormatFromServiceOutput(format)
|
|
182
|
+
),
|
|
183
|
+
})
|
|
184
|
+
)
|
|
185
|
+
return resources
|
|
186
|
+
})
|
|
179
187
|
)
|
|
180
188
|
}
|
|
181
189
|
|
|
@@ -234,8 +242,11 @@ export class DataService {
|
|
|
234
242
|
}))
|
|
235
243
|
}
|
|
236
244
|
|
|
237
|
-
readAsGeoJson(
|
|
238
|
-
|
|
245
|
+
readAsGeoJson(
|
|
246
|
+
link: DatasetOnlineResource,
|
|
247
|
+
cacheActive: boolean
|
|
248
|
+
): Observable<FeatureCollection> {
|
|
249
|
+
return this.getDataset(link, cacheActive).pipe(
|
|
239
250
|
switchMap((dataset) => dataset.selectAll().read()),
|
|
240
251
|
map((features) => ({
|
|
241
252
|
type: 'FeatureCollection',
|
|
@@ -244,13 +255,21 @@ export class DataService {
|
|
|
244
255
|
)
|
|
245
256
|
}
|
|
246
257
|
|
|
247
|
-
getDataset(
|
|
258
|
+
getDataset(
|
|
259
|
+
link: DatasetOnlineResource,
|
|
260
|
+
cacheActive: boolean
|
|
261
|
+
): Observable<BaseReader> {
|
|
248
262
|
if (link.type === 'service' && link.accessServiceProtocol === 'wfs') {
|
|
249
263
|
const wfsUrlEndpoint = this.proxy.getProxiedUrl(link.url.toString())
|
|
250
264
|
return from(
|
|
251
|
-
openDataset(
|
|
252
|
-
|
|
253
|
-
|
|
265
|
+
openDataset(
|
|
266
|
+
wfsUrlEndpoint,
|
|
267
|
+
'wfs',
|
|
268
|
+
{
|
|
269
|
+
wfsFeatureType: link.name,
|
|
270
|
+
},
|
|
271
|
+
cacheActive
|
|
272
|
+
)
|
|
254
273
|
)
|
|
255
274
|
} else if (link.type === 'download') {
|
|
256
275
|
const linkProxifiedUrl = this.proxy.getProxiedUrl(link.url.toString())
|
|
@@ -259,7 +278,9 @@ export class DataService {
|
|
|
259
278
|
SupportedTypes.indexOf(format as any) > -1
|
|
260
279
|
? (format as SupportedType)
|
|
261
280
|
: undefined
|
|
262
|
-
return from(
|
|
281
|
+
return from(
|
|
282
|
+
openDataset(linkProxifiedUrl, supportedType, undefined, cacheActive)
|
|
283
|
+
).pipe()
|
|
263
284
|
} else if (
|
|
264
285
|
link.type === 'service' &&
|
|
265
286
|
link.accessServiceProtocol === 'esriRest'
|
|
@@ -268,7 +289,7 @@ export class DataService {
|
|
|
268
289
|
link.url.toString(),
|
|
269
290
|
'geojson'
|
|
270
291
|
)
|
|
271
|
-
return from(openDataset(url, 'geojson')).pipe()
|
|
292
|
+
return from(openDataset(url, 'geojson', undefined, cacheActive)).pipe()
|
|
272
293
|
} else if (
|
|
273
294
|
link.type === 'service' &&
|
|
274
295
|
link.accessServiceProtocol === 'ogcFeatures'
|
|
@@ -276,7 +297,7 @@ export class DataService {
|
|
|
276
297
|
return from(this.getDownloadUrlsFromOgcApi(link.url.href)).pipe(
|
|
277
298
|
switchMap((collectionInfo) => {
|
|
278
299
|
const geojsonUrl = collectionInfo.jsonDownloadLink
|
|
279
|
-
return openDataset(geojsonUrl, 'geojson')
|
|
300
|
+
return openDataset(geojsonUrl, 'geojson', undefined, cacheActive)
|
|
280
301
|
}),
|
|
281
302
|
tap((url) => {
|
|
282
303
|
if (url === null) {
|
|
@@ -33,6 +33,7 @@ import { CommonModule } from '@angular/common'
|
|
|
33
33
|
standalone: true,
|
|
34
34
|
})
|
|
35
35
|
export class TableViewComponent {
|
|
36
|
+
@Input() cacheActive = true
|
|
36
37
|
@Input() set link(value: DatasetOnlineResource) {
|
|
37
38
|
this.currentLink$.next(value)
|
|
38
39
|
}
|
|
@@ -66,7 +67,7 @@ export class TableViewComponent {
|
|
|
66
67
|
) {}
|
|
67
68
|
|
|
68
69
|
getDatasetReader(link: DatasetOnlineResource): Observable<BaseReader> {
|
|
69
|
-
return this.dataService.getDataset(link)
|
|
70
|
+
return this.dataService.getDataset(link, this.cacheActive)
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
onTableSelect(event) {
|
|
@@ -28,7 +28,7 @@ import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/la
|
|
|
28
28
|
export class FormFieldRichComponent {
|
|
29
29
|
@Input() label: string
|
|
30
30
|
@Input() hint: string
|
|
31
|
-
@Input() placeholder = '
|
|
31
|
+
@Input() placeholder = ''
|
|
32
32
|
@Input() value: string
|
|
33
33
|
|
|
34
34
|
@Output() valueChange: EventEmitter<string> = new EventEmitter()
|