-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2143 from eliasbruvik/FIX-2142-toWitsml
FIX-2142 ToWitsml method on API ObjectOnWellbore models
- Loading branch information
Showing
45 changed files
with
742 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Witsml.Data.Measures | ||
{ | ||
public class WitsmlLinearAccelerationMeasure : Measure | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Witsml.Data.Measures | ||
{ | ||
public class WitsmlMagneticFluxDensityMeasure : Measure | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Witsml.Data; | ||
|
||
namespace WitsmlExplorer.Api.Models | ||
{ | ||
public class BaseObjectOnWellbore : ObjectOnWellbore | ||
{ | ||
public override IWitsmlQueryType ToWitsml() | ||
{ | ||
throw new System.NotImplementedException("BaseObjectOnWellbore is not supposed to be converted to a WITSML model"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
using Witsml.Data; | ||
|
||
using WitsmlExplorer.Api.Services; | ||
|
||
namespace WitsmlExplorer.Api.Models | ||
{ | ||
public class CommonTime | ||
{ | ||
public string DTimCreation { get; init; } | ||
public string DTimLastChange { get; init; } | ||
} | ||
|
||
public static class CommonTimeExtensions | ||
{ | ||
public static WitsmlCommonTime ToWitsml(this CommonTime commonTime) | ||
{ | ||
return new WitsmlCommonTime | ||
{ | ||
DTimCreation = StringHelpers.ToUniversalDateTimeString(commonTime.DTimCreation), | ||
DTimLastChange = StringHelpers.ToUniversalDateTimeString(commonTime.DTimLastChange) | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,54 @@ | ||
using Witsml.Data; | ||
using Witsml.Data.Measures; | ||
|
||
using WitsmlExplorer.Api.Models.Measure; | ||
|
||
namespace WitsmlExplorer.Api.Models | ||
{ | ||
public class FormationMarker : ObjectOnWellbore | ||
{ | ||
public MeasureWithDatum MdPrognosed { get; init; } | ||
|
||
public MeasureWithDatum TvdPrognosed { get; init; } | ||
|
||
public MeasureWithDatum MdTopSample { get; init; } | ||
|
||
public MeasureWithDatum TvdTopSample { get; init; } | ||
|
||
public LengthMeasure ThicknessBed { get; init; } | ||
|
||
public LengthMeasure ThicknessApparent { get; init; } | ||
|
||
public LengthMeasure ThicknessPerpen { get; init; } | ||
|
||
public MeasureWithDatum MdLogSample { get; init; } | ||
|
||
public MeasureWithDatum TvdLogSample { get; init; } | ||
|
||
public LengthMeasure Dip { get; init; } | ||
|
||
public LengthMeasure DipDirection { get; init; } | ||
|
||
public StratigraphicStruct Lithostratigraphic { get; init; } | ||
|
||
public StratigraphicStruct Chronostratigraphic { get; init; } | ||
|
||
public string Description { get; init; } | ||
|
||
public CommonData CommonData { get; init; } | ||
|
||
public override WitsmlFormationMarkers ToWitsml() | ||
{ | ||
return new WitsmlFormationMarker | ||
{ | ||
UidWell = WellUid, | ||
NameWell = WellName, | ||
UidWellbore = WellboreUid, | ||
NameWellbore = WellboreName, | ||
Uid = Uid, | ||
Name = Name, | ||
MdPrognosed = MdPrognosed?.ToWitsml<WitsmlMeasuredDepthCoord>(), | ||
TvdPrognosed = TvdPrognosed?.ToWitsml<WitsmlWellVerticalDepthCoord>(), | ||
MdTopSample = MdTopSample?.ToWitsml<WitsmlMeasuredDepthCoord>(), | ||
TvdTopSample = TvdTopSample?.ToWitsml<WitsmlWellVerticalDepthCoord>(), | ||
ThicknessBed = ThicknessBed?.ToWitsml<WitsmlLengthMeasure>(), | ||
ThicknessApparent = ThicknessApparent?.ToWitsml<WitsmlLengthMeasure>(), | ||
ThicknessPerpen = ThicknessPerpen?.ToWitsml<WitsmlLengthMeasure>(), | ||
MdLogSample = MdLogSample?.ToWitsml<WitsmlMeasuredDepthCoord>(), | ||
TvdLogSample = TvdLogSample?.ToWitsml<WitsmlWellVerticalDepthCoord>(), | ||
Dip = Dip?.ToWitsml<WitsmlPlaneAngleMeasure>(), | ||
DipDirection = DipDirection?.ToWitsml<WitsmlPlaneAngleMeasure>(), | ||
Lithostratigraphic = Lithostratigraphic?.ToWitsmlLithostratigraphyStruct(), | ||
Chronostratigraphic = Chronostratigraphic?.ToWitsmlChronostratigraphyStruct(), | ||
Description = Description, | ||
CommonData = CommonData?.ToWitsml() | ||
}.AsSingletonWitsmlList(); | ||
} | ||
} | ||
} |
Oops, something went wrong.