5.2 Object References
|For Standard||EID v4.0|
It is often necessary for one data object to make a reference to another, without including all of the detailed information about the referenced object. In this instance, although the UUID is sufficient to uniquely identify the object, additional fields about the referenced object are included. These fields can be derived from the highlighted fields in the above figure. The XML snippet below shows how a wellbore interpretation references its parent well feature in RESQML.
<?xml version="1.0" encoding="UTF-8"?> <resqml:WellboreInterpretation
xmlns:xsi=” http://www.w3.org/2001/XMLSchema-instance ”
xmlns:resqml=” http://www.energistics.org/energyml/data/resqmlv2 ”
schemaVersion=" v2.0" uuid="79D94D70-401D-4E6D-B18A-BC744EE74E03"> <Citation> <Title>Wellbore A-2</Title> <Originator>William McKenzie</Originator> <Creation>2001-12-17T09:30:47Z</Creation> <Format>companyA/MyStructuralModeler</Format> </Citation> <resqml:Domain>depth</resqml:Domain> <resqml:InterpretedFeature xsi:type="eml:DataObjectReference"> <ContentType>application/x-resqml+xml;version=2.0;type=WellboreFeature </ContentType> <Title>Wellbore A-2</Title> <UUID>F2889E68-3DB3-459C-ABDD-1FBB5C1DC5BF</UUID> <UuidAuthority>witsml.acme.com</UuidAuthority> <VersionString>2014-09-11T10:46:30Z</VersionString> </resqml:InterpretedFeature> <resqml:IsDrilled>true</resqml:IsDrilled> </resqml:WellboreInterpretation>
Some comments on the above reference:
- The UUID is required and is the uuid attribute of any AbstractObject-derived class.
- The Title is required and is intended to provide a human-readable name for the data object. It is the equivalent of the nameWell and nameWellbore fields in older versions of WITSML. There is no assumption that the title is unique.
- The actual type of the reference object is DataObjectReference, and it is located in the ObjectReference package of Energistics common.
- The required ContentType field indicates the XML type of the referenced data object. The information in this field makes easy to reference data objects from a different ML (i.e., RESQML referencing a WITSML object) and of a specific version. If the application/x-resqml+xml;version=2.0; portion of the ContentType is missing, it is considered to be the same as the content type of the enclosing document. So, in the above example, the ContentType could just contain type=WellboreFeature, as long as the enclosing document was also a RESQML v2.0+ document.
- The UuidAuthority is optional, and, similarly, if missing is assumed to be the same as the authority for the enclosing document. In the case of a Simple Object Access Protocol (SOAP) or Energistics Transfer Protocol (ETP) service, you can usually assume that the authority for a given object is the server/client with which you are communicating. However, by including this value, it is possible for one data object to refer to a data object on another server. Note that the authority may look like a Web address, but it is not one. It is up to clients and servers to arrange for the mapping from authority to an address.
- The VersionString is optional and is used to designate a version of this specific data object instance. Use of VersionString is a performance optimization feature that allows clients to effectively cache potentially very large data objects from a server and only request a new one when changes have been made. In the example above, a date-time string has been used as the version, but use of VersionString is entirely up to the person/team implementing this spec. From a client’s perspective, the only thing that matters is if the string is different. Also note that this feature was conceived for RESQML, where many transfers occur by disk. In the context of an ETP session, the use of the Notify protocol would eliminate the need for this value.