Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: new fields implemetation bugs #127

Merged
merged 2 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/models/layerMetadata/bestMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import { DiscreteOrder } from './discreteOrder';

export interface IBestMetadata {
productVersion: string | undefined;
resolution: number | undefined;
maxResolutionDeg: number | undefined;
rms: number | undefined;
scale: string | undefined;
scale: number | undefined;
discretes: DiscreteOrder[] | undefined;
}
export interface IPropSHPMapping extends IDataMapping, ITsTypesMapping {
Expand Down Expand Up @@ -349,13 +349,13 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
//#region COMMON: accuracyCE90
@pycsw({
profile: 'mc_best',
xmlElement: 'mc:horizontalAccuracyCE90',
queryableField: 'mc:horizontalAccuracyCE90',
xmlElement: 'mc:minHorizontalAccuracyCE90',
queryableField: 'mc:minHorizontalAccuracyCE90',
pycswField: 'pycsw:horizontalAccuracyCE90',
})
@catalogDB({
column: {
name: 'horizontal_accuracy_ce_90',
name: 'min_horizontal_accuracy_ce_90',
type: 'real',
},
})
Expand All @@ -374,7 +374,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
isAutoGenerated: true,
})
//#endregion
public accuracyCE90: number | undefined = undefined;
public minHorizontalAccuracyCE90: number | undefined = undefined;

//#region COMMON: sensors
@pycsw({
Expand Down Expand Up @@ -407,7 +407,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
category: FieldCategory.GENERAL,
isManuallyEditable: true,
isAutoGenerated: true,
infoMsgCode: ['info-field-tooltip.sensorType.tooltip'],
infoMsgCode: ['info-field-tooltip.sensors.tooltip'],
})
//#endregion
public sensors: string[] | undefined = undefined;
Expand Down Expand Up @@ -562,17 +562,17 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
//#endregion
public srsName: string | undefined = undefined;

//#region BEST: resolution
//#region BEST: maxResolutionDeg
@pycsw({
profile: 'mc_best',
xmlElement: 'mc:resolution',
queryableField: 'mc:resolution',
xmlElement: 'mc:maxResolutionDeg',
queryableField: 'mc:maxResolutionDeg',
pycswField: 'pycsw:Resolution',
})
@catalogDB({
column: {
name: 'resolution',
type: 'real', // check if 'decimal' type is needed
name: 'max_resolution_deg',
type: 'numeric',
},
})
@inputDataMapping({
Expand All @@ -590,7 +590,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
isAutoGenerated: true,
})
//#endregion
public resolution: number | undefined = undefined;
public maxResolutionDeg: number | undefined = undefined;

//#region BEST: rms
@pycsw({
Expand Down Expand Up @@ -629,7 +629,7 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
@catalogDB({
column: {
name: 'scale',
type: 'text',
type: 'integer',
nullable: true,
},
})
Expand All @@ -638,13 +638,13 @@ export class BestMetadata implements IBestMetadata, IMetadataCommonModel {
valuePath: 'features[0].properties.Scale',
})
@tsTypes({
mappingType: TsTypes.STRING,
mappingType: TsTypes.NUMBER,
})
@graphql({
nullable: true,
})
//#endregion
public scale: string | undefined = undefined;
public scale: number | undefined = undefined;

//#region BEST: footprint
@pycsw({
Expand Down
6 changes: 2 additions & 4 deletions src/models/layerMetadata/layer3DMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export class Layer3DMetadata implements ILayer3DMetadata, IMetadataCommonModel {
@tsTypes({
mappingType: TsTypes.STRING,
})
@graphql({
nullable: true,
})
@graphql()
@fieldConfig({
category: FieldCategory.MAIN,
isAutoGenerated: true,
Expand Down Expand Up @@ -665,7 +663,7 @@ export class Layer3DMetadata implements ILayer3DMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.sensorType.tooltip', 'info-general-tooltip.required'],
infoMsgCode: ['info-field-tooltip.sensors.tooltip', 'info-general-tooltip.required'],
validation: [
{
errorMsgCode: 'validation-general.required',
Expand Down
2 changes: 1 addition & 1 deletion src/models/layerMetadata/layerDEMMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export class LayerDemMetadata implements ILayerMetadata, IMetadataCommonModel {
})
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.sensorType.tooltip'],
infoMsgCode: ['info-field-tooltip.sensors.tooltip'],
})
//#endregion
public sensors: string[] | undefined = undefined;
Expand Down