/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(RigUtilization dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(ActivityTemplate dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(Message dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(WellboreCompletion dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(FluidsReport dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(WellLog dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(Trajectory dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(DownholeComponent dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Gets a list of the element names to ignore during a query. /// </summary> /// <param name="parser">The WITSML parser.</param> /// <returns>A list of element names.</returns> protected override List <string> GetIgnoredElementNamesForQuery(WitsmlQueryParser parser) { return(new List <string> { "Data" }); }
/// <summary> /// Initializes a new instance of the <see cref="MongoDbUpdate{T}" /> class. /// </summary> /// <param name="container">The composition container.</param> /// <param name="collection">The collection.</param> /// <param name="parser">The parser.</param> /// <param name="idPropertyName">Name of the identifier property.</param> /// <param name="ignored">The ignored.</param> public MongoDbUpdate(IContainer container, IMongoCollection <T> collection, WitsmlQueryParser parser, string idPropertyName = "Uid", List <string> ignored = null) : base(container, collection, parser, idPropertyName, ignored) { Logger.Debug("Instance created."); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(DownholeComponent dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(FormationMarker dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(FormationMarker dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(RigUtilization dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Partials the delete entity. /// </summary> /// <param name="parser">The parser.</param> /// <param name="uri">The URI.</param> protected void PartialDeleteEntity(WitsmlQueryParser parser, EtpUri uri) { PartialDeleteEntity <T>(DbCollectionName, parser, uri); }
/// <summary> /// Gets a list of the element names to ignore during an update. /// </summary> /// <param name="parser">The WITSML parser.</param> /// <returns>A list of element names.</returns> protected override List <string> GetIgnoredElementNamesForUpdate(WitsmlQueryParser parser) { return(GetIgnoredElementNamesForQuery(parser)); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(CementJob dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(Channel dataObject, WitsmlQueryParser parser);
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(WellboreGeometry dataObject, WitsmlQueryParser parser);
/// <summary> /// Formats the mudlog geology interval data. /// </summary> /// <param name="entity">The entity.</param> /// <param name="parser">The query parser.</param> /// <returns>A collection of formatted mudlog geology intervals.</returns> protected override List <GeologyInterval> FormatGeologyIntervalData(MudLog entity, WitsmlQueryParser parser) { entity.GeologyInterval = base.FormatGeologyIntervalData(entity, parser); return(entity.GeologyInterval); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(WellboreCompletion dataObject, WitsmlQueryParser parser);
/// <summary> /// Filters the geology interval data based on query parameters. /// </summary> /// <param name="entity">The entity.</param> /// <param name="geologyIntervals">The mudlog geology intervals.</param> /// <param name="parser">The parser.</param> /// <param name="context">The query context.</param> /// <returns>The count of mudlog geology intervals after filtering.</returns> protected override int FilterGeologyIntervalData(MudLog entity, List <GeologyInterval> geologyIntervals, WitsmlQueryParser parser = null, IQueryContext context = null) { if (geologyIntervals == null || geologyIntervals.Count == 0) { return(0); } var range = GetQueryIndexRange(parser); var maxDataNodes = context?.MaxDataNodes; switch (parser?.IntervalRangeInclusion()) { default: entity.GeologyInterval = range.Start.HasValue ? range.End.HasValue ? geologyIntervals.Where(s => s.MDTop.Value >= range.Start.Value && s.MDTop.Value <= range.End.Value).ToList() : geologyIntervals.Where(s => s.MDTop.Value >= range.Start.Value).ToList() : range.End.HasValue ? geologyIntervals.Where(s => s.MDTop.Value <= range.End.Value).ToList() : geologyIntervals; break; case "whole-interval": entity.GeologyInterval = range.Start.HasValue ? range.End.HasValue ? geologyIntervals.Where(s => s.MDTop.Value >= range.Start.Value && s.MDBottom.Value <= range.End.Value).ToList() : geologyIntervals.Where(s => s.MDTop.Value >= range.Start.Value).ToList() : range.End.HasValue ? geologyIntervals.Where(s => s.MDBottom.Value <= range.End.Value).ToList() : geologyIntervals; break; case "any-part": entity.GeologyInterval = range.Start.HasValue ? range.End.HasValue ? geologyIntervals.Where(s => s.MDBottom.Value >= range.Start.Value && s.MDTop.Value <= range.End.Value).ToList() : geologyIntervals.Where(s => s.MDBottom.Value >= range.Start.Value).ToList() : range.End.HasValue ? geologyIntervals.Where(s => s.MDBottom.Value <= range.End.Value).ToList() : geologyIntervals; break; } SortGeologyIntervalData(entity.GeologyInterval); if (maxDataNodes != null && entity.GeologyInterval.Count > maxDataNodes.Value) { Logger.Debug($"Truncating mudlog geology intervals with {entity.GeologyInterval.Count}."); entity.GeologyInterval = entity.GeologyInterval.GetRange(0, maxDataNodes.Value); context.DataTruncated = true; } return(entity.GeologyInterval.Count); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(FluidsReport dataObject, WitsmlQueryParser parser);
/// <summary> /// Retrieves data objects from the data store using the specified parser. /// </summary> /// <param name="parser">The query template parser.</param> /// <param name="context">The response context.</param> /// <returns> /// A collection of data objects retrieved from the data store. /// </returns> public override List <T> Query(WitsmlQueryParser parser, ResponseContext context) { return(QueryEntities(parser)); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(ActivityTemplate dataObject, WitsmlQueryParser parser);
/// <summary> /// Updates an object in the data store. /// </summary> /// <param name="parser">The WITSML query parser.</param> /// <param name="uri">The data object URI.</param> protected void UpdateEntity(WitsmlQueryParser parser, EtpUri uri) { UpdateEntity <T>(DbCollectionName, parser, uri); }
/// <summary> /// Sets additional default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> partial void UpdateAdditionalDefaultValues(SidewallCore dataObject, WitsmlQueryParser parser);
/// <summary> /// Merges the entity. /// </summary> /// <param name="entity">The entity.</param> /// <param name="parser">The WITSML query parser.</param> /// <param name="mergeDelete">Indicate if it is partial delete.</param> protected void MergeEntity(T entity, WitsmlQueryParser parser, bool mergeDelete = false) { MergeEntity(DbCollectionName, entity, parser, mergeDelete); }
/// <summary> /// Sets the default values for the specified data object during update. /// </summary> /// <param name="dataObject">The data object.</param> /// <param name="parser">The input template.</param> protected override void UpdateDefaultValues(Message dataObject, WitsmlQueryParser parser) { UpdateAdditionalDefaultValues(dataObject, parser); }
/// <summary> /// Filters the station data based on query parameters. /// </summary> /// <param name="entity">The entity.</param> /// <param name="stations">The trajectory stations.</param> /// <param name="parser">The parser.</param> /// <param name="context">The query context</param> /// <returns>The count of trajectory stations after filtering.</returns> protected override int FilterStationData(Trajectory entity, List <TrajectoryStation> stations, WitsmlQueryParser parser = null, IQueryContext context = null) { if (stations == null || stations.Count == 0) { return(0); } var range = GetQueryIndexRange(parser); entity.TrajectoryStation = range.Start.HasValue ? range.End.HasValue ? stations.Where(s => s.MD.Value >= range.Start.Value && s.MD.Value <= range.End.Value).ToList() : stations.Where(s => s.MD.Value >= range.Start.Value).ToList() : range.End.HasValue ? stations.Where(s => s.MD.Value <= range.End.Value).ToList() : stations; return(entity.TrajectoryStation.Count); }