Osdu: extract constants to separate namespace.

This commit is contained in:
Kristian Bendiksen
2024-06-14 15:16:05 +02:00
parent a85fd12989
commit 44ca21636a
5 changed files with 117 additions and 16 deletions

View File

@@ -34,6 +34,7 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaSeismicDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaOsduDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.h
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.h
${CMAKE_CURRENT_LIST_DIR}/RiaFileDownloader.h
@@ -75,6 +76,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSeismicDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaOsduDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaFileDownloader.cpp

View File

@@ -0,0 +1,75 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2024- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiaOsduDefines.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::osduFieldKind()
{
return "osdu:wks:master-data--Field:1.0.0";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::osduWellKind()
{
return "osdu:wks:master-data--Well:1.*.*";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::osduWellboreKind()
{
return "osdu:wks:master-data--Wellbore:1.*.*";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::osduWellboreTrajectoryKind()
{
return "osdu:wks:work-product-component--WellboreTrajectory:1.*.*";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::osduWellLogKind()
{
return "osdu:wks:work-product-component--WellLog:1.*.*";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::contentTypeJson()
{
return "application/json";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::contentTypeParquet()
{
return "application/x-parquet";
}

View File

@@ -0,0 +1,32 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2024- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <QString>
namespace RiaDefines
{
QString osduFieldKind();
QString osduWellKind();
QString osduWellboreKind();
QString osduWellboreTrajectoryKind();
QString osduWellLogKind();
QString contentTypeJson();
QString contentTypeParquet();
}; // namespace RiaDefines