예제 #1
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        private void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            time         = XmlUtil.update(element, "dTim", time);
            activityCode = XmlUtil.update(element, "activityCode", activityCode);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData"); //, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        private void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            mdPrognosed  = XmlUtil.update(element, "mdPrognosed", mdPrognosed);
            tvdPrognosed = XmlUtil.update(element, "tvdPrognosed", tvdPrognosed);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
        /**
         * Return complete XML query for this type.
         *
         * @return  XML query. Never null.
         */
        public static String getQuery()
        {
            String query = "<trajectoryStation uid = \"\">" +
                           "    <dTimStn/>" +
                           "    <typeTrajStation/>" +
                           "    <typeSurveyTool/>" +
                           "    <md uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <incl uom=\"rad\"/>" +
                           "    <azi uom=\"rad\"/>" +
                           "    <mtf uom=\"rad\"/>" +
                           "    <gtf uom=\"rad\"/>" +
                           "    <dispNs uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <dispEw uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <vertSect uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <dls/>" +
                           "    <rateTurn/>" +
                           "    <rateBuild/>" +
                           "    <mdDelta uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdDelta uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <modelToolError/>" +
                           "    <gravTotalUncert/>" +
                           "    <dipAngleUncert uom=\"rad\"/>" +
                           "    <magTotalUncert/>" +
                           "    <gravAccelCorUsed/>" +
                           "    <magXAxialCorUsed/>" +
                           "    <sagCorUsed/>" +
                           "    <magDrlstrCorUsed/>" +
                           "    <gravTotalFieldReference/>" +
                           "    <magTotalFieldReference/>" +
                           "    <magDipAngleReference uom=\"rad\"/>" +
                           "    <magModelUsed/>" +
                           "    <magModelValid/>" +
                           "    <geoModelUsed/>" +
                           "    <statusTrajStation/>" +
                           "    <rawData/>" +
                           "    <corUsed/>" +
                           "    <valid/>" +
                           "    <matrixCov/>" +
                           "    <location>" +
                           WitsmlLocation.getQuery() +
                           "    </location>" +
                           "    <sourceStation/>" +
                           WitsmlCommonData.getQuery() +
                           "</trajectoryStation>";

            return(query);
        }
예제 #4
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        private void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            parentTargetId = XmlUtil.update(element, "uidTargetParent", parentTargetId);
            dispNsCenter   = XmlUtil.update(element, "dispNsCenter", dispNsCenter);
            dispEwCenter   = XmlUtil.update(element, "dispEwCenter", dispEwCenter);
            tvd            = XmlUtil.update(element, "tvd", tvd);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
예제 #5
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            time         = XmlUtil.update(element, "dTim", time);
            md           = XmlUtil.update(element, "md", md);
            tvd          = XmlUtil.update(element, "tvd", tvd);
            reportNumber = XmlUtil.update(element, "numReports", reportNumber);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
예제 #6
0
        /**
         * Return complete XML query for this type.
         *
         * @param id        ID of instance to get. May be empty to indicate all.
         *                  Non-null.
         * @param parentId  Parent IDs. Closest first. May be empty if instances
         *                  are accessed from the root. Non-null.
         * @return          XML query. Never null.
         */
        static String getQuery(String id, params String[] parentId)
        {
            //Debug.Assert(id != null : "id cannot be null";
            //Debug.Assert(parentId != null : "parentId cannot be null";

            String uidWellbore = parentId.Length > 0 ? parentId[0] : "";
            String uidWell     = parentId.Length > 1 ? parentId[1] : "";

            String query = "<realtimes version=\"" + WitsmlVersion.VERSION_1_3_1.getVersion() + "\"" +
                           "           xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <realtime uidWell =\"" + uidWell + "\"" +
                           "            uidWellbore =\"" + uidWellbore + "\"" +
                           "            idSub = \"\">" +
                           "    <dTim/>" +
                           "    <md/>" +
                           "    <sequence/>" +
                           "    <activityCode/>" +
                           "    <realtimeHeader>" +
                           "      <nameWell/>" +
                           "      <nameWellbore/>" +
                           "      <serviceCompany/>" +
                           "      <runNumber/>" +
                           "      <creationDate/>" +
                           "      <description/>" +
                           "      <groupDefinition>" +
                           "        <id/>" +
                           "        <multiplexed/>" +
                           "        <channelDefinition>" +
                           "          <mnemonic/>" +
                           "          <dataType/>" +
                           "          <classWitsml/>" +
                           "          <description/>" +
                           "          <mnemAlias/>" +
                           "          <sensorOffset uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "          <dataSource/>" +
                           WitsmlInterval.getQuery() +
                           "        </channelDefinition>" +
                           "      </groupDefinition>" +
                           "    </realtimeHeader>" +
                           WitsmlRealtimeChannel.getQuery() +
                           WitsmlCommonData.getQuery() +
                           "  </realtime>" +
                           "</realtimes>";

            return(query);
        }
예제 #7
0
        /// <summary>
        /// Return query for instances of this type.
        /// </summary>
        /// <param name="id">ID of instance to find. Empty to find all. Non-null.</param>
        /// <param name="parentId">ID(s) of parent. Closest parent first. Must contain at least one element.</param>
        /// <returns>XML query for identifying objects of this type. Never null.</returns>
        static String getQuery(String id, params String[] parentId)
        {
            if (id == null)
            {
                throw new ArgumentException("id cannot be null");
            }
            if (parentId == null)
            {
                throw new ArgumentException("parentId cannot be null");
            }

            String uidWellbore = parentId.Length > 0 ? parentId[0] : "";
            String uidWell     = parentId.Length > 1 ? parentId[1] : "";

            String query = "<trajectorys xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <trajectory uidWell = \"" + uidWell + "\"" +
                           "              uidWellbore =\"" + uidWellbore + "\"" +
                           "              uid = \"" + id + "\">" +
                           "    <name/>" +
                           "    <objectGrowing/>" +
                           "    <parentTrajectory>" +
                           "      <trajectoryReference/>" +
                           "    </parentTrajectory>" +
                           "    <dTimTrajStart/>" +
                           "    <dTimTrajEnd/>" +
                           "    <mdMn uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdMx uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <serviceCompany/>" +
                           "    <magDeclUsed uom=\"rad\"/>" +
                           "    <gridCorUsed uom=\"rad\"/>" +
                           "    <aziVertSect uom=\"rad\"/>" +
                           "    <dispNsVertSectOrig uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <dispEwVertSectOrig uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <definitive/>" +
                           "    <memory/>" +
                           "    <finalTraj/>" +
                           "    <aziRef/>" +
                           WitsmlTrajectoryStation.getQuery() +
                           WitsmlCommonData.getQuery() +
                           "  </trajectory>" +
                           "</trajectorys>";

            return(query);
        }
예제 #8
0
        /// <summary>
        /// Parse the specified DOM element and instantiate the properties of this instance.
        /// </summary>
        /// <param name="element">XML element to parse. Non-null.</param>
        void update(XElement element)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element cannot be null");
            }

            time            = XmlUtil.update(element, "dTim", time);
            mudLogCompany   = XmlUtil.update(element, "mudLogCompany", mudLogCompany);
            mudLogEngineers = XmlUtil.update(element, "mudLogEngineers", mudLogEngineers);
            mdStart         = XmlUtil.update(element, "startMd", mdStart);
            mdEnd           = XmlUtil.update(element, "endMd", mdEnd);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
예제 #9
0
        /**
         * Return complete XML query for this type.
         *
         * @param id        ID of instance to get. May be empty to indicate all.
         *                  Non-null.
         * @param parentId  Parent IDs. Closest first. May be empty if instances
         *                  are accessed from the root. Non-null.
         * @return          XML query. Never null.
         */
        static String getQuery(String id, params String[] parentId)
        {
            //Debug.Assert(id != null : "id cannot be null";
            //Debug.Assert(parentId != null : "parentId cannot be null";

            String uidWellbore = parentId.Length > 0 ? parentId[0] : "";
            String uidWell     = parentId.Length > 1 ? parentId[1] : "";

            String query = "<cementJobs xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <cementJob uidWell = \"" + uidWell + "\"" +
                           "             uidWellbore = \"" + uidWellbore + "\"" +
                           "             uid = \"" + id + "\">" +
                           "    <name/>" +
                           "    <jobType/>" +
                           "    <jobConfig/>" +
                           WitsmlCommonData.getQuery() +
                           "  </cementJob>" +
                           "</cementJobs>";

            return(query);
        }
예제 #10
0
        /// <summary>
        /// Return complete XML query for this type.
        /// </summary>
        /// <param name="id">ID of instance to get. May be empty to indicate all. Non-null</param>
        /// <param name="parentId">Parent IDs. Closest first. May be empty if instances are accessed from the root. Non-null.</param>
        /// <returns>XML query. Never null.</returns>
        static String getQuery(String id, params String[] parentId)
        {
            //Debug.Assert(id != null : "id cannot be null";
            //Debug.Assert(parentId != null : "parentId cannot be null";

            String uidWell = parentId.Length > 0 ? parentId[0] : "";

            String query = "<wellbores xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <wellbore uidWell = \"" + uidWell + "\"" +
                           "            uid = \"" + id + "\">" +
                           "    <name/>" +
                           "    <nameWell/>" +
                           "    <parentWellbore/>" +
                           "    <number/>" +
                           "    <suffixAPI/>" +
                           "    <numGovt/>" +
                           "    <statusWellbore/>" +
                           "    <purposeWellbore/>" +
                           "    <typeWellbore/>" +
                           "    <shape/>" +
                           "    <dTimKickoff/>" +
                           "    <achievedTD/>" +
                           "    <mdCurrent uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdCurrent uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdKickoff uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdKickoff uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdPlanned uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdPlanned uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdSubSeaPlanned uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdSubSeaPlanned uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <dayTarget/>" +
                           WitsmlCommonData.getQuery() +
                           "    <customData/>" +
                           "  </wellbore>" +
                           "</wellbores>";

            return(query);
        }
예제 #11
0
        /**
         * Return complete XML query for this type.
         *
         * @param id        ID of instance to get. May be empty to indicate all.
         *                  Non-null.
         * @param parentId  Parent IDs. Closest first. May be empty if instances
         *                  are accessed from the root. Non-null.
         * @return          XML query. Never null.
         */
        static String getQuery(String id, params String[] parentId)
        {
            //Debug.Assert(id != null : "id cannot be null";
            //Debug.Assert(parentId != null : "parentId cannot be null";

            String uidWellbore = parentId.Length > 0 ? parentId[0] : "";
            String uidWell     = parentId.Length > 1 ? parentId[1] : "";

            String query = "<targets xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <target uidWell =\"" + uidWell + "\"" +
                           "          uidWellbore = \"" + uidWellbore + "\"" +
                           "          uid = \"" + id + "\">" +
                           "     <name/>" +
                           "     <uidTargetParent/>" +
                           "     <dispNsCenter uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <dispEwCenter uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <tvd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <classRig/>" +
                           WitsmlCommonData.getQuery() +
                           "  </target>" +
                           "</targets>";

            return(query);
        }
예제 #12
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            startTime         = XmlUtil.update(element, "dTimStart", startTime);
            endTime           = XmlUtil.update(element, "dTimStop", endTime);
            drillingStartTime = XmlUtil.update(element, "dTimStartDrilling", drillingStartTime);
            drillingEndTime   = XmlUtil.update(element, "dTimStopDrilling", drillingEndTime);
            plannedDls        = XmlUtil.update(element, "planDogleg", plannedDls);
            actualDls         = XmlUtil.update(element, "actDogleg", actualDls);
            maxActualDls      = XmlUtil.update(element, "actDoglegMx", maxActualDls);
            status            = XmlUtil.update(element, "statusBha", status);
            bitRunNumber      = XmlUtil.update(element, "numBitRun", bitRunNumber);
            stringRunNumber   = XmlUtil.update(element, "numStringRun", stringRunNumber);
            reason            = XmlUtil.update(element, "reasonTrip", reason);
            objective         = XmlUtil.update(element, "objectiveBha", objective);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
예제 #13
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            time           = XmlUtil.update(element, "dTim", time);
            md             = XmlUtil.update(element, "md", md);
            sequenceNumber = XmlUtil.update(element, "sequence", sequenceNumber);
            activityCode   = XmlUtil.update(element, "activityCode", activityCode);

            XElement realtimeHeaderElement = element.Element(element.Name.Namespace + "realtimeHeader");//, element.getNamespace());

            if (realtimeHeaderElement != null)
            {
                wellName       = XmlUtil.update(realtimeHeaderElement, "nameWell", wellName);
                wellboreName   = XmlUtil.update(realtimeHeaderElement, "nameWellbore", wellboreName);
                serviceCompany = XmlUtil.update(realtimeHeaderElement, "serviceCompany", serviceCompany);
                runNumber      = XmlUtil.update(realtimeHeaderElement, "runNumber", runNumber);
                creationDate   = XmlUtil.update(realtimeHeaderElement, "creationDate", creationDate);
                description    = XmlUtil.update(realtimeHeaderElement, "description", description);
            }

            var channelElements = element.Elements(element.Name.Namespace + "channel");//, element.getNamespace());

            foreach (Object subElement in channelElements)
            {
                XElement channelElement       = (XElement)subElement;
                WitsmlRealtimeChannel channel = new WitsmlRealtimeChannel(channelElement);

                channels.Add(channel);
            }

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
예제 #14
0
        /// <summary>
        /// Parse the specified DOM element and instantiate the properties of this instance.
        /// </summary>
        /// <param name="element">element  XML element to parse. Non-null.</param>
        void update(XElement element)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element cannot be null");
            }

            // Remove current bulk data
            foreach (witsmllib.WitsmlLogCurve curve in curves)
            {
                ((WitsmlLogCurve)curve).clear();
            }

            // Common data
            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");            //, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }

            // Index
            indexType = XmlUtil.update(element, "indexType", indexType);
            if (indexType != null)
            {
                if (indexType.ToLower().Contains("time"))
                {
                    startIndex = getIndex(XmlUtil.update(element, "startDateTimeIndex", (String)null));
                    endIndex   = getIndex(XmlUtil.update(element, "endDateTimeIndex", (String)null));
                }
                else
                {
                    startIndex = getIndex(XmlUtil.update(element, "startIndex", (String)null));
                    endIndex   = getIndex(XmlUtil.update(element, "endIndex", (String)null));
                }
            }

            indexCurveName   = XmlUtil.update(element, "indexCurve", indexCurveName);
            _isGrowing       = XmlUtil.update(element, "objectGrowing", _isGrowing);
            nRows            = XmlUtil.update(element, "dataRowCount", nRows);
            serviceCompany   = XmlUtil.update(element, "serviceCompany", serviceCompany);
            runNumber        = XmlUtil.update(element, "runNumber", runNumber);
            bhaRunNumber     = XmlUtil.update(element, "bhaRunNumber", bhaRunNumber);
            pass             = XmlUtil.update(element, "pass", pass);
            creationTime     = XmlUtil.update(element, "creationDate", creationTime);
            description      = XmlUtil.update(element, "description", description);
            direction        = XmlUtil.update(element, "direction", direction);
            stepIncrement    = XmlUtil.update(element, "stepIncrement", stepIncrement);
            indexUnit        = XmlUtil.update(element, "indexUnits", indexUnit);
            noValue          = XmlUtil.update(element, "nullValue", noValue);
            unitNamingSystem = XmlUtil.update(element, "uomNamingSystem", unitNamingSystem);
            comment          = XmlUtil.update(element, "otherData", comment);

            // Curve data
            var logCurveInfoElements = element.Elements(element.Name.Namespace + "logCurveInfo");            //, element.getNamespace());

            foreach (Object e in logCurveInfoElements)
            {
                XElement logCurveInfoElement = (XElement)e;

                String curveName = XmlUtil.update(logCurveInfoElement, "mnemonic", (String)null);
                Int32? curveNo   = XmlUtil.update(logCurveInfoElement, "columnIndex", (Int32?)null);

                WitsmlLogCurve curve = (WitsmlLogCurve)findCurve(curveName);
                if (curve == null)
                {
                    curve = new WitsmlLogCurve(this, curveName, curveNo.Value);
                    curves.Add(curve);
                }

                curve.update(logCurveInfoElement);
            }

            // Bulk data
            XElement logDataElement = element.Element(element.Name.Namespace + "logData");            //, element.getNamespace());

            if (logDataElement != null)
            {
                var dataElements = logDataElement.Elements(element.Name.Namespace + "data");                //, element.getNamespace());

                //for (var j = dataElements.iterator(); j.hasNext(); )
                foreach (var j in dataElements)
                {
                    XElement dataElement = (XElement)j;                    //.next();

                    String valueString = dataElement.Value.Trim();         //.getTextTrim();

                    String[] tokens = valueString.Split(dataDelimiter);    //, -1);
                    for (int i = 0; i < tokens.Length; i++)
                    {
                        String token = tokens[i];
                        if (token.Equals(noValue))
                        {
                            token = "";
                        }

                        WitsmlLogCurve curve = (witsmllib.v131.WitsmlLogCurve)findCurve(i + 1);
                        curve.addValue(token);
                    }

                    // Handle missing log values
                    for (int i = tokens.Length; i < getNCurves(); i++)
                    {
                        WitsmlLogCurve curve = (witsmllib.v131.WitsmlLogCurve)findCurve(i + 1);
                        curve.addValue(null);
                    }
                }
            }
            else             //We didn't get the Curves, we have to ask again, because server does not support multi log and logData request at the same time.
            {
                if (this.curves.Where(x => x.getValues().Count() == 0).Count() > 0)
                {
                    witsmllib.WitsmlLog newLogObject = base.getWitsmlServer().getOne <witsmllib.WitsmlLog>(this, new WitsmlQuery(), this.getId());
                    foreach (var item in newLogObject.getCurves())
                    {
                        int index = item.getCurveNo();
                        if (this.curves[index - 1].getValues().Count() == 0)
                        {
                            this.curves[index - 1] = item;
                        }
                    }
                }

                if (this.curves.Where(x => x.getValues().Count() == 0).Count() > 0)
                {
                    throw new Exception("Count not get all Curve Object for this curve");
                }
            }
            unitConvert();
        }
예제 #15
0
        /**
         * Return complete XML query for this type.
         *
         * @param id        ID of instance to get. May be empty to indicate all.
         *                  Non-null.
         * @param parentId  Parent IDs. Closest first. May be empty if instances
         *                  are accessed from the root. Non-null.
         * @return          XML query. Never null.
         */
        static String getQuery(String id, params String[] parentId)
        {
            //Debug.Assert(id != null : "id cannot be null";
            //Debug.Assert(parentId != null : "parentId cannot be null";

            String uidWellbore = parentId.Length > 0 ? parentId[0] : "";
            String uidWell     = parentId.Length > 1 ? parentId[1] : "";

            String query = "<bhaRuns xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <bhaRun uidWell = \"" + uidWell + "\"" +
                           "          uidWellbore = \"" + uidWellbore + "\"" +
                           "          uid = \"" + id + "\">" +
                           "    <name/>" +
                           "    <tubular/>" +
                           "    <dTimStart/>" +
                           "    <dTimStop/>" +
                           "    <dTimStartDrilling/>" +
                           "    <dTimStopDrilling/>" +
                           "    <planDogleg/>" +
                           "    <actDogleg/>" +
                           "    <actDoglegMx/>" +
                           "    <statusBha/>" +
                           "    <numBitRun/>" +
                           "    <numStringRun/>" +
                           "    <reasonTrip/>" +
                           "    <objectiveBha/>" +
                           "    <drillingParams>" +
                           "      <eTimOpBit uom=\"s\"/>" +
                           "      <mdHoleStart uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "      <mdHoleStop uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "      <tubular/>" +
                           "      <hkldRot/>" +
                           "      <overPull/>" +
                           "      <slackOff/>" +
                           "      <hkldUp/>" +
                           "      <hkldDn/>" +
                           "      <tqOnBotAv/>" +
                           "      <tqOnBotMx/>" +
                           "      <tqOnBotMn/>" +
                           "      <tqOffBotAv/>" +
                           "      <tqDhAv/>" +
                           "      <wtAboveJar/>" +
                           "      <wtBelowJar/>" +
                           "      <wtMud/>" +
                           "      <flowratePump/>" +
                           "      <powBit/>" +
                           "      <velNozzleAv uom=\"m/s\"/>" +
                           "      <presDropBit uom=\"pa\"/>" +
                           "      <cTimHold/>" +
                           "      <cTimSteering/>" +
                           "      <cTimDrillRot/>" +
                           "      <cTimDrillSlid/>" +
                           "      <cTimCirc/>" +
                           "      <cTimReam/>" +
                           "      <distDrillRot/>" +
                           "      <distDrillSlid/>" +
                           "      <distReam/>" +
                           "      <distHold/>" +
                           "      <distSteering/>" +
                           "      <rpmAv/>" +
                           "      <rpmMx/>" +
                           "      <rpmMn/>" +
                           "      <rpmAvDh/>" +
                           "      <ropAv/>" +
                           "      <ropMx/>" +
                           "      <ropMn/>" +
                           "      <wobAv/>" +
                           "      <wobMx/>" +
                           "      <wobMn/>" +
                           "      <wobAvDh/>" +
                           "      <reasonTrip/>" +
                           "      <objectiveBha/>" +
                           "      <aziTop/>" +
                           "      <aziBottom/>" +
                           "      <inclStart/>" +
                           "      <inclMx/>" +
                           "      <inclMn/>" +
                           "      <inclStop/>" +
                           "      <tempMudDhMx uom=\"degC\"/>" +
                           "      <presPumpAv uom=\"psi\"/>" +
                           "      <flowrateBit/>" +
                           "      <comments/>" +
                           "    </drillingParams>" +
                           WitsmlCommonData.getQuery() +
                           "  </bhaRun>" +
                           "</bhaRuns>";

            return(query);
        }
예제 #16
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            owner = XmlUtil.update(element, "owner", owner);
            rigType = XmlUtil.update(element, "typeRig", rigType);
            manufacturer = XmlUtil.update(element, "manufacturer", manufacturer);
            startYear = XmlUtil.update(element, "yearEntService", startYear);
            rigClass = XmlUtil.update(element, "classRig", rigClass);
            approvals = XmlUtil.update(element, "approvals", approvals);
            registrationLocation = XmlUtil.update(element, "registration", registrationLocation);
            phoneNumber = XmlUtil.update(element, "telNumber", phoneNumber);
            faxNumber = XmlUtil.update(element, "faxNumber", faxNumber);
            emailAddress = XmlUtil.update(element, "emailAddress", emailAddress);
            contactName = XmlUtil.update(element, "nameContact", contactName);
            drillDepthRating = XmlUtil.update(element, "ratingDrillDepth", drillDepthRating);
            waterDepthRating = XmlUtil.update(element, "ratingWaterDepth", waterDepthRating);
            _isOffshore = XmlUtil.update(element, "isOffshore", _isOffshore);
            drillingDatumToPermanentDatumDistance = XmlUtil.update(element, "dtmRefToDtmPerm", drillingDatumToPermanentDatumDistance);
            airGap = XmlUtil.update(element, "airGap", airGap);
            datum = XmlUtil.update(element, "dtmReference", datum);
            operationStartTime = XmlUtil.update(element, "dTimStartOp", operationStartTime);
            operationEndTime = XmlUtil.update(element, "dTimEndOp", operationEndTime);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }
예제 #17
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        private void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            parentTargetId = XmlUtil.update(element, "uidTargetParent", parentTargetId);
            dispNsCenter = XmlUtil.update(element, "dispNsCenter", dispNsCenter);
            dispEwCenter = XmlUtil.update(element, "dispEwCenter", dispEwCenter);
            tvd = XmlUtil.update(element, "tvd", tvd);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }
예제 #18
0
        /// <summary>
        /// Return complete XML query for this type.
        /// </summary>
        /// <param name="logId">ID of instance to get. May be empty to indicate all. Non-null.</param>
        /// <param name="parentId">Parent IDs. Closest first. May be empty if instances are accessed from the root. Non-null.</param>
        /// <returns>XML query. Never null.</returns>
        static String getQuery(String logId, params String[] parentId)
        {
            if (logId == null)
            {
                throw new ArgumentNullException("id cannot be null");
            }
            if (parentId == null)
            {
                throw new ArgumentNullException("parentId cannot be null");
            }

            string uidWell;
            string uidWellbore;
            string mnemonic;
            string startIndex = "";

            if (parentId.Length == 4)
            {
                uidWell     = parentId[3];
                uidWellbore = parentId[2];
                logId       = parentId[1];
                mnemonic    = parentId[0];
            }
            else
            {
                uidWellbore = parentId.Length > 0 ? parentId[0] : "";
                uidWell     = parentId.Length > 1 ? parentId[1] : "";
                mnemonic    = "";
            }


            String query = "<logs xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
                           "  <log uidWell = \"" + uidWell + "\"" +
                           "       uidWellbore = \"" + uidWellbore + "\"" +
                           "       uid = \"" + logId + "\">" +
                           "    <name/>" +
                           "    <nameWell/>" +
                           "    <nameWellbore/>" +
                           "    <objectGrowing/>" +
                           "    <dataRowCount/>" +
                           "    <serviceCompany/>" +
                           "    <runNumber/>" +
                           "    <bhaRunNumber/>" +
                           "    <pass/>" +
                           "    <creationDate/>" +
                           "    <description/>" +
                           "    <indexType/>" +
                           "    <startIndex uom=\"" + WitsmlServer.distUom + "\">" + startIndex + "</startIndex>" +
                           "    <endIndex uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <indexCurve/>" +
                           "    <startDateTimeIndex/>" +
                           "    <endDateTimeIndex/>" +
                           "    <stepIncrement/>" +
                           "    <direction/>" +
                           "    <nullValue/>" +
                           "    <logParam/>" +
                           WitsmlLogCurve.getQuery() +
                           "    <logData>" +
                           "      <data/>" +
                           "    </logData>" +
                           WitsmlCommonData.getQuery() +
                           "  </log>" +
                           "</logs>";


            //String query = "<logs xmlns=\"" + WitsmlVersion.VERSION_1_3_1.getNamespace() + "\">" +
            //           "  <log uidWell = \"" + uidWell + "\"" +
            //           "       uidWellbore = \"" + uidWellbore + "\"" +
            //           "       uid = \"" + logId + "\">" +
            //            "    <name/>" +
            //            "    <nameWell/>" +
            //            "    <nameWellbore/>" +
            //            "    <objectGrowing/>" +
            //            "    <dataRowCount/>" +
            //            "    <serviceCompany/>" +
            //            "    <runNumber/>" +
            //            "    <bhaRunNumber/>" +
            //            "    <pass/>" +
            //            "    <creationDate/>" +
            //            "    <description/>" +
            //            "    <indexType/>" +
            //             "    <indexCurve/>" +
            //            "    <startDateTimeIndex/>" +
            //            "    <endDateTimeIndex/>" +
            //            "    <stepIncrement/>" +
            //            "    <direction/>" +
            //            "    <nullValue/>" +
            //            "    <logParam/>" +
            //           WitsmlLogCurve.getQuery(mnemonic) +
            //           WitsmlCommonData.getQuery() +
            //           "  </log>" +
            //           "</logs>";

            return(query);
        }
예제 #19
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            XElement parentTrajectoryElement = element.Element(element.Name.Namespace + "parentTrajectory"); //, element.getNamespace());

            if (parentTrajectoryElement != null)
            {
                XElement trajectoryReferenceElement = parentTrajectoryElement.Element(element.Name.Namespace + "trajectoryReference");//,element.getNamespace());
                if (trajectoryReferenceElement != null)
                {
                    parentTrajectoryName = trajectoryReferenceElement.Value.Trim(); //.getTextTrim();
                    XAttribute parentTrajectoryAttribute = trajectoryReferenceElement.Attribute("uidRef");
                    if (parentTrajectoryAttribute != null)
                    {
                        parentTrajectoryId = parentTrajectoryAttribute.Value;
                    }
                }
            }

            _isGrowing = XmlUtil.update(element, "objectGrowing", _isGrowing);
            stationsMeasurementStart = XmlUtil.update(element, "dTimTrajStart", stationsMeasurementStart);
            stationsMeasurementEnd   = XmlUtil.update(element, "dTimTrajEnd", stationsMeasurementEnd);
            mdMin                    = XmlUtil.update(element, "mdMn", mdMin);
            mdMax                    = XmlUtil.update(element, "mdMx", mdMax);
            serviceCompany           = XmlUtil.update(element, "serviceCompany", serviceCompany);
            magneticAngle            = XmlUtil.update(element, "magDeclUsed", magneticAngle);
            gridCorrection           = XmlUtil.update(element, "gridCorUsed", gridCorrection);
            azimuthOfVerticalSection = XmlUtil.update(element, "aziVertSect", azimuthOfVerticalSection);
            originNs                 = XmlUtil.update(element, "dispNsVertSectOrig", originNs);
            originEw                 = XmlUtil.update(element, "dispEwVertSectOrig", originEw);
            _isDefinitive            = XmlUtil.update(element, "definitive", _isDefinitive);
            _isMemoryDump            = XmlUtil.update(element, "memory", _isMemoryDump);
            _isFinal                 = XmlUtil.update(element, "finalTraj", _isFinal);
            azimuthReference         = XmlUtil.update(element, "aziRef", azimuthReference);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData"); //, element.getNamespace());

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }

            var trajectoryStationElements = element.Elements(element.Name.Namespace + "trajectoryStation"); //,element.getNamespace());

            // If we asked for stations, we clear the present content,
            // if not, we leave the present content alone
            //if (!trajectoryStationElements.isEmpty())
            foreach (var itm in trajectoryStationElements)
            {
                stations.Clear();
                break; //only once
            }

            int i = 0;

            foreach (Object subElement in trajectoryStationElements)
            {
                XElement stationElement = (XElement)subElement;

                WitsmlTrajectoryStation station = new WitsmlTrajectoryStation(stationElement, i++);
                stations.Add(station);
            }
        }
예제 #20
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        private void update(XElement element)
        {
            //Debug.Assert(element != null : "element cannot be null";

            time = XmlUtil.update(element, "dTim", time);
            activityCode = XmlUtil.update(element, "activityCode", activityCode);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData"); //, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }
예제 #21
0
        /**
         * Parse the specified DOM element and instantiate the properties
         * of this instance.
         *
         * @param element  XML element to parse. Non-null.
         */
        void update(XElement element)
        {
            time = XmlUtil.update(element, "dTim", time);
            md = XmlUtil.update(element, "md", md);
            sequenceNumber = XmlUtil.update(element, "sequence", sequenceNumber);
            activityCode = XmlUtil.update(element, "activityCode", activityCode);

            XElement realtimeHeaderElement = element.Element(element.Name.Namespace+"realtimeHeader");//, element.getNamespace());
            if (realtimeHeaderElement != null)
            {
                wellName = XmlUtil.update(realtimeHeaderElement, "nameWell", wellName);
                wellboreName = XmlUtil.update(realtimeHeaderElement, "nameWellbore", wellboreName);
                serviceCompany = XmlUtil.update(realtimeHeaderElement, "serviceCompany", serviceCompany);
                runNumber = XmlUtil.update(realtimeHeaderElement, "runNumber", runNumber);
                creationDate = XmlUtil.update(realtimeHeaderElement, "creationDate", creationDate);
                description = XmlUtil.update(realtimeHeaderElement, "description", description);
            }

            var channelElements = element.Elements(element.Name.Namespace + "channel");//, element.getNamespace());
            foreach (Object subElement in channelElements)
            {
                XElement channelElement = (XElement)subElement;
                WitsmlRealtimeChannel channel = new WitsmlRealtimeChannel(channelElement);

                channels.Add(channel);
            }

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }