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 Dimitar Misev)

Currently it preserves only the metadata explicitly specified by the user. This should be changed to the following:

  1. 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)
  2. 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"
    }
    
  3. in case metadata: global does not exist, the "auto" behavior is assumed.

Change History (9)

comment:1 by Bang Pham Huu, 8 years ago

Component: petascopewcst_import

It should be added new if the metadata field does not exist and overwrite if exists.

comment:2 by Vlad Merticariu, 8 years ago

Consider 4 use-cases:

  1. user wants to keep all metadata unchanged
  2. user wants to keep all metadata, and add some
  3. user wants to keep only some of the metadata from the file
  4. 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 Dimitar Misev, 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 Vlad Merticariu, 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 Dimitar Misev, 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 Vlad Merticariu, 8 years ago

Case 2:

"metadata": {

"type": "xml",
"global": "auto"

}

or

"metadata": {

"type": "json",
"global": "auto"

}

Last edited 8 years ago by Vlad Merticariu (previous) (diff)

comment:7 by Dimitar Misev, 8 years ago

Description: modified (diff)

comment:8 by Vlad Merticariu, 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 Dimitar Misev, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.