See: Description
JWitsml can be used for:
All WITSML types exists as Java classes in the no.petroware.jwitsml.model package. The classes contains getters and setters for all their properties according to the given WITSML specification.
JWitsml supports WITSML version 1.3, 1.4. and 2.0.
Start working with JWitsml by creating a WitsmlServer
instance that represents the WITSML server in the client program:
Use the// Identify ourself and our capabilities as WITSML client
Capabilities clientCapabilities = new Capabilities(WitsmlVersion.VERSION_1_4_0,
"First And Lastname",
"e-mail@some.org",
"+12 34 56 789",
"Description",
"Application Name",
"Vendor",
"Version Number");
// Establish URL to the server
URL url = new URL("http://path/to/witsml/server");
// Create the WITSML server instance
WitsmlServer witsmlServer = new WitsmlServer(url, "userName", "password",
clientCapabilities);
WitsmlServer
instance to
create, read, update or delete
(CRUD) real-time data.
Example 1: Reading WITSML data:
// Get all wells from the server
List<WitsmlWell> wells = witsmlServer.get(WitsmlWell.class, new WitsmlQuery());
// Get all wellbores of a given well
List<WitsmlWellbore> wellbores = witsmlServer.get(WitsmlWellbore.class, new WitsmlQuery(), well);
// Get all trajectories for a given wellbore
List<WitsmlTrajectory> trajectories = witsmlServer.get(WitsmlTrajectory.class, new WitsmlQuery(), wellbore);
// Get a specific wellbore from the server
WitsmlWellbore wellbore = witsmlServer.getOne(WitsmlWellbore.class, new WitsmlQuery(), "WB-1234", well);
// Get only the name of a known well, and then query for more properties later
WitsmlQuery q1 = new WitsmlQuery();
q1.includeElement("name")
WitsmlWell well = witsmlServer.getOne(WitsmlWell.class, q1, "W-1234");
WitsmlQuery q2 = new WitsmlQuery();
q2.includeElement("field");
q2.includeElement("block");
witsmlServer.refresh(well, q2);
Example 2: Adding WITSML data:
// Add a new rig instance to the server
WitsmlRig rig = witsmlServer.newInstance(WitsmlRig.class, "my rig", wellbore);
rig.setType(WitsmlRig.Type.JACKUP_RIG);
rig.setOwner("BP");
:
witsmlServer.add(rig);
Example 3: Updating WITSML data:
// Get a known tubular instance, modify it and write it back to the server
WitsmlTubular tubular = witsmlServer.getOne(WitsmlTubular.class, new WitsmlQuery(), "T-1234", wellbore);
tubular.setType(WitsmlTubular.Type.CORING);
tubular.setHoleDiameter(new Value(8.2, "in"));
tubular.setNuclearTool(false);
witsmlServer.update(tubular);
Example 4: Deleting WITSML data:
// Delete a known BHA run from the server
WitsmlBhaRun bhaRun = witsmlServer.getOne(WitsmlBhaRun.class, new WitsmlQuery(), "B-679", wellbore);
witsmlServer.delete(bhaRun);
Copyright © 2023 Petroware AS - https://petroware.no