3.3.17.3 Record: Resource

Topic Version1Published10/31/2016
For StandardETP v1.1

Data structure for resource descriptions. The structure is actually a meta-object, not the resource itself. It is primarily used by the Discovery protocol to provide information about the contents of a server or store.

The URI provides the identification of the referenced object; the name is a human-readable string for a user interface.

Avro Schema

{

      "type": "record",

      "namespace": "Energistics.Datatypes.Object",

      "name": "Resource",

      "fields":

     [

         { "name": "uri", "type": "string" },

         { "name": "contentType", "type": "string" },

         { "name": "name", "type": "string" },

         { "name": "channelSubscribable", "type": "boolean" },

         { "name": "customData", "type": { "type": "map", "values": "string" } },

         { "name": "resourceType", "type": "string" },

         { "name": "hasChildren", "type": "int" },

         { "name": "uuid", "type": ["null", "string"] },

         { "name": "lastChanged", "type": "long" },

         { "name": "objectNotifiable", "type": "boolean" }

     ]

}

Attribute

Description

Data Type

Min

Max

uri

A URI for the referenced object. It is understood that the supplier of this URI can de-reference it as a data object, or as some other kind of resource irrespective of the string contents of the URI. Specifically:

  • If the resource points to channels (i.e., it is a channel or the parent of many channels), then this URI could be passed to ChannelDescribe to get more information about those channels.
  • If the resource points to a static data object (i.e., resourceType == DataObject), then it could be passed to the Store protocol to get/put or delete that object.

string

1

1

contentType

Provides the application with the information needed to deserialize the referenced resource. In the case of a data object, this field is a string that that conforms to the ContentType as defined the Energistics ID Specification. For example:

"application/x-resqml+xml;version=2.0;type=TectonicBoundaryFeature"

"application/x-witsml+xml;version=2.0;type=part_TrajectoryStation"

Per the Energsitics Identifier Specification, the only part of this string that is case-sensitive is the text after “type=”.

string

1

1

name

A human-readable name for the object. There is no expectation of uniqueness or any particular semantic for this value.

string

1

1

channelSubscribable

Indicates that this resource is the source of one or more channels for Protocol 1. Specifically, the URI in this record can be sent in the ChannelDescribe message with an expectation of receiving one or more channels.

boolean

1

1

customData

A key-value map of custom data about the resource. Both the key and the values are strings. Currently, there are no defined semantics for either key names or values.

string

0

n

resourceType

A level above Energistics data objects. Because discovery contains meta information about stores, it returns resource records that don't refer specifically to static data objects in the store. The following are defined as supported values for the resourceType field (the strings are case insensitive):

  • DataObject: Refers to a single data object in one of the Energistics specifications. It can thus be retrieved/altered or deleted by the Object protocol.
  • UriProtocol: The root for a well-known URI procotol. The details of any given URI protocol are generally part of a data specification and are outside the scope of ETP itself. For example, if an agent passes the string “eml://” to the Discovery protocol, the response MUST return:

{

     uri: "eml://witsml20",

     resourceType: "UriProtocol"

     name: "WITSML 2.0 Store"

}

  • Folder: The returned node is a container for other nodes. If the resource is of type Folder, then the folder's direct children MUST be of the same contentType as the folder, or must be other folders. For example, the URI "eml://witsml20" might return something like the following, which indicates that all of the children of this node are of type well data objects or other folders, such as wellbore:

{

     resourceType: "Folder"

     name: "Wells"

     uri: "eml://witsml20/well"

     contentType: "application/x-witsml+xml;version=2.0;type=Well"

}

string

1

1

hasChildren

Indicates that the node has children. The semantic of "may have children" is not conveyed here, but it is intrinsic in the definition of the node types. For example, if the node is a well, an application would be expected to understand that it potentially has children that are wellbores.

This value is one of the following:

  • -1 (child count is unknown)
  • 0 (no children)
  • a positive integer (the count of children)

int

1

1

uuid

When the resource is an Energistics data object, then this is the UUID of the object. This must be a UUID as specified by RFC 4122 (https://www.ietf.org/rfc/rfc4122.txt ). The UUID MUST be formatted as a string, in the form commonly known as "Windows Registry format", without the enclosing curly braces. Example:

65CCC68E-C0B4-454E-8757-3284F94AE861

string

0

1

lastChanged

The date and time of the last change to this object, on the supplying store/provider.

long

1

1

objectNotifiable

Indicates that this resource's URI can be used as the input to the StoreNotification NotificationRequest message.

boolean

1

1