DotTranslator { public static AbstractWitsmlObject translateQueryResponse( AbstractWitsmlObject wmlObject, String jsonResponseString, Map<String, String> optionsIn ) throws ValveException, DatatypeConfigurationException { JSONObject queryJson; if ("1.4.1.1".equals(wmlObject.getVersion())) { queryJson = new JSONObject(wmlObject.getJSONString("1.4.1.1")); } else { queryJson = new JSONObject(wmlObject.getJSONString("1.3.1.1")); } JSONObject responseJson = new JSONObject(jsonResponseString); String result = responseJson.toString(); if ( "requested".equals(optionsIn.get("returnElements")) || "id-only".equals(optionsIn.get("returnElements")) ) { if ("id-only".equals(optionsIn.get("returnElements"))) { queryJson = QueryTemplateProvider.getIDOnly(wmlObject.getObjectType()); } result = JsonUtil.merge(queryJson, responseJson).toString(); } result = result.replaceAll("\"dtimTrajStart\":","\"dTimTrajStart\":"); result = result.replaceAll("\"dtimTrajEnd\":","\"dTimTrajEnd\":"); result = result.replaceAll("\"dtimStn\":","\"dTimStn\":"); LOG.finest("Converting DoT JSON response to valid XML string"); try { switch ( wmlObject.getObjectType() ) { case "well": return WitsmlMarshal.deserializeFromJSON( result, ObjWell.class); case "wellbore": return WitsmlMarshal.deserializeFromJSON( result, ObjWellbore.class); case "trajectory": ObjTrajectory traj = WitsmlMarshal.deserializeFromJSON(result, ObjTrajectory.class); if("station-location-only".equals(optionsIn.get("returnElements")) || "data-only".equals(optionsIn.get("returnElements"))) { return buildStationOnlyTrajectory(traj); } else if ("header-only".equals(optionsIn.get("returnElements"))) { traj.setTrajectoryStation(null); return traj; } return traj; case "log": if ("1.3.1.1".equals(wmlObject.getVersion())) { return WitsmlMarshal.deserializeFromJSON(result, com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog.class); } else { return WitsmlMarshal.deserializeFromJSON(result, ObjLog.class); } default: throw new ValveException("unsupported object type"); } } catch (IOException ioe) { throw new ValveException(ioe.getMessage()); } }  static AbstractWitsmlObject get1311WitsmlObject(AbstractWitsmlObject wmlObj); static AbstractWitsmlObject translateQueryResponse( AbstractWitsmlObject wmlObject,
                                                               String jsonResponseString,
                                                               Map<String, String> optionsIn ); static AbstractWitsmlObject createFsRQueryResponse( String jsonResponseString,
                                                               AbstractWitsmlObject witsmlObject ); static String consolidateObjectsToXML(
            ArrayList<AbstractWitsmlObject> witsmlObjects,
            String version,
            String objectType
    );  }
@Test public void stationLocationOnlyTrajectoryTest() throws JAXBException, IOException, ValveException, DatatypeConfigurationException { String dotResponse = TestUtilities.getResourceAsString("trajectory1411.xml"); String soapQuery = TestUtilities.getResourceAsString("trajectoryGraphql/FullTrajectoryQuery1411.xml"); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys trajQuery = WitsmlMarshal.deserialize(soapQuery, com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys.class); AbstractWitsmlObject trajQuerySingular = trajQuery.getTrajectory().get(0); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys respTrajs = WitsmlMarshal.deserialize(dotResponse, com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys.class); AbstractWitsmlObject respTraj = respTrajs.getTrajectory().get(0); String respJson = respTraj.getJSONString("1.4.1.1"); Map<String,String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "station-location-only"); AbstractWitsmlObject resp = DotTranslator.translateQueryResponse(trajQuerySingular, respJson, optionsIn); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectory resultTraj = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectory)resp; assertNull(resultTraj.getServiceCompany()); assertNull(resultTraj.getGridCorUsed()); assertNull(resultTraj.getAziRef()); assertNull(resultTraj.getMagDeclUsed()); assertNull(resultTraj.getAziVertSect()); assertNotNull(resultTraj.getName()); assertNotNull(resultTraj.getUid()); assertNotNull(resultTraj.getNameWell()); assertNotNull(resultTraj.getUidWell()); assertNotNull(resultTraj.getNameWellbore()); assertNotNull(resultTraj.getUidWellbore()); assertNotNull(resultTraj.getTrajectoryStation()); assertEquals(1, resultTraj.getTrajectoryStation().size()); }
@Test public void headerOnlyTrajectoryTests() throws JAXBException, IOException, ValveException, DatatypeConfigurationException { String dotResponse = TestUtilities.getResourceAsString("trajectory1411.xml"); String soapQuery = TestUtilities.getResourceAsString("trajectoryGraphql/FullTrajectoryQuery1411.xml"); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys trajQuery = WitsmlMarshal.deserialize(soapQuery, com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys.class); AbstractWitsmlObject trajQuerySingular = trajQuery.getTrajectory().get(0); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys respTrajs = WitsmlMarshal.deserialize(dotResponse, com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectorys.class); AbstractWitsmlObject respTraj = respTrajs.getTrajectory().get(0); String respJson = respTraj.getJSONString("1.4.1.1"); Map<String,String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "header-only"); AbstractWitsmlObject resp = DotTranslator.translateQueryResponse(trajQuerySingular, respJson, optionsIn); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectory resultTraj = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjTrajectory)resp; assertEquals(0, resultTraj.getTrajectoryStation().size()); }
@Test public void translateQueryResponseTest() throws Exception { AbstractWitsmlObject wmlObject = WitsmlMarshal.deserializeFromJSON( "{\"country\":\"\",\"numLicense\":\"\",\"groundElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"commonData\":{\"privateGroupOnly\":null,\"comments\":\"\",\"acquisitionTimeZone\":[],\"dTimLastChange\":null,\"extensionAny\":null,\"defaultDatum\":{\"value\":\"\",\"uidRef\":\"\"},\"itemState\":null,\"sourceName\":null,\"extensionNameValue\":[],\"serviceCategory\":null,\"dTimCreation\":null},\"county\":\"\",\"timeZone\":\"\",\"waterDepth\":{\"uom\":\"\",\"value\":null},\"numAPI\":\"\",\"operator\":\"\",\"pcInterest\":{\"uom\":\"\",\"value\":null},\"referencePoint\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"measuredDepth\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"name\":\"\",\"location\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"latitude\":{\"uom\":\"\",\"value\":null},\"localY\":{\"uom\":\"\",\"value\":null},\"description\":\"\",\"localX\":{\"uom\":\"\",\"value\":null},\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null},\"longitude\":{\"uom\":\"\",\"value\":null}}],\"type\":\"\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"description\":\"\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null}}],\"uid\":\"randy\",\"wellheadElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"field\":\"\",\"wellCRS\":[{\"uid\":\"\",\"localCRS\":{\"yAxisAzimuth\":{\"uom\":\"\",\"northDirection\":null,\"value\":null}},\"mapProjectionCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"geodeticCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"name\":\"\",\"description\":\"\",\"extensionNameValue\":[]}],\"nameLegal\":\"\",\"district\":\"\",\"numGovt\":\"\",\"block\":\"\",\"state\":\"\",\"region\":\"\",\"operatorDiv\":\"\",\"wellDatum\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"datumName\":{\"namingSystem\":\"\",\"code\":\"\",\"value\":\"\"},\"kind\":[],\"name\":\"\",\"extensionNameValue\":[]}]}", com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell.class); String responseString = "{\"country\":\"US\",\"dTimLicense\":\"2001-05-15T13:20:00+00:00\",\"numLicense\":\"Company License Number\",\"county\":\"Montgomery\",\"waterDepth\":{\"uom\":\"ft\",\"value\":520},\"operator\":\"Operating Company\",\"pcInterest\":{\"uom\":\"%\",\"value\":65},\"dTimPa\":\"2001-07-15T15:30:00+00:00\",\"uid\":\"randy\",\"nameLegal\":\"Company Legal Name\",\"block\":\"Block Name\",\"state\":\"TX\",\"operatorDiv\":\"Division Name\",\"groundElevation\":{\"uom\":\"FT\",\"value\":250},\"commonData\":{\"comments\":\"These are the comments associated with the Well data object.\",\"dTimLastChange\":\"2019-01-30T14:09:27.268843+00:00\",\"acquisitionTimeZone\":[],\"defaultDatum\":{\"value\":\"Kelly Bushing\",\"uidRef\":\"KB\"},\"itemState\":\"PLAN\",\"extensionNameValue\":[],\"dTimCreation\":\"2019-01-24T16:59:38.88059+00:00\"},\"timeZone\":\"-06:00\",\"statusWell\":\"DRILLING\",\"purposeWell\":\"EXPLORATION\",\"numAPI\":\"123-543-987AZ\",\"referencePoint\":[{\"uid\":\"SRP1\",\"name\":\"Slot Bay Centre\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425366.47},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623781.95}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"WellOneWSP\",\"uidRef\":\"localWell1\"},\"localY\":{\"uom\":\"m\",\"value\":-3.74},\"description\":\"Location of the Site Reference Point with respect to the well surface point\",\"localX\":{\"uom\":\"m\",\"value\":12.63},\"extensionNameValue\":[]}],\"type\":\"Site Reference Point\",\"extensionNameValue\":[]},{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":-118.4},\"uid\":\"WRP2\",\"measuredDepth\":{\"datum\":\"KB\",\"uom\":\"FT\",\"value\":173.09},\"name\":\"Sea Bed\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"ED50\",\"uidRef\":\"geog1\"},\"latitude\":{\"uom\":\"dega\",\"value\":59.743844},\"extensionNameValue\":[],\"longitude\":{\"uom\":\"dega\",\"value\":1.67198083}}],\"type\":\"Well Reference Point\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"description\":\"Location of well surface point in projected system.\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}}],\"wellheadElevation\":{\"uom\":\"FT\",\"value\":500},\"field\":\"Big Field\",\"dTimSpud\":\"2001-05-31T08:15:00+00:00\",\"wellCRS\":[{\"uid\":\"geog1\",\"geodeticCRS\":{\"value\":\"4230\",\"uidRef\":\"4230\"},\"name\":\"ED50\",\"description\":\"ED50 system with EPSG code 4230.\",\"extensionNameValue\":[]},{\"uid\":\"proj1\",\"mapProjectionCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"23031\"},\"name\":\"ED50 \\/ UTM Zone 31N\",\"extensionNameValue\":[]},{\"uid\":\"localWell1\",\"localCRS\":{\"usesWellAsOrigin\":true,\"xRotationCounterClockwise\":false,\"yAxisAzimuth\":{\"uom\":\"dega\",\"northDirection\":\"GRID_NORTH\",\"value\":0}},\"name\":\"WellOneWSP\",\"extensionNameValue\":[]}],\"district\":\"District Name\",\"name\":\"6507\\/7-A-42\",\"numGovt\":\"Govt-Number\",\"region\":\"Region Name\",\"wellDatum\":[{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":78.5},\"uid\":\"KB\",\"code\":\"KB\",\"kind\":[],\"name\":\"Kelly Bushing\",\"extensionNameValue\":[]},{\"uid\":\"SL\",\"code\":\"SL\",\"datumName\":{\"namingSystem\":\"EPSG\",\"code\":\"5106\",\"value\":\"Caspian Sea\"},\"kind\":[],\"name\":\"Sea Level\",\"extensionNameValue\":[]}]}"; AbstractWitsmlObject abstractWitsmlObject = DotTranslator.translateQueryResponse(wmlObject, responseString, new HashMap<>()); assertTrue(abstractWitsmlObject instanceof com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell objWell = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell) abstractWitsmlObject; assertEquals("Block Name", objWell.getBlock()); assertTrue(objWell.getCommonData() instanceof CsCommonData); assertTrue(objWell.getGroundElevation() instanceof WellElevationCoord); assertEquals("Montgomery", objWell.getCounty()); assertEquals("123-543-987AZ", objWell.getNumAPI()); }
@Test public void translateQueryResponseTestIdOnly() throws Exception{ AbstractWitsmlObject wmlObject = WitsmlMarshal.deserializeFromJSON( "{\"country\":\"\",\"groundElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"commonData\":{\"privateGroupOnly\":null,\"comments\":\"\",\"acquisitionTimeZone\":[],\"dTimLastChange\":null,\"extensionAny\":null,\"defaultDatum\":{\"value\":\"\",\"uidRef\":\"\"},\"itemState\":null,\"sourceName\":null,\"extensionNameValue\":[],\"serviceCategory\":null,\"dTimCreation\":null},\"county\":\"\",\"timeZone\":\"\",\"waterDepth\":{\"uom\":\"\",\"value\":null},\"numAPI\":\"\",\"operator\":\"\",\"pcInterest\":{\"uom\":\"\",\"value\":null},\"referencePoint\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"measuredDepth\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"name\":\"\",\"location\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"latitude\":{\"uom\":\"\",\"value\":null},\"localY\":{\"uom\":\"\",\"value\":null},\"description\":\"\",\"localX\":{\"uom\":\"\",\"value\":null},\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null},\"longitude\":{\"uom\":\"\",\"value\":null}}],\"type\":\"\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"description\":\"\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null}}],\"uid\":\"randy\",\"wellheadElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"field\":\"\",\"wellCRS\":[{\"uid\":\"\",\"localCRS\":{\"yAxisAzimuth\":{\"uom\":\"\",\"northDirection\":null,\"value\":null}},\"mapProjectionCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"geodeticCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"name\":\"\",\"description\":\"\",\"extensionNameValue\":[]}],\"nameLegal\":\"\",\"district\":\"\",\"numGovt\":\"\",\"block\":\"\",\"state\":\"\",\"region\":\"\",\"operatorDiv\":\"\",\"wellDatum\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"datumName\":{\"namingSystem\":\"\",\"code\":\"\",\"value\":\"\"},\"kind\":[],\"name\":\"\",\"extensionNameValue\":[]}]}", com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell.class); String responseString = "{\"name\":\"BIG Well 0116\",\"nameLegal\":\"Company Legal Name\",\"numLicense\":\"Company License Number\",\"numGovt\":\"Govt-Number\",\"field\":\"Big Field\",\"country\":\"US\",\"state\":\"TX\",\"county\":\"Montgomery\",\"region\":\"Region Name\",\"district\":\"District Name\",\"block\":\"Block Name\",\"timeZone\":\"-06:00\",\"operator\":\"Operating Company\",\"operatorDiv\":\"Division Name\",\"pcInterest\":{\"value\":65,\"uom\":\"%\"},\"numAPI\":\"123-543-987AZ\",\"statusWell\":\"DRILLING\",\"purposeWell\":\"EXPLORATION\",\"wellheadElevation\":{\"value\":500,\"uom\":\"FT\",\"datum\":null},\"wellDatum\":[{\"name\":\"Kelly Bushing\",\"code\":\"KB\",\"kind\":[],\"elevation\":{\"value\":78.5,\"uom\":\"FT\",\"datum\":\"SL\"},\"extensionNameValue\":[],\"uid\":\"KB\"},{\"name\":\"Sea Level\",\"code\":\"SL\",\"datumName\":{\"value\":\"Caspian Sea\",\"namingSystem\":\"EPSG\",\"code\":\"5106\"},\"kind\":[],\"extensionNameValue\":[],\"uid\":\"SL\"}],\"groundElevation\":{\"value\":250,\"uom\":\"FT\",\"datum\":null},\"waterDepth\":{\"value\":520,\"uom\":\"ft\"},\"wellLocation\":[{\"wellCRS\":{\"value\":\"ED50 / UTM Zone 31N\",\"uidRef\":\"proj1\"},\"easting\":{\"value\":425353.84,\"uom\":\"m\"},\"northing\":{\"value\":6623785.69,\"uom\":\"m\"},\"description\":\"Location of well surface point in projected system.\",\"extensionNameValue\":[],\"uid\":\"loc-1\"}],\"referencePoint\":[{\"name\":\"Slot Bay Centre\",\"type\":\"Site Reference Point\",\"location\":[{\"wellCRS\":{\"value\":\"ED50 / UTM Zone 31N\",\"uidRef\":\"proj1\"},\"easting\":{\"value\":425366.47,\"uom\":\"m\"},\"northing\":{\"value\":6623781.95,\"uom\":\"m\"},\"extensionNameValue\":[],\"uid\":\"loc-1\"},{\"wellCRS\":{\"value\":\"WellOneWSP\",\"uidRef\":\"localWell1\"},\"localX\":{\"value\":12.63,\"uom\":\"m\"},\"localY\":{\"value\":-3.74,\"uom\":\"m\"},\"description\":\"Location of the Site Reference Point with respect to the well surface point\",\"extensionNameValue\":[],\"uid\":\"loc-2\"}],\"extensionNameValue\":[],\"uid\":\"SRP1\"},{\"name\":\"Sea Bed\",\"type\":\"Well Reference Point\",\"elevation\":{\"value\":-118.4,\"uom\":\"FT\",\"datum\":\"SL\"},\"measuredDepth\":{\"value\":173.09,\"uom\":\"FT\",\"datum\":\"KB\"},\"location\":[{\"wellCRS\":{\"value\":\"ED50 / UTM Zone 31N\",\"uidRef\":\"proj1\"},\"easting\":{\"value\":425353.84,\"uom\":\"m\"},\"northing\":{\"value\":6623785.69,\"uom\":\"m\"},\"extensionNameValue\":[],\"uid\":\"loc-1\"},{\"wellCRS\":{\"value\":\"ED50\",\"uidRef\":\"geog1\"},\"latitude\":{\"value\":59.743844,\"uom\":\"dega\"},\"longitude\":{\"value\":1.67198083,\"uom\":\"dega\"},\"extensionNameValue\":[],\"uid\":\"loc-2\"}],\"extensionNameValue\":[],\"uid\":\"WRP2\"}],\"wellCRS\":[{\"name\":\"ED50\",\"geodeticCRS\":{\"value\":\"4230\",\"uidRef\":\"4230\"},\"description\":\"ED50 system with EPSG code 4230.\",\"extensionNameValue\":[],\"uid\":\"geog1\"},{\"name\":\"ED50 / UTM Zone 31N\",\"mapProjectionCRS\":{\"value\":\"ED50 / UTM Zone 31N\",\"uidRef\":\"23031\"},\"extensionNameValue\":[],\"uid\":\"proj1\"},{\"name\":\"WellOneWSP\",\"localCRS\":{\"yAxisAzimuth\":{\"value\":0,\"uom\":\"dega\",\"northDirection\":\"GRID_NORTH\"}},\"extensionNameValue\":[],\"uid\":\"localWell1\"}],\"uid\":\"W-0116\"}"; Map<String, String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "id-only"); AbstractWitsmlObject abstractWitsmlObject = DotTranslator.translateQueryResponse(wmlObject, responseString, optionsIn); assertTrue(abstractWitsmlObject instanceof com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell objWell = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell) abstractWitsmlObject; assertEquals("123-543-987AZ", objWell.getNumAPI()); assertEquals("Govt-Number", objWell.getNumGovt()); assertEquals("BIG Well 0116", objWell.getName()); }
@Test public void translateQueryResponseTestWithReturnElementsAll() throws Exception { AbstractWitsmlObject wmlObject = WitsmlMarshal.deserializeFromJSON( "{\"country\":\"\",\"groundElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"commonData\":{\"privateGroupOnly\":null,\"comments\":\"\",\"acquisitionTimeZone\":[],\"dTimLastChange\":null,\"extensionAny\":null,\"defaultDatum\":{\"value\":\"\",\"uidRef\":\"\"},\"itemState\":null,\"sourceName\":null,\"extensionNameValue\":[],\"serviceCategory\":null,\"dTimCreation\":null},\"county\":\"\",\"timeZone\":\"\",\"waterDepth\":{\"uom\":\"\",\"value\":null},\"numAPI\":\"\",\"operator\":\"\",\"pcInterest\":{\"uom\":\"\",\"value\":null},\"referencePoint\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"measuredDepth\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"name\":\"\",\"location\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"latitude\":{\"uom\":\"\",\"value\":null},\"localY\":{\"uom\":\"\",\"value\":null},\"description\":\"\",\"localX\":{\"uom\":\"\",\"value\":null},\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null},\"longitude\":{\"uom\":\"\",\"value\":null}}],\"type\":\"\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"description\":\"\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null}}],\"uid\":\"randy\",\"wellheadElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"field\":\"\",\"wellCRS\":[{\"uid\":\"\",\"localCRS\":{\"yAxisAzimuth\":{\"uom\":\"\",\"northDirection\":null,\"value\":null}},\"mapProjectionCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"geodeticCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"name\":\"\",\"description\":\"\",\"extensionNameValue\":[]}],\"nameLegal\":\"\",\"district\":\"\",\"numGovt\":\"\",\"block\":\"\",\"state\":\"\",\"region\":\"\",\"operatorDiv\":\"\",\"wellDatum\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"datumName\":{\"namingSystem\":\"\",\"code\":\"\",\"value\":\"\"},\"kind\":[],\"name\":\"\",\"extensionNameValue\":[]}]}", com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell.class); String responseString = "{\"country\":\"US\",\"dTimLicense\":\"2001-05-15T13:20:00+00:00\",\"numLicense\":\"Company License Number\",\"county\":\"Montgomery\",\"waterDepth\":{\"uom\":\"ft\",\"value\":520},\"operator\":\"Operating Company\",\"pcInterest\":{\"uom\":\"%\",\"value\":65},\"dTimPa\":\"2001-07-15T15:30:00+00:00\",\"uid\":\"randy\",\"nameLegal\":\"Company Legal Name\",\"block\":\"Block Name\",\"state\":\"TX\",\"operatorDiv\":\"Division Name\",\"groundElevation\":{\"uom\":\"FT\",\"value\":250},\"commonData\":{\"comments\":\"These are the comments associated with the Well data object.\",\"dTimLastChange\":\"2019-01-30T14:09:27.268843+00:00\",\"acquisitionTimeZone\":[],\"defaultDatum\":{\"value\":\"Kelly Bushing\",\"uidRef\":\"KB\"},\"itemState\":\"PLAN\",\"extensionNameValue\":[],\"dTimCreation\":\"2019-01-24T16:59:38.88059+00:00\"},\"timeZone\":\"-06:00\",\"statusWell\":\"DRILLING\",\"purposeWell\":\"EXPLORATION\",\"numAPI\":\"123-543-987AZ\",\"referencePoint\":[{\"uid\":\"SRP1\",\"name\":\"Slot Bay Centre\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425366.47},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623781.95}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"WellOneWSP\",\"uidRef\":\"localWell1\"},\"localY\":{\"uom\":\"m\",\"value\":-3.74},\"description\":\"Location of the Site Reference Point with respect to the well surface point\",\"localX\":{\"uom\":\"m\",\"value\":12.63},\"extensionNameValue\":[]}],\"type\":\"Site Reference Point\",\"extensionNameValue\":[]},{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":-118.4},\"uid\":\"WRP2\",\"measuredDepth\":{\"datum\":\"KB\",\"uom\":\"FT\",\"value\":173.09},\"name\":\"Sea Bed\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"ED50\",\"uidRef\":\"geog1\"},\"latitude\":{\"uom\":\"dega\",\"value\":59.743844},\"extensionNameValue\":[],\"longitude\":{\"uom\":\"dega\",\"value\":1.67198083}}],\"type\":\"Well Reference Point\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"description\":\"Location of well surface point in projected system.\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}}],\"wellheadElevation\":{\"uom\":\"FT\",\"value\":500},\"field\":\"Big Field\",\"dTimSpud\":\"2001-05-31T08:15:00+00:00\",\"wellCRS\":[{\"uid\":\"geog1\",\"geodeticCRS\":{\"value\":\"4230\",\"uidRef\":\"4230\"},\"name\":\"ED50\",\"description\":\"ED50 system with EPSG code 4230.\",\"extensionNameValue\":[]},{\"uid\":\"proj1\",\"mapProjectionCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"23031\"},\"name\":\"ED50 \\/ UTM Zone 31N\",\"extensionNameValue\":[]},{\"uid\":\"localWell1\",\"localCRS\":{\"usesWellAsOrigin\":true,\"xRotationCounterClockwise\":false,\"yAxisAzimuth\":{\"uom\":\"dega\",\"northDirection\":\"GRID_NORTH\",\"value\":0}},\"name\":\"WellOneWSP\",\"extensionNameValue\":[]}],\"district\":\"District Name\",\"name\":\"6507\\/7-A-42\",\"numGovt\":\"Govt-Number\",\"region\":\"Region Name\",\"wellDatum\":[{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":78.5},\"uid\":\"KB\",\"code\":\"KB\",\"kind\":[],\"name\":\"Kelly Bushing\",\"extensionNameValue\":[]},{\"uid\":\"SL\",\"code\":\"SL\",\"datumName\":{\"namingSystem\":\"EPSG\",\"code\":\"5106\",\"value\":\"Caspian Sea\"},\"kind\":[],\"name\":\"Sea Level\",\"extensionNameValue\":[]}]}"; Map<String, String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "all"); AbstractWitsmlObject abstractWitsmlObject = DotTranslator.translateQueryResponse(wmlObject, responseString, optionsIn); assertTrue(abstractWitsmlObject instanceof com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell objWell = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell) abstractWitsmlObject; assertEquals("Company License Number", objWell.getNumLicense()); }
@Test public void translateQueryResponseTestWithReturnElementsIdOnly() throws Exception { AbstractWitsmlObject wmlObject = WitsmlMarshal.deserializeFromJSON( "{\"country\":\"\",\"groundElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"commonData\":{\"privateGroupOnly\":null,\"comments\":\"\",\"acquisitionTimeZone\":[],\"dTimLastChange\":null,\"extensionAny\":null,\"defaultDatum\":{\"value\":\"\",\"uidRef\":\"\"},\"itemState\":null,\"sourceName\":null,\"extensionNameValue\":[],\"serviceCategory\":null,\"dTimCreation\":null},\"county\":\"\",\"timeZone\":\"\",\"waterDepth\":{\"uom\":\"\",\"value\":null},\"numAPI\":\"\",\"operator\":\"\",\"pcInterest\":{\"uom\":\"\",\"value\":null},\"referencePoint\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"measuredDepth\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"name\":\"\",\"location\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"latitude\":{\"uom\":\"\",\"value\":null},\"localY\":{\"uom\":\"\",\"value\":null},\"description\":\"\",\"localX\":{\"uom\":\"\",\"value\":null},\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null},\"longitude\":{\"uom\":\"\",\"value\":null}}],\"type\":\"\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"description\":\"\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null}}],\"uid\":\"randy\",\"wellheadElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"field\":\"\",\"wellCRS\":[{\"uid\":\"\",\"localCRS\":{\"yAxisAzimuth\":{\"uom\":\"\",\"northDirection\":null,\"value\":null}},\"mapProjectionCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"geodeticCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"name\":\"\",\"description\":\"\",\"extensionNameValue\":[]}],\"nameLegal\":\"\",\"district\":\"\",\"numGovt\":\"\",\"block\":\"\",\"state\":\"\",\"region\":\"\",\"operatorDiv\":\"\",\"wellDatum\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"datumName\":{\"namingSystem\":\"\",\"code\":\"\",\"value\":\"\"},\"kind\":[],\"name\":\"\",\"extensionNameValue\":[]}]}", com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell.class); String responseString = "{\"country\":\"US\",\"dTimLicense\":\"2001-05-15T13:20:00+00:00\",\"numLicense\":\"Company License Number\",\"county\":\"Montgomery\",\"waterDepth\":{\"uom\":\"ft\",\"value\":520},\"operator\":\"Operating Company\",\"pcInterest\":{\"uom\":\"%\",\"value\":65},\"dTimPa\":\"2001-07-15T15:30:00+00:00\",\"uid\":\"randy\",\"nameLegal\":\"Company Legal Name\",\"block\":\"Block Name\",\"state\":\"TX\",\"operatorDiv\":\"Division Name\",\"groundElevation\":{\"uom\":\"FT\",\"value\":250},\"commonData\":{\"comments\":\"These are the comments associated with the Well data object.\",\"dTimLastChange\":\"2019-01-30T14:09:27.268843+00:00\",\"acquisitionTimeZone\":[],\"defaultDatum\":{\"value\":\"Kelly Bushing\",\"uidRef\":\"KB\"},\"itemState\":\"PLAN\",\"extensionNameValue\":[],\"dTimCreation\":\"2019-01-24T16:59:38.88059+00:00\"},\"timeZone\":\"-06:00\",\"statusWell\":\"DRILLING\",\"purposeWell\":\"EXPLORATION\",\"numAPI\":\"123-543-987AZ\",\"referencePoint\":[{\"uid\":\"SRP1\",\"name\":\"Slot Bay Centre\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425366.47},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623781.95}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"WellOneWSP\",\"uidRef\":\"localWell1\"},\"localY\":{\"uom\":\"m\",\"value\":-3.74},\"description\":\"Location of the Site Reference Point with respect to the well surface point\",\"localX\":{\"uom\":\"m\",\"value\":12.63},\"extensionNameValue\":[]}],\"type\":\"Site Reference Point\",\"extensionNameValue\":[]},{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":-118.4},\"uid\":\"WRP2\",\"measuredDepth\":{\"datum\":\"KB\",\"uom\":\"FT\",\"value\":173.09},\"name\":\"Sea Bed\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"ED50\",\"uidRef\":\"geog1\"},\"latitude\":{\"uom\":\"dega\",\"value\":59.743844},\"extensionNameValue\":[],\"longitude\":{\"uom\":\"dega\",\"value\":1.67198083}}],\"type\":\"Well Reference Point\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"description\":\"Location of well surface point in projected system.\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}}],\"wellheadElevation\":{\"uom\":\"FT\",\"value\":500},\"field\":\"Big Field\",\"dTimSpud\":\"2001-05-31T08:15:00+00:00\",\"wellCRS\":[{\"uid\":\"geog1\",\"geodeticCRS\":{\"value\":\"4230\",\"uidRef\":\"4230\"},\"name\":\"ED50\",\"description\":\"ED50 system with EPSG code 4230.\",\"extensionNameValue\":[]},{\"uid\":\"proj1\",\"mapProjectionCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"23031\"},\"name\":\"ED50 \\/ UTM Zone 31N\",\"extensionNameValue\":[]},{\"uid\":\"localWell1\",\"localCRS\":{\"usesWellAsOrigin\":true,\"xRotationCounterClockwise\":false,\"yAxisAzimuth\":{\"uom\":\"dega\",\"northDirection\":\"GRID_NORTH\",\"value\":0}},\"name\":\"WellOneWSP\",\"extensionNameValue\":[]}],\"district\":\"District Name\",\"name\":\"6507\\/7-A-42\",\"numGovt\":\"Govt-Number\",\"region\":\"Region Name\",\"wellDatum\":[{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":78.5},\"uid\":\"KB\",\"code\":\"KB\",\"kind\":[],\"name\":\"Kelly Bushing\",\"extensionNameValue\":[]},{\"uid\":\"SL\",\"code\":\"SL\",\"datumName\":{\"namingSystem\":\"EPSG\",\"code\":\"5106\",\"value\":\"Caspian Sea\"},\"kind\":[],\"name\":\"Sea Level\",\"extensionNameValue\":[]}]}"; Map<String, String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "id-only"); AbstractWitsmlObject abstractWitsmlObject = DotTranslator.translateQueryResponse(wmlObject, responseString, optionsIn); assertTrue(abstractWitsmlObject instanceof com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell objWell = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell) abstractWitsmlObject; assertEquals(null, objWell.getNumLicense()); }
@Test public void translateQueryResponseTestWithSubSelect() throws Exception { AbstractWitsmlObject wmlObject = WitsmlMarshal.deserializeFromJSON( "{\"country\":\"\",\"groundElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"commonData\":{\"privateGroupOnly\":null,\"comments\":\"\",\"acquisitionTimeZone\":[],\"dTimLastChange\":null,\"extensionAny\":null,\"defaultDatum\":{\"value\":\"\",\"uidRef\":\"\"},\"itemState\":null,\"sourceName\":null,\"extensionNameValue\":[],\"serviceCategory\":null,\"dTimCreation\":null},\"county\":\"\",\"timeZone\":\"\",\"waterDepth\":{\"uom\":\"\",\"value\":null},\"numAPI\":\"\",\"operator\":\"\",\"pcInterest\":{\"uom\":\"\",\"value\":null},\"referencePoint\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"measuredDepth\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"name\":\"\",\"location\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"latitude\":{\"uom\":\"\",\"value\":null},\"localY\":{\"uom\":\"\",\"value\":null},\"description\":\"\",\"localX\":{\"uom\":\"\",\"value\":null},\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null},\"longitude\":{\"uom\":\"\",\"value\":null}}],\"type\":\"\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"\",\"easting\":{\"uom\":\"\",\"value\":null},\"wellCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"description\":\"\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"\",\"value\":null}}],\"uid\":\"randy\",\"wellheadElevation\":{\"datum\":null,\"uom\":null,\"value\":null},\"field\":\"\",\"wellCRS\":[{\"uid\":\"\",\"localCRS\":{\"yAxisAzimuth\":{\"uom\":\"\",\"northDirection\":null,\"value\":null}},\"mapProjectionCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"geodeticCRS\":{\"value\":\"\",\"uidRef\":\"\"},\"name\":\"\",\"description\":\"\",\"extensionNameValue\":[]}],\"nameLegal\":\"\",\"district\":\"\",\"numGovt\":\"\",\"block\":\"\",\"state\":\"\",\"region\":\"\",\"operatorDiv\":\"\",\"wellDatum\":[{\"elevation\":{\"datum\":\"\",\"uom\":null,\"value\":null},\"uid\":\"\",\"datumName\":{\"namingSystem\":\"\",\"code\":\"\",\"value\":\"\"},\"kind\":[],\"name\":\"\",\"extensionNameValue\":[]}]}", com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell.class); String responseString = "{\"country\":\"US\",\"dTimLicense\":\"2001-05-15T13:20:00+00:00\",\"numLicense\":\"Company License Number\",\"county\":\"Montgomery\",\"waterDepth\":{\"uom\":\"ft\",\"value\":520},\"operator\":\"Operating Company\",\"pcInterest\":{\"uom\":\"%\",\"value\":65},\"dTimPa\":\"2001-07-15T15:30:00+00:00\",\"uid\":\"randy\",\"nameLegal\":\"Company Legal Name\",\"block\":\"Block Name\",\"state\":\"TX\",\"operatorDiv\":\"Division Name\",\"groundElevation\":{\"uom\":\"FT\",\"value\":250},\"commonData\":{\"comments\":\"These are the comments associated with the Well data object.\",\"dTimLastChange\":\"2019-01-30T14:09:27.268843+00:00\",\"acquisitionTimeZone\":[],\"defaultDatum\":{\"value\":\"Kelly Bushing\",\"uidRef\":\"KB\"},\"itemState\":\"PLAN\",\"extensionNameValue\":[],\"dTimCreation\":\"2019-01-24T16:59:38.88059+00:00\"},\"timeZone\":\"-06:00\",\"statusWell\":\"DRILLING\",\"purposeWell\":\"EXPLORATION\",\"numAPI\":\"123-543-987AZ\",\"referencePoint\":[{\"uid\":\"SRP1\",\"name\":\"Slot Bay Centre\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425366.47},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623781.95}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"WellOneWSP\",\"uidRef\":\"localWell1\"},\"localY\":{\"uom\":\"m\",\"value\":-3.74},\"description\":\"Location of the Site Reference Point with respect to the well surface point\",\"localX\":{\"uom\":\"m\",\"value\":12.63},\"extensionNameValue\":[]}],\"type\":\"Site Reference Point\",\"extensionNameValue\":[]},{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":-118.4},\"uid\":\"WRP2\",\"measuredDepth\":{\"datum\":\"KB\",\"uom\":\"FT\",\"value\":173.09},\"name\":\"Sea Bed\",\"location\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}},{\"uid\":\"loc-2\",\"wellCRS\":{\"value\":\"ED50\",\"uidRef\":\"geog1\"},\"latitude\":{\"uom\":\"dega\",\"value\":59.743844},\"extensionNameValue\":[],\"longitude\":{\"uom\":\"dega\",\"value\":1.67198083}}],\"type\":\"Well Reference Point\",\"extensionNameValue\":[]}],\"wellLocation\":[{\"uid\":\"loc-1\",\"easting\":{\"uom\":\"m\",\"value\":425353.84},\"wellCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"proj1\"},\"description\":\"Location of well surface point in projected system.\",\"extensionNameValue\":[],\"northing\":{\"uom\":\"m\",\"value\":6623785.69}}],\"wellheadElevation\":{\"uom\":\"FT\",\"value\":500},\"field\":\"Big Field\",\"dTimSpud\":\"2001-05-31T08:15:00+00:00\",\"wellCRS\":[{\"uid\":\"geog1\",\"geodeticCRS\":{\"value\":\"4230\",\"uidRef\":\"4230\"},\"name\":\"ED50\",\"description\":\"ED50 system with EPSG code 4230.\",\"extensionNameValue\":[]},{\"uid\":\"proj1\",\"mapProjectionCRS\":{\"value\":\"ED50 \\/ UTM Zone 31N\",\"uidRef\":\"23031\"},\"name\":\"ED50 \\/ UTM Zone 31N\",\"extensionNameValue\":[]},{\"uid\":\"localWell1\",\"localCRS\":{\"usesWellAsOrigin\":true,\"xRotationCounterClockwise\":false,\"yAxisAzimuth\":{\"uom\":\"dega\",\"northDirection\":\"GRID_NORTH\",\"value\":0}},\"name\":\"WellOneWSP\",\"extensionNameValue\":[]}],\"district\":\"District Name\",\"name\":\"6507\\/7-A-42\",\"numGovt\":\"Govt-Number\",\"region\":\"Region Name\",\"wellDatum\":[{\"elevation\":{\"datum\":\"SL\",\"uom\":\"FT\",\"value\":78.5},\"uid\":\"KB\",\"code\":\"KB\",\"kind\":[],\"name\":\"Kelly Bushing\",\"extensionNameValue\":[]},{\"uid\":\"SL\",\"code\":\"SL\",\"datumName\":{\"namingSystem\":\"EPSG\",\"code\":\"5106\",\"value\":\"Caspian Sea\"},\"kind\":[],\"name\":\"Sea Level\",\"extensionNameValue\":[]}]}"; Map<String, String> optionsIn = new HashMap<>(); optionsIn.put("returnElements", "requested"); AbstractWitsmlObject abstractWitsmlObject = DotTranslator.translateQueryResponse(wmlObject, responseString, optionsIn); assertTrue(abstractWitsmlObject instanceof com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell); com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell objWell = (com.hashmapinc.tempus.WitsmlObjects.v1411.ObjWell) abstractWitsmlObject; assertEquals(null, objWell.getNumLicense()); }