Note | ||
---|---|---|
| ||
Newest schema mapping is here |
Status
This schema is... |
|
---|---|
under review |
|
complete |
|
...
Procedure | MMI Field name | CSpace field name | DB table.field | NXQL table:field | Link to search? |
---|---|---|---|---|---|
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 | shares the table name |
|
| Artifact Class | .artifactclass | :artifactClassWorkTypeList/*/artifactClass | Y | |
| Work Type | .worktype | :artifactClassWorkTypeList/*/workType | Y | |
| Dimensions | Dimensions (component) |
| shares the table name | 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_common.physicaldescription | collectionobjects_common:physicalDescription | 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 | shares the table name | 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 | shares the table name | N |
|
| Object component name | .objectcomponentname | :objectComponentGroupList/*/objectComponentName |
|
|
| Object component information | .objectcomponentinformation | :objectComponentGroupList/*/objectComponentInformation |
|
| Authority: Associated Entities | Associated organization (RG) | shares the table name | shares the table name | 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 | shares the table name | 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 | shares the table name | 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 | shares the table name | Y |
|
| Production organization (URN) | .objectproductionorganization | :objectProductionOrganizationGroupList/*/objectProductionOrganization |
|
|
| Production role (CL) | .objectproductionorganizationrole | :objectProductionOrganizationGroupList/*/objectProductionOrganizationRole |
|
| Authority: Content Entities | Content organization (RG) | shares the table name | shares the table name | Y |
|
| Content entity (URN) | .contententity | :contentEntityList/*/contentEntity |
|
|
| Content entity type (CL) | .contententitytype | :contentEntityList/*/contentEntityType |
|
| 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
...
(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.
...
Code Block |
---|
url-encoded http://cspacetest.collectionspace.org: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
...
...
In progress
Description | NXQL string | DB string | API query string | Required | |
---|---|---|---|---|---|
is record status completed and publishable? | collectionobjects_common.recordStatus | | | Y | |
is object record deleted? | | | Y | ||
sort by | | | N | ||
show only objects on exhibit | to do | to do |
| N | |
show only records with images | to do | to do |
|
| |
show only objects from a specific tenant | from a specific tenant | implied | | implied | Y |
...
Code Block | ||||
---|---|---|---|---|
| ||||
http://cspacetest.collectionspace.org:8180/cspace-services/collectionobjects ?as=collectionobjects_common:distinguishingFeatures ILIKE 'Foo%' AND collectionobjects_common:recordStatus = 'completedpublish' &sortBy=collectionspace_core:updatedAt &wf_deleted=false |
REST API query payload columns returned
The following columns are returned from an API query call to the collectionobject service
csid|uri|updatedAt|objectNumber|objectName|title|responsibleDepartment|briefDescriptions
briefDescriptions
is used for the browser search results listing page. The related thumbnail image requires a separate call to the relationship service. (See section below for additional details.)
Note |
---|
|
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
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/collectionobjects/a7fdba4a-ec23-472c-9c45-47249aa3242d/authorityrefs
|
Finding related media records from a given collectionobject record
...
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
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/collectionobjects/a7fdba4a-ec23-472c-9c45-47249aa3242d/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 type of the subject
obj
= used to specify the object's CSID
objType
= used to specify the type of the object
With a specific csid
and a general objType
the API call would be
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/relations?sbj={{csid}}&objType={{docType}}
|
Where the document type, docType
, value is could be one of the following:
- Media -
MediaTenant42
- Movement -
Movement
- Collection object -
CollectionObjectTenant42
Tip |
---|
Document types with the suffix |
Chaining multiple record calls
The benefit of the relations service is receiving a single payload that contains the CSIDs of all the related records. From here it is necessary to make one API call for every CSID received since no other identifying information is returned for a related record. This can be unwieldy if there are dozens of CSIDs to fetch from. There is a workaround that can be used until the Relations service API can be changed to allow for more information to be returned.
Nuxeo uses a few special properties to identify documents in NXQL. One such property is ecm:name
, which maps to the CSID of a CollectionSpace record. This can be used with OR operators to chain together several CSIDs in a single API call.
For instance, say the following relations API call is made to find all the related media records for a given CollectionObject.
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/relations?sbj=117dc667-faa9-4818-a848-133ca5ad3e11&objType=MediaTenant42
|
The xml list returns something like this abbreviated payload
Code Block | ||||
---|---|---|---|---|
| ||||
...
<csid>8394599a-70b1-43e4-9fdb-44eb4ef12003</csid>
...
<csid>faa2930f-1b27-4165-baf9-a7709f018bab</csid>
...
<csid>dcf824ca-cb0a-4129-8440-c79357244f2b</csid>
...
<csid>c6ae5232-8036-4f22-aafc-96708137ee57</csid>
...
|
Then a single API call to the media service will look like this
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/media?as=ecm:name='8394599a-70b1-43e4-9fdb-44eb4ef12003' OR ecm:name='faa2930f-1b27-4165-baf9-a7709f018bab' OR ecm:name='dcf824ca-cb0a-4129-8440-c79357244f2b' OR ecm:name='c6ae5232-8036-4f22-aafc-96708137ee57'
|
The above API call will only return a list type result and not the full record payload for every CSID listed. Using selective list-type columns it will be possible to gather the data needed without making individual calls.
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
.
Tip |
---|
|
To find the current location of a CollectionObject, the following Relation API call can be made
Code Block |
---|
http://cspacetest.collectionspace.org: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.
Code Block |
---|
http://cspacetest.collectionspace.org:8180/cspace-services/relations?sbj={{csid}}&objType=MediaTenant42 |
The objType
value is the document type for the unique MMI tenant, MediaTenant42
Only media records with a mediaStatus
value of display
will be shown for this filter.
Controlled List mapping
Collection category
...
/wiki/spaces/collectionspace/pages/666273449
CollecitonObject RESTful API
Common services RESTful API
Media service RESTful API
Relation service RESTful API