Opened 8 years ago
Last modified 8 years ago
#1528 closed defect
wcst_import should preserve all metadata from netcdf — at Version 9
Reported by: | Dimitar Misev | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 9.4 |
Component: | wcst_import | Version: | development |
Keywords: | Cc: | Vlad Merticariu | |
Complexity: | Medium |
Description (last modified by )
Currently it preserves only the metadata explicitly specified by the user. This should be changed to the following:
- in case metadata: global, in the ingredient is an object (even empty), the current behavior is kept (the metadata indicated in the ingredient is kept)
- in case metadata: global has value "auto", all fields from the file are kept, specified as:
"metadata": { "type": "xml", "global": "auto" } or "metadata": { "type": "json", "global": "auto" }
- in case metadata: global does not exist, the "auto" behavior is assumed.
Change History (9)
comment:1 by , 8 years ago
Component: | petascope → wcst_import |
---|
comment:2 by , 8 years ago
Consider 4 use-cases:
- user wants to keep all metadata unchanged
- user wants to keep all metadata, and add some
- user wants to keep only some of the metadata from the file
- user wants to keep all metadata, with different keys
All these are currently supported. If we go for automatic preserving, only 1 and 2 are supported.
comment:3 by , 8 years ago
We can support 3 and 4 by allowing to disable auto-preservation of metadata (in which case it would equate to the current behavior)
comment:4 by , 8 years ago
So after discussion we have decided that:
- in case metadata: global, in the ingredient is an object (even empty), the current behavior is kept (the metadata indicated in the ingredient is kept)
- in case metadata: global has value "auto", all fields from the file are kept
- in case metadata: global does not exist, the "auto" behavior happens.
Please correct if there's anything wrong.
comment:5 by , 8 years ago
Can you give a specific example of how the second point would look like in the ingredients? So we have it documented here.
comment:6 by , 8 years ago
Case 2:
"metadata": {
"type": "xml",
"global": "auto"
}
or
"metadata": {
"type": "json",
"global": "auto"
}
comment:7 by , 8 years ago
Description: | modified (diff) |
---|
comment:8 by , 8 years ago
This should produce empty metadata:
"metadata": {
"type": "json",
"global": {}
}
While this should produce "auto" metadata:
"metadata": {
"type": "json"
}
Same in case "metadata" is not specified at all.
comment:9 by , 8 years ago
Description: | modified (diff) |
---|
It should be added new if the metadata field does not exist and overwrite if exists.