IBM TRIRIGA Application Platform Version 3.5.0

OSLC binary data processing

OSLC clients can query and update binary data by using the OSLC API.

OSLC supports the following two types of binary data:
  • TRIRIGA® binary data is stored in the dm_content table. Each data element has a unique content ID, a file name, and a MIME type for data rendering. The binary field contains the content ID.
  • Image data is stored as image files. The image field contains a partial path to the image file.

Querying binary data

When binary data is retrieved through an OSLC query or record details page, the values are presented with an URI. The following example shows a URI with the binary data information:
http://yourserver/oslc/so/supApp/168867/tririga:supBinary

The client can use the URI to retrieve the actual data. In the HTTP response of the URI, the body contains the content that is read from the content field of the dm_content table. The Content-Type header contains the MIME type of the binary data.

Similarly, when image data is retrieved through an OSLC query or record details page, the values are presented with an URI. The following example shows a URI with the image information

http://yourserver/oslc/so/supApp/168867/tririga:supImage

The client can use the URI to retrieve the actual image. In the HTTP response of the URI, the body contains the image that is read from the image file. The Content-Type header is a MIME type that is composed of the string image/ plus the extension of the image file.

Updating binary data

You use a separate HTTP request to update each binary or image property. The following example shows the format of a request to update binary or image data:

http://localhost:8001/oslc/so/soID/property

In the example, soID is the ID of the smart object that the binary or image property belongs to. The property identifies the binary or image property that the value is set to. It takes the regular property form of prefix:sectionName-propertyName, where sectionName is optional.

The HTTP PUT method is used, and the content-type of the HTTP header contains the MIME type of the data, as follows:

  • For binary properties, the MIME type that is passed in from the content-type header is carried over to the MIME type of the data. You can pass in a file name through the optional Slug header.
  • For image properties, the content-type must be image type. The type is the format of the image, such as PNG or JPG. The file name is generated and the image type is used as the file extension.


Feedback