Skip to content

Add classes for OSDU metadata handling

Erik Dahl requested to merge slb-master-EDahl2-MetadatafileUtilities into slb-master

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [Yes]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

Add classes to standardize handling of OSDU metadata files. Each class will typically have 5 files associated with it, .<h/cpp> will hold the json related logic Struct.<h/cpp> to hold the metadata structure Literals.h will hold the string literals used for json property names and possibly static values, such as "reference-data--HeaderKeyName"

Example class and its files: Mapped class is the OSDU Acl object. Json handline will be performed in files OsduAcl.h and OsduAcl.cpp The actual data structure of the class is described in OsduAclStruct.h (and OsduAclStruct.cpp if required) The string literals will be provided in file OsduAclLiterals.h

All these classes will be using the OsduMetadataBase.h/cpp base class. All direct operations on the json root object should be abstracted away by the base class method library.

Note care must be taken when modelling json properties that hold an array of json object, such as the AbstractFileCollection class. JsonCpp is happy to let a json root object be an array object rather than a traditional json root object, and method calls such as getMemberNames() and isMember might fail if e.g. the contents of the "FileSourceInfos" property is passed as input json object to a new class. (See clOsduAbstractFileCollection.h/cpp how to handle such situations.

The struct files (Struct.<h/cpp>) are using OsduMetdataStructBase as base class, mainly to enforce the same pattern to be used across all the classes to make it easier to review and trouble shoot later.

This MR contains ONLY files in the following folders: .\src\OsduMetaDataUtilities
.\src\tests\OsduMetadataTests
and update to files in .\src\segysdk_public\ to get the projects inclulded in the segysdk.dll build.

The other files are from a rebase with osdu master ...

Edited by Erik Dahl

Merge request reports