MMI Collection Browser Media Schema

Out of date

Newest schema mapping is here

Status

This schema is...

 

under review

complete

 

Schema

The following fields determine which image is considered "primary" and if it should be displayed.

Procedure

MMI Field Name

CSpace field name

DB table.field

NXQL table:field

Notes

Required

Media

isPrimary

Is primary (boolean)

media_mmi.isprimary

media_mmi:isPrimary

related media records with a true value are displayed. One per collectionobject record.

Y

 

mediaStatus

Status (URN)

media_mmi.mediastatus

media_mmi:mediaStatus

either display, private. Only records set to display are used. Should never be both private and isPrimary == true

Y

(URN) indicates a field that uses a refname structure to indicate value and metadata for that field. See also /wiki/spaces/collectionspace/pages/666274945.

(boolean) indicates a boolean type field.

Finding media records from a given collectionobject record

The relations service provides the mechanism to find related records of a given type. With a known collectionobject csid, the API call would be

http://cspacetest.collectionspace.org:8180/cspace-services/relations?sbj={{csid}}&objType=MediaTenant42

The objType value is the Media document type for the unique MMI tenant, MediaTenant42.

If only one media record is displayed then it should be considered to be the primary media record.

REST API calls

An API call would follow the following format

Media record information

http://cspacetest.collectionspace.org:8180/cspace-services/media/{{csid}}

Blob content for Media record

http://cspacetest.collectionspace.org:8180/cspace-services/media/{{csid}}/blob

Actual image data (original image image)

http://cspacetest.collectionspace.org:8180/cspace-services/media/{{csid}}/blob/content

Derivative formats

http://cspacetest.collectionspace.org:8180/cspace-services/media/{{csid}}/blob/derivatives/{{Medium||Original||Thumbnail||OriginalJpeg}}/content

Currently, MMI is using small quality and size jpg files as original media content, but larger quality and larger file sized images could be used in the future.
Unless otherwise noted, Medium sized derivatives should be used for the browser.

Get referenced authority records

Append authorityrefs to the API URL for a collectionobject record to get a list of referenced authority records': sourceField, itemDisplayName and refName (in short ID format).

An example API call for authorityrefs for a given media record

http://cspacetest.collectionspace.org:8180/cspace-services/media/bdcaed99-adcd-41cd-99e2/authorityrefs

Media service RESTful API
Common services RESTful API
Relations services RESTful API