MMI Collection Browser Object Schema for 2.6

Status

This schema is...

 

under review

 

complete

Browser Schema

Procedure

MMI Field name

CSpace field name

DB table.field

NXQL table:field

search
API

updated

Cataloging

Label

Caption

collectionobjects_mmi.caption

collectionobjects_mmi:caption

@

 

Accession number

Object Number

collectionobjects_common.objectnumber

collectionobjects_common:objectNumber

@

 

 

Description

Distinguishing Features

collectionobjects_common.distinguishingfeatures

collectionobjects_common:distinguishingFeatures

@

 

 

Collection category

Responsible Department (RF)(CL)

collectionobjects_common_responsibledepartments.item

collectionobjects_common:responsibleDepartments

@

 

 

Artifact Class

Artifact Class (URN)

collectionobjects_mmi.artifactclass

collectionobjects_mmi:artifactClass

@

 

Work Type

Work Type (URN)

collectionobjects_mmi.worktype

collectionobjects_mmi:workType

@

 

Overall dimensions

Dimension summary

measuredpartgroup.dimensionsummary

collectionobjects_common:measuredPartGroupList/0/dimensionSummary

@

 

 

Creation date

Display date

structureddategroup.datedisplaydate

collectionobjects_common:objectProductionDateGroupList/*/dateDisplayDate

@

 

 

 

Date association (URN)

structureddategroup.dateassociation

collectionobjects_common:objectProductionDateGroupList/*/dateAssociation

@

 

 

Material

Material (RF) (URN)

collectionobjects_mmi_mmimaterials.item .pos

collectionobjects_mmi:mmiMaterials

@

 

Authority: Content Entities

Content organization (RG)

shares the table name
contententitygroup

shares the table name
collectionobjects_mmi

 

 

 

 

Content entity (URN)

  .contententity

  :contentEntityList/*/contentEntity

@

 

 

 

Content entity type (CL)

  .contententitytype

  :contentEntityList/*/contentEntityType

@

 

 

Authority: Content Works

Content works (RG)

shares the table name
contentworkgroup

shares the table name
collectionobjects_mmi

 

 

 

Content work (URN)

  .contentwork

  :contentWorkList/*/contentWork

@

 

 

Content work type (CL)

  .contentworktype

  :contentWorkList/*/contentWorkType

@

 

Authority: Object Production Entities

Object Production Entity (RG)

shares the table name
objprodentitygroup

shares the table name
collectionobjects_mmi

 

 

 

Object production entity (URN)

  .objprodentity

  :objProdEntityList/*/objProdEntity

@

 

 

Object production role (CL)

  .objprodentityrole

  :objProdEntityList/*/objProdEntityRole

@

Acquisition

Credit line

Credit Line

acquisitions_common.creditline

 

 

 

Location

Current location

Current location (URN)

movements_common.currentlocation

movements_common:currentLocation

 

 


Old schema

Procedure

MMI Field name

CSpace field name

DB table.field

NXQL table:field

Link to search?

link

updated

Cataloging

Label

Brief Description (RF)

collectionobjects_common_briefdescriptions.item .pos

collectionobjects_common:briefDescriptions

N

 

 

 

Description

Distinguishing Features

collectionobjects_common.distinguishingfeatures

collectionobjects_common:distinguishingFeatures

N

 

 

 

Content remarks

Inscription Content (RF)

collectionobjects_mmi_mmiinscriptioncontents.item .pos

collectionobjects_mmi:mmiInscriptionContents

N

 

 

 

Accession number

Object Number

collectionobjects_common.objectnumber

collectionobjects_common:objectNumber

N

 

 

 

Collection category

Responsible Department (RF)(CL)

collectionobjects_common_responsibledepartments.item

collectionobjects_common:responsibleDepartments

Y

 

 

 

Artifact class/ Work type (Categories)

Artifact class/ Work type (RG)

shares the table name artifactclassworktypegroup

shares the table name collectionobjects_mmi

 

 

 

Artifact Class

Artifact Class

collectionobjects_mmi.artifactclass

collectionobjects_mmi:artifactClass

Y

 

 

Work Type

Work Type

collectionobjects_mmi.worktype

collectionobjects_mmi:workType

Y

 

 

Dimensions

Dimensions (component)

 

shares the table name
collectionobjects_common

N

 

 

 

 

Dimension summary

measuredpartgroup.dimensionsummary

  :measuredPartGroupList/*/dimensionSummary

 

 

 

 

 

Measured part

measuredpartgroup.measuredpart

  :measuredPartGroupList/*/measuredPart

 

 

 

 

 

Value date (date)

dimensionsubgroup.valuedate

  :measuredPartGroupList//dimensionSubGroupList//valueDate

 

 

 

 

 

Measurement unit

dimensionsubgroup.measurementunit

  :measuredPartGroupList//dimensionSubGroupList//measurementUnit

 

 

 

 

 

Value (integer)

dimensionsubgroup.value

  :measuredPartGroupList//dimensionSubGroupList//value

 

 

 

 

 

Value qualifier (integer)

dimensionsubgroup.valuequalifier

  :measuredPartGroupList//dimensionSubGroupList//valueQualifier

 

 

 

 

Extent

Number of Objects (integer)

collectionobjects_common.numberofobjects

collectionobjects_common:numberOfObjects

N

 

 

 

Attribute: Format

Physical Description

collectionobjects_mmi.formats

collectionobjects_mmi:formats

N

 

 

Attribute: Technique

Technique (RF)

collectionobjects_mmi_mmitechniques.item .pos

collectionobjects_mmi:mmiTechniques

N

 

 

 

Attribute: Dimensions

Dimensions (component)

same as before?

 

N

 

 

 

Attribute: Display date

Production Date (component)

shares the table name
structureddategroup

shares the table name
collectionobjects_common

N

 

 

 

 

Display date

.datedisplaydate

  :objectProductionDateGroupList/*/dateDisplayDate

 

 

 

 

 

Association (URN)

.dateassociation

  :objectProductionDateGroupList/*/dateAssociation

 

 

 

 

 

dateEarliestScalarValue (date)

.dateearliestscalarvalue

  :objectProductionDateGroupList/*/dateEarliestScalarValue

 

 

 

 

 

dateLatestScalarValue (date)

.datelatestscalarvalue

  :objectProductionDateGroupList/*/dateLatestScalarValue

 

 

 

 

Attribute: Materials

Material (RF) (CL)

collectionobjects_mmi_mmimaterials.item .pos

collectionobjects_mmi:mmiMaterials

N

 

 

 

Attribute: Components

Object component name (RG)

shares the table name
objectcomponentgroup

shares the table name
collectionobjects_common

N

 

 

 

 

Object component name

  .objectcomponentname 

  :objectComponentGroupList/*/objectComponentName

 

 

 

 

 

Object component information

  .objectcomponentinformation

  :objectComponentGroupList/*/objectComponentInformation

 

 

 

 

Authority: Associated Entities

Associated organization (RG)

shares the table name assocorganizationgroup

shares the table name collectionobjects_common

Y

 

 

 

Associated organization (URN)

  .assocorganization

  :assocOrganizationGroupList/*/assocOrganization

 

 

 

 

 

Associated organization type (CL)

  .assocorganizationtype

  :assocOrganizationGroupList/*/assocOrganizationType

 

 

 

 

 

Associated organization note

  .assocorganizationnote

  :assocOrganizationGroupList/*/assocOrganizationNote

 

 

 

 

Authority: Associated Productions

Associated production (RG)

shares the table name assocproductiongroup

shares the table name collectionobjects_mmi

Y

 

 

 

Associated production (URN)

  .assocproduction 

  :assocProductionList/*/assocProduction

 

 

 

 

 

Associated production type (CL)

  .assocproductiontype

  :assocProductionList/*/assocProductionType

 

 

 

 

 

Associated production note

  .assocproductionnote 

  :assocProductionList/*/assocProductionNote

 

 

 

 

Authority: Associated Publications

Associated publication (RG)

shares the table name assocpublicationgroup

shares the table name collectionobjects_mmi

Y

 

 

 

Associated publication (URN)

  .assocpublication

  :assocPublicationList/*/assocPublication

 

 

 

 

 

Associated publication type (CL)

  .assocpublicationtype

  :assocPublicationList/*/assocPublicationType

 

 

 

 

 

Associated publication note

  .assocpublicationnote

  :assocPublicationList/*/assocPublicationNote

 

 

 

 

Authority: Production Entities

Production organization (RG)

shares the table name objectproductionorganizationgroup

shares the table name collectionobjects_common

Y

 

 

 

Production organization (URN)

  .objectproductionorganization

  :objectProductionOrganizationGroupList/*/objectProductionOrganization

 

 

 

 

 

Production role (CL)

  .objectproductionorganizationrole

  :objectProductionOrganizationGroupList/*/objectProductionOrganizationRole

 

 

 

 

Authority: Content Entities

Content organization (RG)

shares the table name
contententitygroup

shares the table name
collectionobjects_mmi

Y

 

 

 

 

Content entity (URN)

  .contententity

  :contentEntityList/*/contentEntity

 

 

 

 

 

Content entity type (CL)

  .contententitytype

  :contentEntityList/*/contentEntityType

 

 

 

 

 

Content entity note

  .contententitynote

  :contentEntityList/*/contentEntityNote

 

 

 

Authority: Content Works

Content works (RG)

shares the table name
contentworkgroup

shares the table name
collectionobjects_mmi

Y

 

 

 

Content work (URN)

  .contentwork

  :contentWorkList/*/contentWork

 

 

 

 

Content work type (CL)

  .contentworktype

  :contentWorkList/*/contentWorkType

 

 

 

 

Content work note

  .contentworknote

  :contentWorkList/*/contentWorkNote

 

 

 

Authority: Object Production Entities

Object Production Entity (RG)

shares the table name
objprodentitygroup

shares the table name
collectionobjects_mmi

Y

 

 

 

Object production entity (URN)

  .objprodentity

  :objProdEntityList/*/objProdEntity

 

 

 

 

Object production entity type (CL)

  .objprodentitytype

  :objProdEntityList/*/objProdEntityType

 

 

 

 

Object production entity note

  .objprodentitynote

  :objProdEntityList/*/objProdEntityNote

 

 

 

Authority: Groups (collection subsets)

need to add

 

 

Y

 

 

Acquisition

Credit line

Credit Line

acquisitions_common.creditline

 

N

 

 

Location

Current location

Current location (URN)

movements_common.currentlocation

movements_common:currentLocation

N

 

 


The fields marked (RF) describe the NXQL format that will search through all elements of that repeatable field. To limit the search to the primary value then append /0 to the field name, e.g. collectionobjects_mmi:mmiTechniques/0

Likewise, fields marked (RG) describe repeatable groups of fields. The underlying fields are shown with a wildcard in the field path to indicate that such an search term is required for the NXQL query string to return without a syntax error. The wildcard can be replaced with a 0 to indicate the primary value of that field should be only be searched upon.

The fields marked (CL) describe a field that is a controlled list (HTML select element). The returned value is a non-spaced string. Please see Controlled List mapping for a mapping of controlled list strings to displayed values.

(date) indicates a PostgreSQL "timestamp without time zone" type field and requires a DATE or TIMESTAMP literal in the NXQL notation. For instance, in non-URL encoded form:
collectionobjects_common:measuredPartGroupList//dimensionSubGroupList//valueDate <= DATE  '2012-01-09' or
collectionobjects_common:measuredPartGroupList//dimensionSubGroupList//valueDate <= TIMESTAMP  '2012-01-09T00:00:00'
See also Common Services REST API documentation and NXQL documentation.

(integer) indicates a field integer type.

(URN) indicates a field that uses a refname structure to indicate value and metadata for that field. See also refname.

Searching through a range of values using text based fields

The following is not the preferred form. Please see searching scalar values below.

NXQL supports the BETWEEN operator to search through a range of numerical or text values.

An example

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common/physicalDescription BETWEEN 'g' AND 'h'

Another example for a simple range of displayDate values for 1950's

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common/objectProductionDateGroupList/*/dateDisplayDate BETWEEN '%1950%' AND '%1959%'

BETWEEN doesn't give expected results when the displayDate value is in any format other than strictly numerical. Values like "stamped 1934", "Jan 1973, Feb 1973", "ca. 1922", "Feb-May, Dec 1975" and "February, 1934" are not found when bounding the BETWEEN operator between two numerical values.

Searching through a range of scalar date values for a structured date field

The structured date field type is a group of related fields which give greater definition of a date, range and certainty.

Searching through a range of dates for a structured date requires using the dateEarliestScalarValue and dateLatestScalarValue scalar fields of the structured date group.
These fields contain a postgres TIMESTAMP value in the form of YYYY-MM-DDThh:mm:ss where T is an indicator of a timestamp, e.g. 2012-03-27T11:23:00. the API will also accept queries using a DATE literal and internally convert to/from TIMESTAMP.

All scalar dates are saved in postgres with a lower bound time stamp, dateEarliestScalarValue, of T00:00:00 and a higher bound time stamp, dateLatestScalarValue, of T23:59:59.
An important fact about scalar dates in this context is that CollectionSpace modifies the saved postgres timestamp value by the server's timezone. This means the postgres scalar values are effectively 5 hours behind (NYC being UTC -5, ignoring DST) in CollectionSpace. This impacts the way in which DATE or TIMESTAMP ranges are calculated using the REST API.

For example, say there is a search for all dates from 1954.
Using the DATE literal, rather than search from a lower bound of 1954-01-01 and a higher bound of 1954-12-31, there would be a recalculated search from 1953-12-31 up through 1955-01-01.
Using the TIMESTAMP literal, the range search would take into consideration the server timezone (non DST value) and recalculate based on that value. The updated query would have a range from 1953-12-31T19:00:00 up through 1954-12-31:19:00:00.

Example API call

DATE
non url-encoded

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common:objectProductionDateGroupList/0/dateEarliestScalarValue >= DATE "1953-12-31" AND collectionobjects_common:objectProductionDateGroupList/0/dateLatestScalarValue <= DATE "1955-01-01"

url-encoded

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common%3aobjectProductionDateGroupList%2F0%2FdateEarliestScalarValue++>%3D++DATE++%221955-01-01%22++AND++collectionobjects_common%3aobjectProductionDateGroupList%2F0%2FdateLatestScalarValue++<%3D++DATE++%221955-01-01%22

TIMESTAMP
non url-encoded

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common:objectProductionDateGroupList/0/dateEarliestScalarValue >= TIMESTAMP "1953-12-31T19:00:00" AND collectionobjects_common:objectProductionDateGroupList/0/dateLatestScalarValue <= TIMESTAMP "1954-12-31T19:00:00"

url-encoded

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_common%3aobjectProductionDateGroupList%2F0%2FdateEarliestScalarValue++%3E%3D++TIMESTAMP++%221953-12-31T19:00:00%22++AND++collectionobjects_common%3aobjectProductionDateGroupList%2F0%2FdateLatestScalarValue++%3C%3D++TIMESTAMP++%221954-12-31T19:00:00%22

Other parameters

Description

NXQL string

DB string

API query string

Required

is record status completed and publishable?

collectionobjects_common.recordStatus

collectionobjects_common.recordstatus = "completedpublish"

AND collectionobjects_common:recordStatus = 'completedpublish'

Y

is object record deleted?

CSpace specific flag

misc.lifestylestate <> 'deleted'

&wf_deleted=false

Y

sort by

CSpace specific flag

ORDER BY collectionspace_core.updatedat

&sortBy=collectionspace_core:updatedAt

N

show only objects from a specific tenant

implied

collectionspace_core.tenantid=42

implied

Y

Sample URL query

URL encoded query string using the above parameters:

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects?as=collectionobjects_mmi%3Acaption++ILIKE++%27%25that%20royle%20girl%25%27++AND++collectionobjects_common%3ArecordStatus+%3d+%27completedpublish%27&sortBy=collectionspace_core%3AupdatedAt&wf_deleted=false

Non-encoded URL

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects
?as=collectionobjects_common:captions ILIKE '%that royle girl%'
AND collectionobjects_common:recordStatus = 'completedpublish'
&sortBy=collectionspace_core:updatedAt
&wf_deleted=false

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 collectionobject record

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects/24200004-47d3-45b0-b9c2-1ad79e1580af/authorityrefs

REST API query payload columns returned

The following columns are returned from an API query call to the collectionobject service

csid|uri|updatedAt|workflowState|objectNumber|objectName|title|responsibleDepartment|caption

caption is used for the browser search results listing page. The related thumbnail image requires a separate call to the relationship service. (See below for additional details.)

Finding related procedural records using the Relationship service

The relations service provides the mechanism to find related procedural records of a given type. The syntax for this service API uses subject and object query parameters to denote the relationship direction.

The full list of query terms:
sbj = used to specify the subject's CSID
sbjType = used to specify the document type of the subject

obj = used to specify the object's CSID
objType = used to specify the document type of the object

With a specific csid and a general objType the API call would be

http://collectiontest.movingimage.us:8180/cspace-services/relations?sbj={{csid}}&objType={{docType}}

Where the document type, docType, value is could be one of the following:

  • Media
  • Movement
  • Collection object

Example

http://collectiontest.movingimage.us:8180/cspace-services/relations?sbj=24200004-47d3-45b0-b9c2-1ad79e1580af&objType=Media

Chaining multiple record calls using the OR operator

The benefit of the relations service is receiving a single payload that contains refNames or CSIDs of all the related records. Typically, from here it is necessary to make one API call for every refName/CSID received since no other supporting information is returned for a related record, since only a few fields are listed in the query results. This can be unwieldy if there are dozens of refNames/CSIDs to fetch. Here the OR operator can be used to 'chain' together multiple calls to the same procedure.

Example 1

We want to grab additional information for each referenced person authority record for a given object record. We know that the person authority service has additional fields we can use from the list type in the results page.

First, the following collectionobjects service API call is made to find all the related authorities for a given CollectionObject.

http://collectiontest.movingimage.us:8180/cspace-services/collectionobjects/24200004-47d3-45b0-b9c2-1ad79e1580af/authorityrefs

The xml list returns something like this abbreviated payload (excluding non-person authorities and using xpath authority-ref-item/)

...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc21)'Paramount Pictures'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc22)'W. C. Fields'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc96)'D. W. Griffith'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc102)'Harrison Ford'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc288)'Famous Players-Lasky Corporation'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc463)'James Kirkwood'</refName>
    ...
    <refName>urn:cspace:movingimage.us:personauthorities:name(person):item:name(oc907)'Carol Dempster'</refName>
...

Next, instead of seven different calls to the person authority service we can construct one API call using the unique portion of the refName string given above.

http://collectiontest.movingimage.us:8180/cspace-services/personauthorities/urn:cspace:name(person)/items?as=
persons_common:refName ILIKE '%(oc21)%'
OR persons_common:refName ILIKE '%(oc22)%' 
OR persons_common:refName ILIKE '%(oc96)%' 
OR persons_common:refName ILIKE '%(oc102)%'
OR persons_common:refName ILIKE '%(oc288)%' 
OR persons_common:refName ILIKE '%(oc463)%'
OR persons_common:refName ILIKE '%(oc907)%'

This list shows us the list type fields for each of the seven person authority records we listed.

Example 2

From a list of multiple related media records we want to find the record with a isPrimary flag enabled. We know the media service has the isPrimary field as a list type in the results page so we just need to get a list of all related media records from the media service.

First, the following relations service API call is made to find all the related Media records for a given CollectionObject.

http://collectiontest.movingimage.us:8180/cspace-services/relations?sbj=762eaca8-b274-4ea3-911c-9937fe0dd513&objType=Media

The xml list returns something like this abbreviated payload in the following (using xpath relation-list-item/object/)

...
    <csid>c7f6e3c7-3ac1-4237-9ddc-91f98f56a9d6</csid>
    ...
    <csid>152eaaf2-b31b-4ad3-a17c-4edfbeab1b0d</csid>
    ...
    <csid>d2c53cff-aa77-47de-9bf1-5eecda3db566</csid>
    ...
    <csid>c37a5433-f3e7-4dfa-b9ed-c29a48e88d5d</csid>
...

Next, instead of five separate API calls to the media server we can construct one API call using the CSIDs given above. We can use a special CSpace/Nuxeo NXQL property to search by CSIDs: ecm:name.

http://collectiontest.movingimage.us:8180/cspace-services/media?as=
ecm:name='c7f6e3c7-3ac1-4237-9ddc-91f98f56a9d6'
OR ecm:name='152eaaf2-b31b-4ad3-a17c-4edfbeab1b0d'
OR ecm:name='d2c53cff-aa77-47de-9bf1-5eecda3db566'
OR ecm:name='c37a5433-f3e7-4dfa-b9ed-c29a48e88d5d'

This list shows us which media records has the isPrimary set to true.

Filtering

Filtering the search results requires the use of the Relationship service in order to access a related record's field value.

Filter by objects on exhibit

The Movement service manages information around the movement of a CollectionObject - an instance of location change. This includes location changes resulting from movements between storage locations, such as between rooms or shelves.
There are a few location areas that represent exhibition areas of MMI. These locations include any currentLocation authority URN value that contains BTS, CHX or AMP.

BTS has multiple values and any will match this filter, e.g. BTS:3:8:4.
AMP will not match any current records but has the potential to in the future.

To find the current location of a CollectionObject, the following Relation API call can be made

http://collectiontest.movingimage.us:8180/cspace-services/relations?sbj={{csid}}&objType=Movement

One* or more related movement records will be returned.

Unfortunately, there is no way to request movement record's currentLocation column value in the Relation service payload, which would aid in quickly filtering by the location authority value. Each movement record returned will need to be examined.
Using the chaining API call listed above, it will be possible to quickly filter by list-type column values.

Additionally, some CollectionObject records may have more than one related movement record. Only the most recent movement record should be used and this is determined by comparing the locationDate value of each.

* It's possible that there will not be a related movement record returned if in case the physical object cannot be found! This should be a rare occurrence in any collection.

Filter by records with images

This is identical to how thumbnails are retrieved for CollectionObjects.

http://collectiontest.movingimage.us:8180/cspace-services/relations?sbj={{csid}}&objType=Media

Only media records with a mediaStatus value of display will be shown for this filter.

Controlled List mapping

Collection category / Responsible department

link

Controlled list string

Display string

notyetassigned

Not yet assigned

distribution

Distribution

exhibition

Exhibition

industryasawhole

Industry (as a whole)

marketing

Marketing

merchandising

Merchandising

production

Production

reception

Reception

worksofart

Works of art

Content entity type

link

Controlled list string

Display string

depicts

is depicted by the object

references

is referenced by the object

seealso

see also

Content work type

link

Controlled list string

Display string

depicts

is depicted by the object

isfrom

is from the object

issueof

is an issue of the object

references

is referenced by the object

Object Production entity type

link

Controlled list string

Display string

designer

is a designer of the object

distributor

is a distributor of the object

licensor

is a licensor of the object

illustrator

is an illustrator of the object

manufacturer

is a manufacturer of the object

producer

is a producer of the object

publisher

is a publisher of the object

owner

is an owner of the object

authorwriter

is an authorwriter of the object

exhibitor

is an exhibitor of the object

performer

is a performer of the object

signitor

is a signitor of the object

/wiki/spaces/collectionspace/pages/666273449
CollecitonObject RESTful API
Common services RESTful API
Media service RESTful API
Relation service RESTful API