@Test public void shouldGetCap() { Map<String, AbstractWitsmlObject[]> cap = this.valve.getCap(); assertFalse(cap.isEmpty()); assertTrue(cap.containsKey("WMLS_AddToStore")); assertTrue(cap.containsKey("WMLS_GetFromStore")); assertTrue(cap.containsKey("WMLS_DeleteFromStore")); assertTrue(cap.containsKey("WMLS_UpdateInStore")); AbstractWitsmlObject[] actualAddObjects = cap.get("WMLS_AddToStore"); AbstractWitsmlObject[] actualGetObjects = cap.get("WMLS_GetFromStore"); AbstractWitsmlObject[] actualDeleteObjects = cap.get("WMLS_DeleteFromStore"); AbstractWitsmlObject[] actualUpdateObjects = cap.get("WMLS_UpdateInStore"); assertEquals("well", actualAddObjects[0].getObjectType()); assertEquals("wellbore", actualAddObjects[1].getObjectType()); assertEquals("trajectory", actualAddObjects[2].getObjectType()); assertEquals("well", actualGetObjects[0].getObjectType()); assertEquals("wellbore", actualGetObjects[1].getObjectType()); assertEquals("well", actualDeleteObjects[0].getObjectType()); assertEquals("wellbore", actualDeleteObjects[1].getObjectType()); assertEquals("trajectory", actualDeleteObjects[2].getObjectType()); assertEquals("well", actualUpdateObjects[0].getObjectType()); assertEquals("wellbore", actualUpdateObjects[1].getObjectType()); assertEquals("trajectory", actualUpdateObjects[2].getObjectType()); }
public Map<String, AbstractWitsmlObject[]> getCap() { Map<String, AbstractWitsmlObject[]> cap = new HashMap<>(); String[] funcs = { "WMLS_AddToStore", "WMLS_GetFromStore", "WMLS_DeleteFromStore", "WMLS_UpdateInStore" }; AbstractWitsmlObject well = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWell(); AbstractWitsmlObject wellbore = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWellbore(); AbstractWitsmlObject trajectory = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjTrajectory(); AbstractWitsmlObject log = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog(); AbstractWitsmlObject fluidsReport = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjFluidsReport(); AbstractWitsmlObject[][] supportedObjects = { { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport}, }; for (int i = 0; i < funcs.length; i++) { cap.put(funcs[i], supportedObjects[i]); } return cap; }
DotValve implements IValve { public Map<String, AbstractWitsmlObject[]> getCap() { Map<String, AbstractWitsmlObject[]> cap = new HashMap<>(); String[] funcs = { "WMLS_AddToStore", "WMLS_GetFromStore", "WMLS_DeleteFromStore", "WMLS_UpdateInStore" }; AbstractWitsmlObject well = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWell(); AbstractWitsmlObject wellbore = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWellbore(); AbstractWitsmlObject trajectory = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjTrajectory(); AbstractWitsmlObject log = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog(); AbstractWitsmlObject fluidsReport = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjFluidsReport(); AbstractWitsmlObject[][] supportedObjects = { { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport}, }; for (int i = 0; i < funcs.length; i++) { cap.put(funcs[i], supportedObjects[i]); } return cap; } }
DotValve implements IValve { public Map<String, AbstractWitsmlObject[]> getCap() { Map<String, AbstractWitsmlObject[]> cap = new HashMap<>(); String[] funcs = { "WMLS_AddToStore", "WMLS_GetFromStore", "WMLS_DeleteFromStore", "WMLS_UpdateInStore" }; AbstractWitsmlObject well = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWell(); AbstractWitsmlObject wellbore = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWellbore(); AbstractWitsmlObject trajectory = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjTrajectory(); AbstractWitsmlObject log = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog(); AbstractWitsmlObject fluidsReport = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjFluidsReport(); AbstractWitsmlObject[][] supportedObjects = { { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport}, }; for (int i = 0; i < funcs.length; i++) { cap.put(funcs[i], supportedObjects[i]); } return cap; } DotValve(Map<String, String> config);  DotValve(DotClient client, DotDelegator delegator); }
DotValve implements IValve { public Map<String, AbstractWitsmlObject[]> getCap() { Map<String, AbstractWitsmlObject[]> cap = new HashMap<>(); String[] funcs = { "WMLS_AddToStore", "WMLS_GetFromStore", "WMLS_DeleteFromStore", "WMLS_UpdateInStore" }; AbstractWitsmlObject well = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWell(); AbstractWitsmlObject wellbore = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWellbore(); AbstractWitsmlObject trajectory = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjTrajectory(); AbstractWitsmlObject log = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog(); AbstractWitsmlObject fluidsReport = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjFluidsReport(); AbstractWitsmlObject[][] supportedObjects = { { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport}, }; for (int i = 0; i < funcs.length; i++) { cap.put(funcs[i], supportedObjects[i]); } return cap; } DotValve(Map<String, String> config);  DotValve(DotClient client, DotDelegator delegator); @Override String getName(); @Override String getDescription(); @Override String getObjectSelectionCapability(String WMLtypeIn); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<String> getObject(QueryContext qc); static boolean trajHasSearchQueryArgs( QueryContext qc ); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<String> createObject(QueryContext qc); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<Boolean> deleteObject(QueryContext qc); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<Boolean> updateObject(QueryContext qc); @Override void authenticate(String username, String password); Map<String, AbstractWitsmlObject[]> getCap(); }
DotValve implements IValve { public Map<String, AbstractWitsmlObject[]> getCap() { Map<String, AbstractWitsmlObject[]> cap = new HashMap<>(); String[] funcs = { "WMLS_AddToStore", "WMLS_GetFromStore", "WMLS_DeleteFromStore", "WMLS_UpdateInStore" }; AbstractWitsmlObject well = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWell(); AbstractWitsmlObject wellbore = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjWellbore(); AbstractWitsmlObject trajectory = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjTrajectory(); AbstractWitsmlObject log = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjLog(); AbstractWitsmlObject fluidsReport = new com.hashmapinc.tempus.WitsmlObjects.v1311.ObjFluidsReport(); AbstractWitsmlObject[][] supportedObjects = { { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport }, { well, wellbore, trajectory, log, fluidsReport}, }; for (int i = 0; i < funcs.length; i++) { cap.put(funcs[i], supportedObjects[i]); } return cap; } DotValve(Map<String, String> config);  DotValve(DotClient client, DotDelegator delegator); @Override String getName(); @Override String getDescription(); @Override String getObjectSelectionCapability(String WMLtypeIn); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<String> getObject(QueryContext qc); static boolean trajHasSearchQueryArgs( QueryContext qc ); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<String> createObject(QueryContext qc); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<Boolean> deleteObject(QueryContext qc); @Override @Async("asyncCustomTaskExecutor") CompletableFuture<Boolean> updateObject(QueryContext qc); @Override void authenticate(String username, String password); Map<String, AbstractWitsmlObject[]> getCap();  }