Пример #1
0
        private XDocument GetTemplateAndSetIds(string objectType, EtpUri uri, OptionsIn.ReturnElements templateType)
        {
            var queryIn = QueryTemplates.GetTemplate(objectType, DataSchemaVersion, templateType);

            SetFilterCriteria(objectType, queryIn, uri);

            return(queryIn);
        }
Пример #2
0
        /// <summary>
        /// Gets the wellbores.
        /// </summary>
        /// <param name="parentUri">The parent URI.</param>
        /// <returns>The wellbores. </returns>
        public override IEnumerable <IWellObject> GetWellbores(EtpUri parentUri)
        {
            var queryIn = QueryTemplates.GetTemplate(ObjectTypes.Wellbore, DataSchemaVersion, OptionsIn.ReturnElements.IdOnly);

            _template.Set(queryIn, "//@uidWell", parentUri.ObjectId);
            _template.Add(queryIn, "//wellbore", "isActive");

            return(GetObjects <IWellObject>(ObjectTypes.Wellbore, queryIn.ToString(), OptionsIn.ReturnElements.Requested));
        }
Пример #3
0
        public void QueryTemplatesTests_Create_Header_Only_Template_For_Log_141()
        {
            var template = QueryTemplates.GetTemplate(ObjectTypes.Log, OptionsIn.DataVersion.Version141.Value, OptionsIn.ReturnElements.HeaderOnly);

            var xml = template.ToString();

            Console.WriteLine(xml);

            Assert.IsFalse(xml.Contains("logData"));
        }
Пример #4
0
        /// <summary>
        /// Gets all wells.
        /// </summary>
        /// <returns>The wells.</returns>
        public override IEnumerable <IDataObject> GetAllWells()
        {
            var queryIn = QueryTemplates.GetTemplate(ObjectTypes.Well, DataSchemaVersion, OptionsIn.ReturnElements.IdOnly);

            _template.Add(queryIn, "//well", "timeZone", "wellDatum", "wellLocation");
            _template.Add(queryIn, "//well/wellDatum", "name");

            AddCommonDataElements(queryIn, "//well");

            return(GetObjects <IDataObject>(ObjectTypes.Well, queryIn.ToString(), optionsIn: OptionsIn.ReturnElements.Requested));
        }
Пример #5
0
        public void QueryTemplatesTests_Create_CementJob_Has_Uom_131()
        {
            var template = QueryTemplates.GetTemplate(ObjectTypes.CementJob, OptionsIn.DataVersion.Version131.Value, OptionsIn.ReturnElements.All);
            var node     = template.Descendants(Xml131Namespace + "cementAdditive").FirstOrDefault();

            var elementList = new List <string>()
            {
                "concentration",
                "wtSack",
                "volSack"
            };

            AssertElementHasAttribute(node, Xml131Namespace, elementList);
        }
Пример #6
0
        public void QueryTemplatesTests_Create_Trajectory_Has_Uom_131()
        {
            var template = QueryTemplates.GetTemplate(ObjectTypes.Trajectory, OptionsIn.DataVersion.Version131.Value, OptionsIn.ReturnElements.All);
            var node     = template.Descendants(Xml131Namespace + "location").FirstOrDefault();

            var elementList = new List <string>()
            {
                "latitude",
                "longitude",
                "easting",
                "northing",
                "southing",
                "projectedX",
                "projectedY",
                "localX",
                "localY"
            };

            AssertElementHasAttribute(node, Xml131Namespace, elementList);
        }
Пример #7
0
        /// <summary>
        /// Gets all wells.
        /// </summary>
        /// <returns> The wells.</returns>
        public override IEnumerable <IDataObject> GetAllWells()
        {
            var queryIn = QueryTemplates.GetTemplate(ObjectTypes.Well, DataSchemaVersion, OptionsIn.ReturnElements.IdOnly);

            return(GetObjects <IDataObject>(ObjectTypes.Well, queryIn.ToString(), OptionsIn.ReturnElements.Requested));
        }