/**
         * 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);
            }
        }
Example #2
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);
            }
        }
Example #3
0
        /**
         * Return complete XML query for this type.
         *
         * @return  XML query. Never null.
         */
        public static String getQuery()
        {
            String query = "<trajectoryStation uidTrajStn = \"\">" +
                           "    <dTimStn/>" +
                           "    <typeTrajStation/>" +
                           "    <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>" +
                           WitsmlCommonData.getQuery() +
                           "</trajectoryStation>";

            return(query);
        }
Example #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";

            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);
            }
        }
Example #5
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";

            legalName             = XmlUtil.update(element, "nameLegal", legalName);
            licenseNumber         = XmlUtil.update(element, "numLicense", licenseNumber);
            wellNumber            = XmlUtil.update(element, "numGovt", wellNumber);
            licenseIssueTime      = XmlUtil.update(element, "dTimLicense", licenseIssueTime);
            field                 = XmlUtil.update(element, "field", field);
            country               = XmlUtil.update(element, "country", country);
            state                 = XmlUtil.update(element, "state", state);
            county                = XmlUtil.update(element, "county", county);
            region                = XmlUtil.update(element, "region", region);
            district              = XmlUtil.update(element, "district", district);
            block                 = XmlUtil.update(element, "block", block);
            timeZone              = XmlUtil.update(element, "timeZone", timeZone);
            @operator             = XmlUtil.update(element, "operator", @operator);
            operatorDivision      = XmlUtil.update(element, "operatorDiv", operatorDivision);
            operatorInterestShare = XmlUtil.update(element, "pcInterest", operatorInterestShare);
            apiNumber             = XmlUtil.update(element, "numAPI", apiNumber);
            status                = XmlUtil.update(element, "statusWell", status);
            purpose               = XmlUtil.update(element, "purposeWell", purpose);
            spudTime              = XmlUtil.update(element, "dTimSpud", spudTime);
            pluggedTime           = XmlUtil.update(element, "dTimPa", pluggedTime);
            wellHeadElevation     = XmlUtil.update(element, "dtmPermToWellhead", wellHeadElevation);
            groundElevation       = XmlUtil.update(element, "groundElevation", groundElevation);
            waterDepth            = XmlUtil.update(element, "waterDepth", waterDepth);

            XElement locationElement = element.Element(element.Name.Namespace + "location");//, element.getNamespace());

            if (locationElement != null)
            {
                location = new WitsmlLocation(locationElement);
            }

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

            if (commonDataElement != null)
            {
                commonData = new WitsmlCommonData(commonDataElement);
            }
        }
Example #6
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>
        private void update(XElement element)
        {
            if (element == null)
            {
                throw new ArgumentNullException("element cannot bt 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);
            }
        }
Example #7
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 query = "<wells xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <well uidWell=\"" + id + "\">" +
                           "    <nameWell/>" +
                           "    <nameLegal/>" +
                           "    <numLicense/>" +
                           "    <numGovt/>" +
                           "    <dTimLicense/>" +
                           "    <field/>" +
                           "    <country/>" +
                           "    <state/>" +
                           "    <county/>" +
                           "    <region/>" +
                           "    <district/>" +
                           "    <block/>" +
                           "    <timeZone/>" +
                           "    <operator/>" +
                           "    <operatorDiv/>" +
                           "    <pcInterest uom=\"\"/>" + //BM added uom
                           "    <numAPI/>" +
                           "    <statusWell/>" +
                           "    <purposeWell/>" +
                           "    <dTimSpud/>" +
                           "    <dTimPa/>" +
                           "    <dtmPermToWellhead/>" +
                           "    <dtmPermanent/>" +
                           "    <groundElevation/>" +
                           "    <waterDepth uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <location>" +
                           WitsmlLocation.getQuery() +
                           "    </location>" +
                           WitsmlCommonData.getQuery() +
                           "  </well>" +
                           "</wells>";

            return(query);
        }
Example #8
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_2_0.getNamespace() + "\">" +
                           "  <cementJob uidWell = \"" + uidWell + "\"" +
                           "             uidWellbore = \"" + uidWellbore + "\"" +
                           "             uidCementJob = \"" + id + "\">" +
                           "    <nameCementJob/>" +
                           "    <jobType/>" +
                           "    <jobConfig/>" +
                           WitsmlCommonData.getQuery() +
                           "  </cementJob>" +
                           "</cementJobs>";

            return(query);
        }
Example #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 = "<logs xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <log uidWell = \"" + uidWell + "\"" +
                           "       uidWellbore = \"" + uidWellbore + "\"" +
                           "       uidLog = \"" + id + "\">" +
                           "    <nameLog/>" +
                           "    <logHeader>" +
                           "      <serviceCompany/>" +
                           "      <runNumber/>" +
                           "      <creationDate/>" +
                           "      <description/>" +
                           "      <indexType/>" +
                           "      <startIndex/>" +
                           "      <endIndex/>" +
                           "      <stepIncrement/>" +
                           "      <direction/>" +
                           "      <indexCurve/>" +
                           "      <nullValue/>" +
                           "      <logHeaderParam/>" +
                           "      <uomNamingSystem/>" +
                           "      <otherData/>" +
                           WitsmlLogCurve.getQuery() +
                           "    </logHeader>" +
                           "    <logData>" +
                           "      <data/>" +
                           "    </logData>" +
                           WitsmlCommonData.getQuery() +
                           "  </log>" +
                           "</logs>";

            return(query);
        }
Example #10
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 = "<trajectorys xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <trajectory uidWell = \"" + uidWell + "\"" +
                           "              uidWellbore =\"" + uidWellbore + "\"" +
                           "              uidTraj = \"" + id + "\">" +
                           "    <nameTraj/>" +
                           "    <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);
        }
Example #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 uidWell = parentId.Length > 0 ? parentId[0] : "";

            String query = "<wellbores xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <wellbore uidWell = \"" + uidWell + "\"" +
                           "            uidWellbore = \"" + id + "\">" +
                           "    <nameWellbore/>" +
                           "    <nameWell/>" +
                           "    <parentWellbore/>" +
                           "    <number/>" +
                           "    <suffixAPI/>" +
                           "    <numGovt/>" +
                           "    <statusWellbore/>" +
                           "    <purposeWellbore/>" +
                           "    <typeWellbore/>" +
                           "    <shape/>" +
                           "    <dTimKickoff/>" +
                           "    <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);
        }
Example #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);
            }
        }
Example #13
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_2_0.getNamespace() + "\">" +
                           "  <target uidWell =\"" + uidWell + "\"" +
                           "          uidWellbore = \"" + uidWellbore + "\"" +
                           "          uidTarget = \"" + id + "\">" +
                           "     <nameTarget/>" +
                           "     <uidTargetParent/>" +
                           "     <dispNsCenter uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <dispEwCenter uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <tvd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <classRig/>" +
                           WitsmlCommonData.getQuery() +
                           "  </target>" +
                           "</targets>";

            return(query);
        }
Example #14
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 = "<mudLogs xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <mudLog uidWell = \"" + uidWell + "\"" +
                           "          uidWellbore = \"" + uidWellbore + "\"" +
                           "          uidMudLog   = \"" + id + "\">" +
                           "      <nameMudLog/>" +
                           "      <dTim/>" +
                           "      <mudLogCompany/>" +
                           "      <mudLogEngineers/>" +
                           "      <startMd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "      <endMd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           WitsmlCommonData.getQuery() +
                           "  </mudLog>" +
                           "</mudLogs>";

            return(query);
        }
        /**
         * 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);
        }
Example #16
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_2_0.getNamespace() + "\">" +
                           "  <bhaRun uidWell = \"" + uidWell + "\"" +
                           "          uidWellbore = \"" + uidWellbore + "\"" +
                           "          uidTubularAssy = \"" + id + "\">" +
                           "    <nameTubularAssy/>" +
                           "    <dTimStart/>" +
                           "    <dTimStop/>" +
                           "    <dTimStartDrilling/>" +
                           "    <dTimStopDrilling/>" +
                           "    <planDogleg/>" +
                           "    <actDogleg/>" +
                           "    <actDoglegMx/>" +
                           "    <statusBha/>" +
                           "    <numBitRun/>" +
                           "    <numStringRun/>" +
                           "    <reasonTrip/>" +
                           "    <objectiveBha/>" +
                           "    <drillingParams>" +
                           "      <eTimOpBit uom=\"s\"/>" +
                           "      <mdHoleStart uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "      <mdHoleStop uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "      <uidTubularAssy/>" +
                           "      <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);
        }
Example #17
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);
        }
        /**
         * Create a WITSML trajectory station instance from the given
         * XML element node.
         *
         * @param element    XML element to parse. Non-null.
         * @param stationNo  Station number.
         */
        internal WitsmlTrajectoryStation(XElement element, int stationNo)
            : base(stationNo)
        {
            id = element.Attribute("uidTrajStn").Value ;

            time = XmlUtil.update(element, "dTimStn", time);
            type = XmlUtil.update(element, "typeTrajStation", type);
            md = XmlUtil.update(element, "md", md);
            tvd = XmlUtil.update(element, "tvd", tvd);
            inclination = XmlUtil.update(element, "incl", inclination);
            azimuth = XmlUtil.update(element, "azi", azimuth);
            toolfaceMagneticAngle = XmlUtil.update(element, "mtf", toolfaceMagneticAngle);
            toolfaceGravityAngle = XmlUtil.update(element, "gtf", toolfaceGravityAngle);
            north = XmlUtil.update(element, "dispNs", north);
            east = XmlUtil.update(element, "dispEw", east);
            verticalSectionDistance = XmlUtil.update(element, "vertSect", verticalSectionDistance);
            dls = XmlUtil.update(element, "dls", dls);
            turnRate = XmlUtil.update(element, "rateTurn", turnRate);
            buildRate = XmlUtil.update(element, "rateBuild", buildRate);
            dMd = XmlUtil.update(element, "mdDelta", dMd);
            dTvd = XmlUtil.update(element, "tvdDelta", dTvd);
            errorModel = XmlUtil.update(element, "modelToolError", errorModel);
            gravityUncertainty = XmlUtil.update(element, "gravTotalUncert", gravityUncertainty);
            dipAngleUncertainty = XmlUtil.update(element, "dipAngleUncert", dipAngleUncertainty);
            magneticUncertainty = XmlUtil.update(element, "magTotalUncert", magneticUncertainty);
            _isAccelerometerCorrectionUsed = XmlUtil.update(element, "gravAccelCorUsed", _isAccelerometerCorrectionUsed);
            _isMagnetometerCorrectionUsed = XmlUtil.update(element, "magXAxialCorUsed", _isMagnetometerCorrectionUsed);
            _isSagCorrectionUsed = XmlUtil.update(element, "sagCorUsed", _isSagCorrectionUsed);
            _isDrillStringMagnetismCorrectionUsed = XmlUtil.update(element, "magDrlstrCorUsed", _isDrillStringMagnetismCorrectionUsed);
            gravitationFieldReference = XmlUtil.update(element, "gravTotalFieldReference", gravitationFieldReference);
            magneticFieldReference = XmlUtil.update(element, "magTotalFieldReference", magneticFieldReference);
            magneticDipAngleReference = XmlUtil.update(element, "magDipAngleReference", magneticDipAngleReference);
            magneticModel = XmlUtil.update(element, "magModelUsed", magneticModel);
            magneticModelValidInterval = XmlUtil.update(element, "magModelValid", magneticModelValidInterval);
            gravitationalModel = XmlUtil.update(element, "geoModelUsed", gravitationalModel);
            status = XmlUtil.update(element, "statusTrajStation", status);

            XElement locationElement = element.Element(element.Name.Namespace + "location");//, element.getNamespace());
            if (locationElement != null)
                location = new WitsmlLocation(locationElement);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }
Example #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";

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

            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);
        }
Example #20
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 = "<rigs xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <rig uidWell =\"" + uidWell + "\"" +
                           "       uidWellbore = \"" + uidWellbore + "\"" +
                           "       uidRig = \"" + id + "\">" +
                           "     <nameRig/>" +
                           "     <owner/>" +
                           "     <typeRig/>" +
                           "     <manufacturer/>" +
                           "     <yearEntService/>" +
                           "     <classRig/>" +
                           "     <approvals/>" +
                           "     <registration/>" +
                           "     <telNumber/>" +
                           "     <faxNumber/>" +
                           "     <emailAddress/>" +
                           "     <nameContact/>" +
                           "     <ratingDrillDepth uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <isOffshore/>" +
                           "     <dtmRefToDtmPerm uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <airGap uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <dtmReference/>" +
                           "     <dTimStartOp/>" +
                           "     <dTimEndOp/>" +
                           "     <bop>" +
                           "     </bop>" +
                           "     <pits>" +
                           "       <indexPit/>" +
                           "       <dTimInstall/>" +
                           "       <dTimRemove/>" +
                           "       <capMx uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "       <owner/>" +
                           "       <type/>" +
                           "       <isActive/>" +
                           "     </pits>" +
                           "     <pumps>" +
                           "       <indexPump/>" +
                           "       <manufacturer/>" +
                           "       <model/>" +
                           "       <dTimInstall/>" +
                           "       <dTimRemove/>" +
                           "       <owner/>" +
                           "       <typePump/>" +
                           "       <numCyl/>" +
                           "       <odRod uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "       <idLiner uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "       <pumpAction/>" +
                           "       <eff/>" +
                           "       <lenStroke uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "       <presMx/>" +
                           "       <powHydMx/>" +
                           "       <spmMx/>" +
                           "       <displacement uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "       <presDamp/>" +
                           "       <volDamp uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "       <powMechMx/>" +
                           "     </pumps>" +
                           "     <shakers>" +          // TODO
                           "     </shakers>" +
                           "     <centrifuge>" +       // TODO
                           "     </centrifuge>" +
                           "     <hydroclone>" +       // TODO
                           "     </hydroclone>" +
                           "     <degasser>" +         // TODO
                           "     </degasser>" +
                           "     <surfaceEquipment>" + // TODO
                           "     </surfaceEquipment>" +
                           "     <numDerricks/>" +
                           "     <typeDerrick/>" +
                           "     <ratingDerrick/>" +
                           "     <htDerrick uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <ratingHkld/>" +
                           "     <capWindDerrick/>" +
                           "     <wtBlock/>" +
                           "     <ratingBlock/>" +
                           "     <numBlockLines/>" +
                           "     <typeHook/>" +
                           "     <ratingHook/>" +
                           "     <sizeDrillLine uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <typeDrawWorks/>" +
                           "     <powerDrawWorks/>" +
                           "     <ratingDrawWorks/>" +
                           "     <motorDrawWorks/>" +
                           "     <descBrake/>" +
                           "     <typeSwivel/>" +
                           "     <ratingSwivel/>" +
                           "     <rotSystem/>" +
                           "     <descRotSystem/>" +
                           "     <ratingTqRotSys/>" +
                           "     <rotSizeOpening uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <ratingRotSystem/>" +
                           "     <scrSystem/>" +
                           "     <pipeHandlingSystem/>" +
                           "     <capBulkMud uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <capLiquidMud uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <capDrillWater uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <capPotableWater uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <capFuel uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <capBulkCement uom=\"" + WitsmlServer.volUom + "\"/>" +
                           "     <mainEngine/>" +
                           "     <generator/>" +
                           "     <cementUnit/>" +
                           "     <numBunks/>" +
                           "     <bunksPerRoom/>" +
                           "     <numCranes/>" +
                           "     <numAnch/>" +
                           "     <moorType/>" +
                           "     <numGuideTens/>" +
                           "     <numRiserTens/>" +
                           "     <varDeckLdMx uom=\"" + WitsmlServer.forceUom + "\"/>" +
                           "     <vdlStorm uom=\"" + WitsmlServer.forceUom + "\"/>" +
                           "     <numThrusters/>" +
                           "     <azimuthing/>" +
                           "     <motionCompensationMn uom=\"" + WitsmlServer.forceUom + "\"/>" +
                           "     <motionCompensationMx uom=\"" + WitsmlServer.forceUom + "\"/>" +
                           "     <strokeMotionCompensation uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <riserAngleLimit uom=\"rad\"/>" +
                           "     <heaveMx uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "     <gantry/>" +
                           "     <flares/>" +
                           WitsmlCommonData.getQuery() +
                           "  </rig>" +
                           "</rigs>";

            return(query);
        }
Example #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)
        {
            //Debug.Assert(element != null : "element cannot be null";

            jobType = XmlUtil.update(element, "jobType", jobType);
            jobConfiguration = XmlUtil.update(element, "jobConfig", jobConfiguration);

            XElement commonDataElement = element.Element(element.Name.Namespace + "commonData");//, element.getNamespace());
            if (commonDataElement != null)
                commonData = new WitsmlCommonData(commonDataElement);
        }
Example #22
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)
        { //throws WitsmlParseException {
          //Debug.Assert(element != null : "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);
            }

            // Header data
            XElement headerElement = element.Element(element.Name.Namespace + "logHeader");//, element.getNamespace());

            if (headerElement != null)
            {
                indexType        = XmlUtil.update(headerElement, "indexType", indexType);
                serviceCompany   = XmlUtil.update(headerElement, "serviceCompany", serviceCompany);
                startIndex       = getIndex(XmlUtil.update(headerElement, "startIndex", (String)null));
                endIndex         = getIndex(XmlUtil.update(headerElement, "endIndex", (String)null));
                indexCurveName   = XmlUtil.update(headerElement, "indexCurve", indexCurveName);
                runNumber        = XmlUtil.update(headerElement, "runNumber", runNumber);
                creationTime     = XmlUtil.update(headerElement, "creationDate", creationTime);
                description      = XmlUtil.update(headerElement, "description", description);
                stepIncrement    = XmlUtil.update(headerElement, "stepIncrement", stepIncrement);
                direction        = XmlUtil.update(headerElement, "direction", direction);
                indexUnit        = XmlUtil.update(headerElement, "indexUnits", indexUnit);
                noValue          = XmlUtil.update(headerElement, "nullValue", noValue);
                unitNamingSystem = XmlUtil.update(headerElement, "uomNamingSystem", unitNamingSystem);
                comment          = XmlUtil.update(headerElement, "otherData", comment);

                var logCurveInfoElements = headerElement.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.v120.WitsmlLogCurve)findCurve(i + 1);
                        curve.addValue(token);
                    }

                    // Handle missing log values
                    for (int i = tokens.Length; i < getNCurves(); i++)
                    {
                        WitsmlLogCurve curve = (witsmllib.v120.WitsmlLogCurve)findCurve(i + 1);
                        curve.addValue(null);
                    }
                }
            }

            unitConvert();
        }