示例#1
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 = "<messages xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <message uidWell =\"" + uidWell + "\"" +
                           "           uidWellbore = \"" + uidWellbore + "\"" +
                           "           uidMessage = \"" + id + "\">" +
                           "     <dTim/>" +
                           "     <activityCode/>" +
                           "     <activitySubcode/>" +
                           "     <md/>" +
                           "     <mdBit/>" +
                           "     <typeMessage/>" +
                           "     <messageText/>" +
                           "     <param/>" +
                           "     <severity/>" +
                           "     <warnProbability/>" +
                           WitsmlCommonData.getQuery() +
                           "  </message>" +
                           "</messages>";

            return(query);
        }
        /**
         * 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 = "<formationMarkers xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <formationMarker uidWell = \"" + uidWell + "\"" +
                           "                   uidWellbore = \"" + uidWellbore + "\"" +
                           "                   uidMarker = \"" + id + "\">" +
                           "    <nameMarker/>" +
                           "    <mdPrognosed uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdPrognosed uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdTopSample uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdTopSample uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <thicknessBed uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <thicknessApparent uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <thicknessPerpen uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <mdLogSample uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvdLogSample uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <dip/>" +
                           "    <dipDirection/>" +
                           "    <chronostratigraphic/>" +
                           "    <nameFormation/>" +
                           "    <description/>" +
                           WitsmlCommonData.getQuery() +
                           "  </formationMarker>" +
                           "</formationMarkers>";

            return(query);
        }
示例#3
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 = "<fluidsReports xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <fluidsReport uidWell = \"" + uidWell + "\"" +
                           "                uidWellbore = \"" + uidWellbore + "\"" +
                           "                uidReport = \"" + id + "\">" +
                           "    <nameReport/>" +
                           "    <dTim/>" +
                           "    <md uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <tvd uom=\"" + WitsmlServer.distUom + "\"/>" +
                           "    <numReport/>" +
                           "    <fluids>" + // TODO
                           "    </fluids>" +
                           WitsmlCommonData.getQuery() +
                           "  </fluidsReport>" +
                           "</fluidsReports>";

            return(query);
        }
示例#4
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_2_0.getVersion() + "\"" +
                           "           xmlns=\"" + WitsmlVersion.VERSION_1_2_0.getNamespace() + "\">" +
                           "  <realtime uidWell =\"" + uidWell + "\"" +
                           "            uidWellbore =\"" + uidWellbore + "\">" +
                           "    <dTim/>" +
                           "    <md/>" +
                           "    <interval/>" +
                           "    <activityCode/>" +
                           "    <activitySubcode/>" +
                           WitsmlRealtimeChannel.getQuery() +
                           WitsmlCommonData.getQuery() +
                           "    <customData/>" +
                           "  </realtime>" +
                           "</realtimes>";

            return(query);
        }
示例#5
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);
        }
示例#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 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);
        }
示例#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 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);
        }
示例#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 = "<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);
        }
示例#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 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);
        }
示例#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);
        }
示例#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 = "<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);
        }
示例#12
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);
        }
示例#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 = "<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);
        }
示例#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 = "<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);
        }