public class CommonData extends Object
Common data is meta-data that exists for every top level WITSML type.
Example code to manuipulate common data for a WITSML instance:
// Get a known log from WITSML server WitsmlLog log = witsmlServer.getOne(WitsmlLog.class, new WitsmlQuery(), "L-1234", wellbore); // Get or create common data for the instance CommonData commonData = log.getCommonData(); if (commonData == null) commonData = log.newCommonData(); // Update common data properties commonData.setState(CommonData.State.ACTUAL); commonData.setSource("LQ1 - SideQuence"); commonData.setComments("Log is validated OK."); // Write information back to the server witsmlServer.update(log);
This class is thread-safe. All access operations are guarded by the read/write lock of the containing WitsmlObject parent.
Modifier and Type | Class and Description |
---|---|
static class |
CommonData.State |
Constructor and Description |
---|
CommonData(WitsmlObject owner)
Create a new common data instance for the specified WITSML object.
|
Modifier and Type | Method and Description |
---|---|
String |
getAcquisitionTimeZone()
Return the acquisition time zone of this common data.
|
String |
getComments()
Return the comments of this common data.
|
String |
getServiceCategory()
Return the service category of this common data.
|
String |
getSource()
Return the source of this common data.
|
CommonData.State |
getState()
Return the state of this common data.
|
Date |
getTimeCreated()
Return the time created of this common data.
|
Date |
getTimeUpdated()
Return the time updated of this common data.
|
void |
setAcquisitionTimeZone(String acquisitionTimeZone)
Set the comments of this common data.
|
void |
setComments(String comments)
Set the comments of this common data.
|
void |
setServiceCategory(String serviceCategory)
Set the service category of this common data.
|
void |
setSource(String source)
Set the source of this common data.
|
void |
setState(CommonData.State state)
Set the state of this common data.
|
void |
setTimeCreated(Date timeCreated)
Set the time created of this common data.
|
void |
setTimeUpdated(Date timeUpdated)
Set the time updated of this common data.
|
String |
toString() |
public CommonData(WitsmlObject owner)
TODO: Make non-public. Cleints should call WitsmlObject.newCommonData().
owner
- Parent WITSML object. Non-null.public String getSource()
Corresponds to the WITSML property sourceName
:
An identifier to indicate the data originator. This identifies the server that originally created the object and thus most of the uids in the object (but not necessarily the uids of the parents). This is typically a url.
public void setSource(String source)
Corresponds to the WITSML property sourceName
:
An identifier to indicate the data originator. This identifies the server
that originally created the object and thus most of the uids in the
object (but not necessarily the uids of the parents).
This is typically a url.
source
- The source to set.
May be null indicating absent or unknown.public Date getTimeCreated()
Corresponds to the WITSML property dTimCreation
:
When the data was created at the persistent data store.
public void setTimeCreated(Date timeCreated)
Corresponds to the WITSML property dTimCreation
:
When the data was created at the persistent data store.
timeCreated
- The time created to set.
May be null indicating absent or unknown.public Date getTimeUpdated()
Corresponds to the WITSML property dTimLastChange
:
Last change of any element of the data at the persistent data store. The change time is not updated for a growing object while it is growing.
public void setTimeUpdated(Date timeUpdated)
Corresponds to the WITSML property dTimLastChange
:
Last change of any element of the data at the persistent data store. The change time is not updated for a growing object while it is growing.
timeUpdated
- The time updated to set.
May be null indicating absent or unknown.public CommonData.State getState()
Corresponds to the WITSML property itemState
:
The item state for the data object
public void setState(CommonData.State state)
Corresponds to the WITSML property itemState
:
The item state for the data object
state
- The state to set.
May be null indicating absent or unknown.public String getServiceCategory()
Corresponds to the WITSML property serviceCategory
:
The category of the service related to the creation of the object. For example, "mud log service", "cement service", "LWD service", "rig service", "drilling service". REALTIME STORE UNIQUE KEY: When accessed via the Store Interface, for each instance of realtime, the combination of "uidWell", "uidWellbore", "idSub" and commonData's "serviceCategory" must be unique. That is, the Store Interface will only retain one realtime for a particular wellbore, subscription and service with the REALTIME STORE UNIQUE KEY being the object selector.
public void setServiceCategory(String serviceCategory)
Corresponds to the WITSML property serviceCategory
:
The category of the service related to the creation of the object.
For example, "mud log service", "cement service", "LWD service",
"rig service", "drilling service".
REALTIME STORE UNIQUE KEY: When accessed via the Store Interface,
for each instance of realtime, the combination of "uidWell",
"uidWellbore", "idSub" and commonData's "serviceCategory" must be unique.
That is, the Store Interface will only retain one realtime for a
particular wellbore, subscription and service with the
REALTIME STORE UNIQUE KEY being the object selector.
serviceCategory
- The service category to set.
May be null indicating absent or unknown.public String getComments()
Corresponds to the WITSML property comments
:
Comments and remarks
public void setComments(String comments)
Corresponds to the WITSML property comments
:
Comments and remarks
comments
- The comments to set.
May be null indicating absent or unknown.public String getAcquisitionTimeZone()
Corresponds to the WITSML property acquisitionTimeZone
:
The local time zone of the original acquisition date-time values. It is the deviation in hours and minutes from UTC. The first occurrence should be the actual local time zone at the start of acquisition and may represent a seasonally adjusted value such as daylight savings. The dTim attribute must be populated in the second and subsequent occurrences if the local time zone changes during acquisition. This knowledge is required because the original time zone in a dateTime value may be lost when software converts to a different time zone.
public void setAcquisitionTimeZone(String acquisitionTimeZone)
Corresponds to the WITSML property comments
:
Comments and remarks
acquisitionTimeZone
- The acquisition time zone to set.
May be null indicating absent or unknown.Copyright © 2023 Petroware AS - https://petroware.no