MMI Cataloging schema extension notes v1.11

Basic info:

Server: collectionspace.movingimage.us
Version: 1.11
Tenant: mmi
Tenant ID: 42
Tenant string name: collectionobjectTenant42
XML namespace: http://collectionspace.org/services/collectionobject/local/mmi
Built using a revised mini-build tool that reflects v1.11: /tmp/tenant-customizations-v1.9/
Copied from sample tenant schema extension: nuxeo-platform-collectionobject-lifesci/

Cataloging/collectionobject record

file paths:
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/schemas/collectionobjects_mmi.xsd
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/META-INF/MANIFEST.MF
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/OSGI-INF/core-types-contrib.xml
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/OSGI-INF/ecm-types-contrib.xml
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/OSGI-INF/layouts-contrib.xml
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/src/main/resources/OSGI-INF/life-cycle-contrib.xml
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/build.xml
/tmp/v1.11/services/collectionobject/3rdparty/nuxeo-platform-collectionobject-mmi/pom.xml
/tmp/v1.11/services/collectionobject/3rdparty/build.xml
/tmp/v1.11/services/collectionobject/3rdparty/pom.xml
/tmp/v1.11/services/common/src/main/cspace/config/services/tenants/mmi/tenant-bindings.delta.xml
/usr/local/share/1.11/jboss-4.2.3.GA/server/cspace/cspace/config/services/tenants/mmi/tenant-bindings.delta.xml
/tmp/tenant-customizations-v1.9/ui/our-tenant/bundle/core-messages.properties
/tmp/tenant-customizations-v1.9/ui/our-tenant/html/pages/CatalogingTemplate.html
/tmp/tenant-customizations-v1.9/application/our-tenant/base-collectionobject.xml
/tmp/tenant-customizations-v1.9/application/our-tenant/domain-collectionobject.xml
/tmp/tenant-customizations-v1.9/application/our-tenant/config/cataloging.json

Add new text field:
Administrative remarks

1. This is a new field that will be added as a schema extension for the collectionobject procedure. Since there is no current sub-module for our custom schema the first step is to add a collectionobject sub-module nuxeo-platform-cs-collectionobject-mmi that defines the custom mmi schema. The following steps have been adapted from Rick's helpful How to add an extension schema page.

CollectionObject uses a new templating system that greatly reduces the editing of a number of module configuration files.
This removes steps 1.b, c, d, and f. Updates to build.xml and pom.xml are shown below.

  • a. add a custom collectionobject schema file collectionobjects_mmi.xsd with new field name administrativeRemarks

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--
        MMI Collectionobject schema (XSD)
        Entity  : Collectionobject
        Part    : Local - Museum of the Moving Image (MMI)
        Used for: Nuxeo EP core document type
        $LastChangedRevision: $
        $LastChangedDate: $
    -->
    <xs:schema
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:ns="http://collectionspace.org/services/collectionobject/local/mmi"
        xmlns="http://collectionspace.org/services/collectionobject/local/mmi"
        targetNamespace="http://collectionspace.org/services/collectionobject/local/mmi"
        version="0.1">
        <xs:element name="administrativeRemarks" type="xs:string"/>
    </xs:schema>
    
  • b. edit MANIFEST.MF to reference new mmi module

    Note references to lowercase mmi tenant string name on lines 3, 4, and 18.

    Manifest-Version: 1.0
    Bundle-ManifestVersion: 1
    Bundle-Name: org.collectionspace.collectionobjecttenant42
    Bundle-SymbolicName: org.collectionspace.collectionobjecttenant42;singleton:=true
    Bundle-Version: 1.0.0
    Bundle-Localization: plugin
    Bundle-Vendor: Nuxeo
    Require-Bundle: org.nuxeo.runtime,
     org.nuxeo.ecm.core.api,
     org.nuxeo.ecm.core,
     org.nuxeo.ecm.core.api,
     org.nuxeo.ecm.platform.types.api,
     org.nuxeo.ecm.platform.versioning.api,
     org.nuxeo.ecm.platform.ui,
     org.nuxeo.ecm.platform.forms.layout.client,
     org.nuxeo.ecm.platform.ws,
     org.collectionspace.collectionspace_core
    Provide-Package: org.collectionspace.collectionobjecttenant42
    Nuxeo-Component: OSGI-INF/core-types-contrib.xml,
      OSGI-INF/life-cycle-contrib.xml,
      OSGI-INF/ecm-types-contrib.xml,
      OSGI-INF/layouts-contrib.xml
    
  • c. add a custom schema to parent document type core-types-contrib.xml and reference new acquisition schema

    Note reference to mmi schema names and tenant string names on line 2, 4, 7 and 12.

    <?xml version="1.0"?>
    <component name="org.collectionspace.collectionobjectTenant42.coreTypes">
      <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
        <schema name="collectionobjects_mmi" prefix="collectionobjects_mmi" src="schemas/collectionobjects_mmi.xsd"/>
      </extension>
      <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
        <doctype name="CollectionobjectTenant42" extends="Document">
          <schema name="common"/>
          <schema name="dublincore"/>
          <schema name="collectionspace_core"/>
          <schema name="collectionobjects_common"/>
          <schema name="collectionobjects_mmi"/>
        </doctype>
      </extension>
    </component>
    
  • d. edit ecm-types-contrib.xml to reference new mmi component

    Note reference to mmi tenant string name on lines 2, 4, 5, 11, 17 and 23.

    <?xml version="1.0"?>
    <component name="org.collectionspace.collectionobjectTenant42.ecm.types">
      <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
        <type id="CollectionobjectTenant42" coretype="CollectionobjectTenant42">
          <label>org.collectionspace.collectionobjectTenant42</label>
          <!--icon>/icons/file.gif</icon-->
          <default-view>view_documents</default-view>
    
          <layouts mode="any">
            <layout>heading</layout>
            <layout>collectionspace_core</layout>
            <layout>collectionobjectTenant42</layout>
          </layouts>
        </type>
    
        <type id="Folder" coretype="Folder">
          <subtypes>
            <type>collectionobjectTenant42</type>
          </subtypes>
        </type>
    
        <type id="Workspace" coretype="Workspace">
          <subtypes>
            <type>collectionobjectTenant42</type>
          </subtypes>
        </type>
    
      </extension>
    </component>
    
  • e. edit layouts-contrib.xml to reference new mmi component

    Note reference to mmi tenant string name on lines 3 and 8.

    <?xml version="1.0"?>
    
    <component name="org.collectionspace.collectionobjects_mmi.layouts.webapp">
    
      <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
        point="layouts">
    
        <layout name="collectionobjects_mmi">
            <!--
          <templates>
            <template mode="any">/layouts/layout_default_template.xhtml</template>
          </templates>
          <rows>
            <row><widget>exampleField</widget></row>
          </rows>
    
          <widget name="exampleField" type="text">
            <labels>
              <label mode="any">exampleField</label>
            </labels>
            <translated>true</translated>
            <fields>
              <field schema="collectionobjects_naturalhistory">exampleField</field>
            </fields>
            <properties widgetMode="edit">
              <property name="styleClass">dataInputText</property>
            </properties>
          </widget>
          -->
        </layout>
      </extension>
    </component>
    
  • f. edit life-cycle-contrib.xml to reference new mmi component

    Note reference to mmi tenant string name on lines 2 and 7.

    <?xml version="1.0"?>
    <component name="org.collectionspace.ecm.platform.collectionobjectTenant42.LifeCycleManagerExtensions">
    
      <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService"
                 point="types">
        <types>
          <type name="CollectionobjectTenant42">default</type>
        </types>
      </extension>
    
    </component>
    
  • g. edit 3rdparty/nuxeo-platform-collectionobject-mmi/build.xml so to build the custom sub-module

    Note reference to mmi project name on line 1, and tenant string name on line 15.

    <project name="nuxeo-platform-collectionobject-mmi" default="package" basedir=".">
        <description>
            Collectionobject nuxeo document type for the MMI tenant
        </description>
        <!-- set global properties for this build -->
        <property name="services.trunk" value="../../../.."/>
        <!-- environment should be declared before reading build.properties -->
        <property environment="env" />
        <property file="${services.trunk}/build.properties" />
        <property name="mvn.opts" value="" />
        <property name="src" location="src"/>
        <property name="build" location="build"/>
        <property name="dist"  location="dist"/>
        <property name="nuxeo.collectionobject.jar"
            value="org.collectionspace.services.collectionobject.3rdparty.mmi.nuxeo-${cspace.release}.jar"/>
        <property name="nuxeo.collectionobject.jars.all"
            value="org.collectionspace.services.collectionobject.3rdparty.*.nuxeo-*.jar"/>
    
    ...
    
  • h. edit 3rdparty/nuxeo-platform-collectionobject-mmi/pom.xml to reference new mmi component

    Note reference to mmi tenant string name on lines 12, 13, and description on line 16.
    Template properties begin on line 19.

    <project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <parent>
            <groupId>org.collectionspace.services</groupId>
            <artifactId>org.collectionspace.services.collectionobject.3rdparty</artifactId>
            <version>1.11-SNAPSHOT</version>
        </parent>
    
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.collectionspace.services</groupId>
        <artifactId>org.collectionspace.services.collectionobject.3rdparty.mmi.nuxeo</artifactId>
        <name>services.collectionobject.mmi.3rdparty.nuxeo</name>
        <packaging>jar</packaging>
        <description>
            MMI CollectionObject Nuxeo document type for Tenant ID = "42"
        </description>
    
            <properties>
                    <CustomSchemaName>collectionobjects_mmi</CustomSchemaName>
                    <TenantId>42</TenantId>
                    <TenantLabel>mmi</TenantLabel>
            </properties>
    
        <build>
                    <resources>
                      <resource>
                            <directory>../../../../3rdparty/nuxeo/nuxeo-doctype/src/main/resources</directory>
                            <filtering>true</filtering>
                      </resource>
                      <resource>
                            <directory>../../../../3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources</directory>
                            <filtering>true</filtering>
                      </resource>
                      <resource>
                            <directory>src/main/resources</directory>
                            <filtering>true</filtering>
                      </resource>
                    </resources>
    ...
    
  • i. edit 3rdparty/build.xml so to build the custom sub-module

    Note reference to mmi custom module on lines 11, 117, 123, 129 and 135.

    <project name="collectionobject.3rdparty" default="package" basedir=".">
        <description>
            collectionobject service 3rd party
        </description>
      <!-- set global properties for this build -->
        <property name="services.trunk" value="../../.."/>
         <!-- enviornment should be declared before reading build.properties -->
        <property environment="env" />
        <property file="${services.trunk}/build.properties" />
            <property name="nuxeo-platform-collectionobject" value="nuxeo-platform-cs-collectionobject"/>
            <property name="nuxeo-platform-collectionobject-mmi" value="nuxeo-platform-collectionobject-mmi"/>
    
    ...
    

    and further down the file

        <target name="deploy" depends="install"
        description="deploy collectionobject in ${jboss.server.nuxeo}">
            <ant antfile="${nuxeo-platform-collectionobject}/build.xml" target="deploy" inheritall="false"/>
            <ant antfile="${nuxeo-platform-collectionobject-mmi}/build.xml" target="deploy" inheritall="false"/>
        </target>
    
        <target name="undeploy"
        description="undeploy collectionobject from ${jboss.server.nuxeo}">
            <ant antfile="${nuxeo-platform-collectionobject}/build.xml" target="undeploy" inheritall="false"/>
            <ant antfile="${nuxeo-platform-collectionobject-mmi}/build.xml" target="undeploy" inheritall="false"/>
        </target>
    
        <target name="dist"
        description="generate distribution for collectionobject" depends="package">
            <ant antfile="${nuxeo-platform-collectionobject}/build.xml" target="dist" inheritall="false"/>
            <ant antfile="${nuxeo-platform-collectionobject-mmi}/build.xml" target="dist" inheritall="false"/>
        </target>
    
        <target name="dist_installer"
        description="generate distribution for collectionobject" depends="package">
            <ant antfile="${nuxeo-platform-collectionobject}/build.xml" target="dist_installer" inheritall="false"/>
            <ant antfile="${nuxeo-platform-collectionobject-mmi}/build.xml" target="dist_installer" inheritall="false"/>
        </target>
    </project>
    
  • j. edit 3rdparty/pom.xml to reference new mmi component

    Note reference to mmi custom module on line 28.

    <project xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <parent>
            <groupId>org.collectionspace.services</groupId>
            <artifactId>org.collectionspace.services.collectionobject</artifactId>
            <version>1.11-SNAPSHOT</version>
        </parent>
    
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.collectionspace.services</groupId>
        <artifactId>org.collectionspace.services.collectionobject.3rdparty</artifactId>
        <name>services.collectionobject.3rdparty</name>
        <packaging>pom</packaging>
        <description>
            3rd party build for collectionobject service
        </description>
    
            <properties>
                    <ServiceName>collectionobject</ServiceName>
                    <NuxeoDocTypeName>CollectionObject</NuxeoDocTypeName>
                    <CommonSchemaName>collectionobjects_common</CommonSchemaName>
                    <TenantPrefix>Tenant</TenantPrefix>
            </properties>
    
        <modules>
            <module>nuxeo-platform-cs-collectionobject</module>
            <module>nuxeo-platform-collectionobject-mmi</module>
        </modules>
    
    </project>
    
  • k. add schema extension chunk to the top of the tenant binding tenant-bindings-delta.xml file

    The entire tenant binding fill now looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <tenant:TenantBindingConfig
    		xmlns:merge='http://xmlmerge.el4j.elca.ch'
    		xmlns:tenant='http://collectionspace.org/services/common/tenant'>
    
    	<tenant:tenantBinding id="42" name="movingimage.us" displayName="Museum of the Moving Image Tenant" version="0.1">
    		<tenant:repositoryDomain name="default-domain" storageName="mmi-domain" repositoryClient="nuxeo-java" />
    
    		<tenant:serviceBindings merge:matcher="id" id="CollectionObjects">
    			<service:object xmlns:service="http://collectionspace.org/services/common/service" >
    				<service:part id="42" merge:matcher="skip" merge:action="insert" control_group="Managed" versionable="true" auditable="false" label="collectionobjects_mmi" updated="" order="3">
    					<service:content contentType="application/xml">
    						<service:xmlContent namespaceURI="http://collectionspace.org/services/collectionobject/local/mmi" schemaLocation="http://collectionspace.org/services/collectionobject/local/mmi http://collectionspace.org/services/collectionobject/local/collectionobjects_mmi.xsd" />
    					</service:content>
    				</service:part>
    			</service:object>
    		</tenant:serviceBindings>
    		<tenant:serviceBindings merge:matcher="id" id="Persons">
    			<service:object xmlns:service="http://collectionspace.org/services/common/service" >
    				<service:part id="42" merge:matcher="skip" merge:action="insert" control_group="Managed" versionable="true" auditable="false" label="persons_mmi" updated="" order="3">
    					<service:content contentType="application/xml">
    						<service:xmlContent namespaceURI="http://collectionspace.org/services/person/local/mmi" schemaLocation="http://collectionspace.org/services/person/local/mmi http://collectionspace.org/services/person/local/persons_mmi.xsd" />
    					</service:content>
    				</service:part>
    			</service:object>
    		</tenant:serviceBindings>
    		<tenant:serviceBindings merge:matcher="id" id="Acquisitions">
    			<service:object xmlns:service="http://collectionspace.org/services/common/service" >
    				<service:part id="42" merge:matcher="skip" merge:action="insert" control_group="Managed" versionable="true" auditable="false" label="acquisitions_mmi" updated="" order="3">
    					<service:content contentType="application/xml">
    						<service:xmlContent namespaceURI="http://collectionspace.org/services/acquisition/local/mmi" schemaLocation="http://collectionspace.org/services/acquisition/local/mmi http://collectionspace.org/services/acquisition/local/acquisitions_mmi.xsd" />
    					</service:content>
    				</service:part>
    			</service:object>
    		</tenant:serviceBindings>
        </tenant:tenantBinding>
     
    </tenant:TenantBindingConfig>
    

2. add field id and selector to domain-collectionobject.xml

Note the section attribute for the new field. Every new field will have this identifying attribute.

<section id="domaindata">
        <field id="administrativeRemarks" section="mmi">
                <selector>object-identification-administrativeRemarks</selector>
        </field>
</section>

3. edit base-collectionobject.xml to point to new schema

Note the id attribute on line 5. This connects with the section attribute from the domain-collectionobject.xml file.

<record id="collection-object" in-findedit="yes">
   <services-url>collectionobjects</services-url>
   <services-tenant-singular>CollectionObject</services-tenant-singular>
   <services-list-path>abstract-common-list/list-item</services-list-path>                
   <services-record-path id="mmi">collectionobjects_mmi:http://collectionspace.org/services/collectionobject/local/mmi,collectionobjects_mmi</services-record-path>
   <services-record-path id="common">collectionobjects_common:http://collectionspace.org/services/collectionobject,collectionobjects_common</ser
vices-record-path>
   <services-record-path id="collectionspace_core">collectionspace_core:http://collectionspace.org/collectionspace_core/,collectionspace_core</s
ervices-record-path>

...

4. add field label to core-messages.properties

collection-object-administrativeRemarksLabel: Administrative remarks

5. add html for new field to CollectionsTemplate.html

<div class="info-pair">
   <div class="header">
       <div class="label csc-collection-object-administrativeRemarks-label">Extent</div>
   </div>
   <div class="content">
        <input type="text" class="csc-object-identification-administrativeRemarks" />
   </div>
</div>

6. run mini-build scripts to deploy changes across all layers and then build & deploy updated services module from source

cd /tmp/tenant-customizations-v1.9/application
ant deploy
cd /tmp/tenant-customizations-v1.9/ui
ant deploy
cd /tmp/v1.9/services/collectionobject
mvn clean install -DskipTests
cd /tmp/v1.9/services/
ant undeploy deploy
Removed unused fields:

The following fields are unused in this schema:

  • Object Identification Information: comments, object name, object name [currency, level, note, system, type, language], collection, and title [language, translation, translation language, type].
  • Object Description Information: age age qualifier, ate unit, color, content [activity, concept, date, note, other, other type, people, person, position, script], form, inscriber, inscription content [date, interpretation, language, method, position, script, translation, transliteration, type], inscription [inscriber, date, interpretation, method, position, type], material [component, component note, name, source], object status, phase, sex, style.
  • more...

1. Commented out references in base-collectionobject.xml
Note: had to leave in field declaration for objectName even though it's not needed for MMI or else app layer would fail to deploy. Not sure why.

2. Removed references in core-messages.properties

3. Removed reference in CollectionsTemplate.html

4. run mini-build scripts to deploy changes across app and ui layers

Add in additional fields

Add in new fields for

  • Object Identification Information: Provenance (text), Initial cataloging completed (boolean does not work in v1.11), Additional research required (boolean does not work in v1.11), {Artifact class (text; soon to be vocabulary), Work type (text; soon to be vocabulary)}
  • Object Description Information: {Content entity (name auth), Content entity type (controlled list, static)}, copyright statement (large text; repeatable)
  • Object History and Association Information: Historical note sources (text)

1. Add new fields to collectionobjects_mmi.xsd

<xs:element name="provenance" type="xs:string"/>
<xs:element name="initialCatalogingCompleted" type="xs:boolean"/>
<xs:element name="additionalResearchRequired" type="xs:boolean"/>

<xs:element name="artifactClassWorkTypeList" type="artifactClassWorkTypeList"/>
<xs:complexType name="artifactClassWorkTypeList">
    <xs:sequence>
        <xs:element name="artifactClassWorkTypeGroup" type="artifactClassWorkTypeGroup" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
</xs:complexType>
<xs:complexType name="artifactClassWorkTypeGroup">
   <xs:sequence>
       <xs:element name="artifactClass" type="xs:string"/>
       <xs:element name="workType" type="xs:string"/>
    </xs:sequence>
</xs:complexType>

<xs:element name="contentEntityList" type="contentEntityList"/>
<xs:complexType name="contentEntityList">
   <xs:sequence>
      <xs:element name="contentEntityGroup" type="contentEntityGroup" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
</xs:complexType>
<xs:complexType name="contentEntityGroup">
   <xs:sequence>
       <xs:element name="contentEntity" type="xs:string"/>
       <xs:element name="contentEntityType" type="xs:string"/>
    </xs:sequence>
</xs:complexType>

<xs:element name="copyrightStatements">
         <xs:complexType>
                <xs:sequence>
                      <xs:element name="copyrightStatement" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
        </xs:complexType>
</xs:element>

<xs:element name="historicalNoteSources" type="xs:string"/>

2. Add the following strings to domain-collectionobject.xml

<field id="provenance" section="mmi">
    <selector>object-identification-provenance</selector>
</field>
<field id="initialCatalogingCompleted" datatype="boolean" section="mmi">
    <selector>object-identification-initialCatalogingCompleted</selector>
</field>
<field id="additionalResearchRequired" datatype="boolean" section="mmi">
    <selector>object-identification-additionalResearchRequired</selector>
</field>
<repeat id="artifactClassWorkTypeList/artifactClassWorkTypeGroup" section="mmi">
    <field id="artifactClass" section="mmi">
         <selector>object-identification-artifactClass</selector>
    </field>
    <field id="workType" section="mmi">
          <selector>object-identification-workType</selector>
    </field>
</repeat>
<repeat id="contentEntityList/contentEntityGroup" section="mmi">
    <field id="contentEntity" autocomplete="organization-organization" section="mmi">
         <selector>object-description-contentEntity</selector>
    </field>
    <field id="contentEntityType" section="mmi">
          <selector>object-description-contentEntityType</selector>
    </field>
</repeat>
<repeat id="copyrightStatements" section="mmi">
    <field id="copyrightStatement" section="mmi">
          <selector>object-description-copyrightStatement</selector>
    </field>
</repeat>

<field id="historicalNoteSources" section="mmi">
    <selector>object-history-association-historicalNoteSources</selector>
</field>

3. Edit core-message.properties

collection-object-provenanceLabel: Provenance
collection-object-initialCatalogingCompletedLabel: Initial cataloging completed
collection-object-additionalResourcesNeededLabel: Additional resources needed
collection-object-artifactClassWorkTypeGroupLabel: Artifact class / Work type
collection-object-artifactClassLabel: Artifact class
collection-object-workTypeLabel: Work type
collection-object-contentEntityGroupLabel: Content entity
collection-object-contentEntityLabel: Content entity
collection-object-contentEntityTypeLabel: Content entity type
collection-object-copyrightStatementLabel: Copyright statement
collection-object-historicalNoteSourcesLabel: Historical note sources

4. Edit CatalogingTemplate.html

<div class="info-pair">                                                    
    <div class="header">
        <div class="label csc-collection-object-provenance-label"></div>
    </div>
    <div class="content">
        <input type="text" class="csc-object-identification-provenance"/>
    </div>                                                        
</div>
<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-initialCatalogingRequired-label"></div>
    </div>
    <div class="content">
        <input type="checkbox" class="csc-object-identification-initialCatalogingRequired"/>
    </div>
</div>
<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-additionalResearchRequired-label"></div>
    </div>
    <div class="content">
         <input type="checkbox" class="csc-object-identification-additionalResearchRequired"/>
    </div>
</div>
<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-artifactClassWorkTypeGroup-label"></div>
    </div>
    <div class="content">
         <table>
              <thead>
                 <tr>
                    <td class="label csc-collection-object-artifactClass-label"></td>
                    <td class="label csc-collection-object-workType-label"></td>
                 </tr>
               </thead>
               <tbody>
                 <tr class="csc-collection-object-artifactClassWorkTypeGroup">
                    <td><input type="text" class="input-alpha-table csc-object-identification-artifactClass" /></td>
                    <td><input type="text" class="input-alpha-table csc-object-identification-workType" /></td>
                  </tr>
                </tbody>
          </table>
    </div>
</div>

...

<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-copyrightStatement-label"></div>
    </div>
    <div class="content">
         <input type="checkbox" class="csc-object-description-copyrightStatement"/>
    </div>
</div>

...

<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-contentEntityGroup-label"></div>
    </div>
    <div class="content">
         <table>
              <thead>
                 <tr>
                    <td class="label csc-collection-object-contentEntity-label"></td>
                    <td class="label csc-collection-object-contentEntityType-label"></td>
                 </tr>
               </thead>
               <tbody>
                 <tr class="csc-collection-object-artifactClassWorkTypeGroup">
                    <td><input type="text" class="input-alpha-table csc-object-description-contentEntity" /></td>
                    <td><input type="text" class="input-alpha-table csc-object-description-contentEntityType" /></td>
                  </tr>
                </tbody>
          </table>
    </div>
</div>

...

<div class="info-pair">
    <div class="header">
        <div class="label csc-collection-object-historicalNoteSources-label"></div>
    </div>
    <div class="content">
         <input type="text" class="csc-object-history-association-historicalNoteSources"/>
    </div>
</div>
Extract a field from a group of fields

There are a few fields that will be extracted from their containing group and made solo. The remaining fields in the group will not be used. For this, the extracted field will be recreated as something new and added to domain-collectionobject.xml.

For example, the field Title from the repeatable Title group is used while all the others are not. Instead of reusing the Title field within the repeatable group there will be a new field that mimics Title. This new field will be called objectTitle which uses the MMI specific label to identify it.

Similar fields have this same behavior and the following notes show the steps used to update the different layers.
ObjectTitle replaces Title
mmiMaterial replaces material
mmiInscriptionContent replaces inscriptionContent
mmiTechnique replaces technique

1. Update collectionobjects_mmi.xsd with the new fields.

<xs:element name="objectTitles">
        <xs:complexType>
               <xs:sequence>
                      <xs:element name="objectTitle" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
        </xs:complexType>
</xs:element>

<xs:element name="mmiMaterials">
        <xs:complexType>
               <xs:sequence>
                      <xs:element name="mmiMaterial" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
        </xs:complexType>
</xs:element>

<xs:element name="mmiInscriptionContents">
         <xs:complexType>
                <xs:sequence>
                      <xs:element name="mmiInscriptionContent" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
        </xs:complexType>
</xs:element>

<xs:element name="mmiTechniques">
       <xs:complexType>
                <xs:sequence>
                      <xs:element name="mmiTechnique" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
       </xs:complexType>
</xs:element>

2. Update domain-collectionobject.xml

<repeat id="objectTitles" section="mmi">
	<field id="objectTitle" section="mmi">
		<title-selector>titleBar-object-identification-objectTitle</title-selector>
		<selector>object-identification-objectTitle</selector>
	</field>
</repeat>
<repeat id="mmiMaterials" section="mmi">
        <field id="mmiMaterial" section="mmi">
	        <selector>object-description-mmiMaterial</selector>
        </field>
</repeat>
<repeat id="mmiInscriptionContents" section="mmi">
	<field id="mmiInscriptionContent" section="mmi">
		<selector>object-description-mmiInscriptionContent</selector>
	</field>
</repeat>
<repeat id="mmiTechniques" section="mmi">
        <field id="mmiTechnique" section="mmi">
                <selector>object-production-mmiTechnique</selector>
        </field>
</repeat>

3. Remove references to fields in base-collectionobject.xml

4. Remove old references to field(s) and group(s) in CatalogingTemplate.html

5. Add new fields to CatalogingTemplate.html

<div class="info-pair">
	<div class="header">
		<div class="label csc-collection-objectTitle-label"></div>
	</div>
	<div class="content">
		<input type="text" class="csc-object-identification-objectTitle editableText">
	</div>
</div>

...

<div class="info-pair">
	<div class="header">
		<div class="label csc-collection-object-mmiMaterial-label"></div>
	</div>
	<div class="content">
		<input type="text" class="csc-object-description-mmiMaterial">
	</div>
</div>

...

<div class="info-pair">
	<div class="header">
		<div class="label csc-collection-object-mmiInscriptionContent-label"></div>
	</div>
	<div class="content">
		<textarea rows="4" cols="30" class="input-textarea csc-object-description-mmiInscriptionContent"></textarea>
	</div>
</div>

...

<div class="info-pair">
	<div class="header">
		<div class="label csc-collection-object-mmiTechnique-label"></div>
	</div>
	<div class="content">
		<input type="class" class="csc-object-description-mmiTechnique" />
	</div>
</div>

6. Add/remove entries in core-messages.bundle

#collection-objectTitleGroupLabel: Title
#collection-object-titleLabel: Title
collection-objectTitleLabel: Object title

#collection-object-materialLabel: Material
collection-object-mmiMaterialLabel: Material

#collection-object-inscriptionContentLabel: Inscription Content
collection-object-mmiInscriptionContentLabel: Inscription content

#collection-object-techniqueLabel: Technique
collection-object-mmiTechniqueLabel: Technique
Assigning a new field to be required

One of the fields that were extracted from a repeatable group was Title, which is a required field. Required fields have special properties in such that the app and UI layers must know what to do with them. Using the original Title field as a template it is possible to exchange the requirement from our old Title field towards our new objectTitle field.

1. Edit domain-collectionobject.xml

Essentially, there is an in-title attribute on line 2 and a new tag, <title-selector ... />, that tells the app layer where to attach the contents of this field.

<repeat id="objectTitles" section="mmi">
	<field id="objectTitle" in-title="yes" section="mmi">			
		<title-selector>titleBar-object-identification-objectTitle</title-selector>
		<selector>object-identification-objectTitle</selector>
	</field>
</repeat>

2. Edit cataloging.json to point to our new required field

Again, using the previous field as an example, just replace the old field references with the new one. The queryPath string value tells the UI where to find the field group when it is a repeatable group. The path string value tells the UI what field to assign to the titleBar element (where the values of required fields live.)

"titleBar": {
        "type": "cspace.titleBar",
        "options": {
            "fields": [
            "fields.objectNumber", {
                "type": "repeatableMatch",
                "queryPath": "fields.objectTitles",
                "childPath": "_primary",
                "value": true,
                "path": "objectTitle"
            }]
          }
},
Adding a dynamic vocabulary term list instance

Rather than a static vocabulary term list that is defined by the Collectionobject schema there are a few fields that use a dynamic vocabulary. The vocabulary is one such that it can be altered by the UI and is considered an instance of the vocabulary type. The basics of setting up a vocab instance are found in a previous section.

The fields using a dynamic vocabulary:

  • Other number type – vocab-numbertype
  • Technical attribute – vocab-technicalattribute
  • Technical attribute measurement – vocab-technicalmeasurement
  • Technical attribute measurement unit – vocab-technicalunit
  • Object production entity - role – vocab-productionrole
  • Associated entity type – vocab-associatedentitytype
  • Material – vocab-material

1. For MMI we'll set up a few vocab instances by adding them to domain-vocabularies.xml.

<instance id="vocab-numbertype">
      <web-url>numbertype</web-url>
      <title-ref>numbertype</title-ref>
      <title>Number type</title>
      <options>
              <option id="boxnumber">Box Number</option>
              <option id="creatingacollection">Creating a collection</option>
              <option id="previousnumber">Previous number</option>
              <option id="serialnumber">Serial number</option>
      </options>
</instance>
<instance id="vocab-technicalattribute">
      <web-url>technicalattribute</web-url>
      <title-ref>technicalattribute</title-ref>
      <title>Technical Attribute</title>
      <options>
               <option id="" default="yes"></option>
               <option id="width">Width</option>
               <option id="rotationalspeed">Rotational speed</option>
               <option id="gauge">Gauge</option>
       </options>
</instance>
<instance id="vocab-technicalmeasurement">
      <web-url>technicalmeasurement</web-url>
      <title-ref>technicalmeasurement</title-ref>
      <title>Technical Attribute Measurement</title>
      <options>
               <option id="1s2">1/2</option>
               <option id="3s4">3/4</option>
               <option id="1"> 1</option>
               <option id="2"> 2</option>
               <option id="331s3">33 1/3</option>
               <option id="45">45</option>
               <option id="78">78</option>
               <option id="8"> 8</option>
               <option id="9p5">9.5</option>
               <option id="16">16</option>
               <option id="17p5">17.5</option>
               <option id="22">22</option>
               <option id="28">28</option>
               <option id="35">35</option>
       </options>
</instance>
<instance id="vocab-productionrole">
      <web-url>productionrole</web-url>
      <title-ref>productionrole</title-ref>
      <title>Object Production Entity Role</title>
      <options>
              <option id=""></option>
      </options>
</instance>
<instance id="vocab-technicalmeasurementunit">
      <web-url>technicalmeasurementunit</web-url>
      <title-ref>technicalmeasurementunit</title-ref>
      <title>Technical Attribute Measurement Unit</title>
      <options>
               <option id="inch">inch</option>
               <option id="rpm">rpm</option>
               <option id="mm">mm</option>
      </options>
</instance>
<instance id="vocab-productionrole">
      <web-url>productionrole</web-url>
      <title-ref>productionrole</title-ref>
      <title>Object Production Entity Role</title>
      <options>
               <option id="creator">Creator</option>
               <option id="designer">Designer</option>
               <option id="distributor">Distributor</option>
               <option id="licensor">Licensor</option>
               <option id="illustrator">Illustrator</option>
               <option id="manufacturer">Manufacturer</option>
               <option id="producer">Producer</option>
               <option id="publisher">Publisher</option>
               <option id="owner">Owner</option>
               <option id="authorwriter">Author/Writer</option>
               <option id="exhibitor">Exhibitor</option>
               <option id="performer">Performer</option>
               <option id="signitor">Signitor</option>
      </options>
</instance>
<instance id="vocab-associatedentitytype">
      <web-url>associatedentitytype</web-url>
      <title-ref>associatedentitytype</title-ref>
      <title>Associated Entity Type</title>
      <options>
               <option id="creator">Creator</option>
               <option id="designer">Designer</option>
               <option id="distributor">Distributor</option>
               <option id="licensor">Licensor</option>
               <option id="illustrator">Illustrator</option>
               <option id="manufacturer">Manufacturer</option>
               <option id="producer">Producer</option>
               <option id="publisher">Publisher</option>
               <option id="owner">Owner</option>
               <option id="authorwriter">Author/Writer</option>
               <option id="exhibitor">Exhibitor</option>
               <option id="performer">Performer</option>
               <option id="signitor">Signitor</option>
      </options>
</instance>
<instance id="vocab-material">
	<web-url>material</web-url>
	<title-ref>material</title-ref>
	<title>Material</title>
	<options>
		<option id="acetatefilm">Acetate film</option>
		<option id="cellophane">Cellophane</option>
		<option id="cellulosenitratefilm">Cellulose nitrate film</option>
		<option id="cement">Cement</option>
		<option id="ceramic">Ceramic</option>
		<option id="composition">Composition</option>
		<option id="cork">Cork</option>
		<option id="crystal">Crystal</option>
		<option id="engineeredwood">Engineered wood</option>
		<option id="fiberglass">Fiberglass</option>
		<option id="foam">Foam</option>
		<option id="fur">Fur</option>
		<option id="glass">Glass</option>
		<option id="glycerin">Glycerin</option>
		<option id="hair">Hhair</option>
		<option id="latex">Latex</option>
		<option id="leather">Leather</option>
		<option id="metal">Metal</option>
		<option id="neon">Neon</option>
		<option id="paper">Ppaper</option>
		<option id="photographicnegative">Photographic negative</option>
		<option id="photographicpaper">Photographic paper</option>
		<option id="photographicpapermountedontextile">Photographic paper mounted on textile</option>
		<option id="plaster">Plaster</option>
		<option id="plastic">Plastic</option>
		<option id="polystyrene">Polystyrene</option>
		<option id="polyurethane">Polyurethane</option>
		<option id="resin">Resin</option>
		<option id="rock">Rock</option>
		<option id="rubber">Rubber</option>
		<option id="soap">Soap</option>
		<option id="textile">Textile</option>
		<option id="vinyl">Vinyl</option>
		<option id="wax">Wax</option>
		<option id="wood">Wood</option>
	</options>
</instance>

2. We'll attach a reference to the new vocab instance for each necessary field in base-collectionobject.xml

<field id="numberType" in-tab="yes" autocomplete="vocab-numbertype" ui-type="enum"  seperate_ui_container="true">
...
<field id="technicalAttribute" ui-search="repeatable" autocomplete="vocab-technicalattribute" ui-type="enum" seperate_ui_container="true">
...
<field id="technicalAttributeMeasurement" autocomplete="vocab-technicalmeasurement" ui-type="enum" seperate_ui_container="true">
...
<field id="technicalAttributeMeasurementUnit" autocomplete="vocab-technicalmeasurementunit" ui-type="enum" seperate_ui_container="true">
...
<field id="objectProductionOrganizationRole" autocomplete="vocab-productionrole" ui-type="enum"></field>
...
<field id="assocOrganizationType" autocomplete="vocab-associatedentitytype" ui-type="enum"></field>
...
<field id="mmiMaterial" autocomplete="vocab-material" ui-type="enum" section="mmi">
Adding a new (or existing) field into an existing repeatable group.

Dimensions is a repeatable group of fields and MMI requires that Dimension summary be added into this repeatable group. Dimension summary currently exists as a single text field within the base schema. The most direct way to accomplish this is to add in a new field id, say, mmiDimensionSummary, into the Dimension repeating group, and make sure all the other layers knows about this. But we come across an issue where we can't merely just edit the repeating group as is exists in the base schema. No, there will need to exist an entirely new mmiDimensions repeatable group that we define in our domain-collectionobject.xml schema, which will have our new mmiDimensionSummary field.

Note: the field Dimension will not be used in the new mmiDimension group.

1. Create new repeating group in collectionobjects_mmi.xsd styled after the existing one

<xs:element name="mmiDimensions" type="ns:mmiDimensionList"/>
<xs:complexType name="mmiDimensionList">
    <xs:sequence>
        <xs:element name="mmiDimensionGroup" type="mmiDimensionGroup" minOccurs="0"
            maxOccurs="unbounded"/>
    </xs:sequence>
</xs:complexType>
<xs:complexType name="mmiDimensionGroup">
    <xs:sequence>
        <xs:element name="mmiDimensionSummary" type="xs:string"/>
        <xs:element name="mmiMeasuredPart" type="xs:string"/>
        <xs:element name="mmiMeasurementUnit" type="xs:string"/>
        <xs:element name="mmiValue" type="xs:string"/>
        <xs:element name="mmiValueDate" type="xs:string"/>
        <xs:element name="mmiValueQualifier" type="xs:string"/>
    </xs:sequence>
</xs:complexType>

2. Add fields to domain-collectionobjects.xml

        <repeat id="mmiDimensions/mmiDimensionGroup" section="mmi">
                <field id="mmiDimensionSummary" section="mmi">
                        <selector>object-description-dimension-mmiDimensionSummary</selector>
                </field>
                <field id="mmiMeasuredPart" seperate_ui_container="true" section="mmi">
                        <selector>object-description-dimension-mmiMeasuredPart</selector>
                </field>
                <field id="mmiMeasurementUnit" seperate_ui_container="true" section="mmi">
                        <selector>object-description-dimension-mmiMeasurementUnit</selector>
                        <options>
                                <option id="">Please select a value</option>
                                <option id="inches">inches</option>
                                <option id="feet">feet</option>
                                <option id="millimeters">millimeters</option>
                        </options>
                </field>
                <field id="mmiValue" datatype="integer" section="mmi">
                        <selector>object-description-dimension-mmiValue</selector>
                </field>
                <field id="mmiValueDate" ui-type="date" section="mmi">
                        <selector>object-description-dimension-mmiValueDate</selector>
                </field>
                <field id="mmiValueQualifier" section="mmi">
                        <selector>object-description-dimension-mmiValueQualifier</selector>
                </field>
        </repeat>

3. Edit CollectionObjectTemplate.html

<div class="info-pair">
     <div class="header">
           <div class="label csc-collection-object-mmiDimensionGroup-label"></div>
      </div>
      <div class="content">
             <table>
                <thead>
                    <tr>
                        <td class="csc-collection-object-mmiDimensionSummary-label"></td>
                        <td class="csc-collection-object-mmiMeasuredPart-label"></td>
                        <td class="csc-collection-object-mmiMeasurementUnit-label"></td>
                        <td class="csc-collection-object-mmiValue-label"></td>
                        <td class="csc-collection-object-mmiValueQualifier-label"></td>
                        <td class="csc-collection-object-mmiValueDate-label"></td>
                    </tr>
                 </thead>
                 <tbody>
                    <tr class="csc-collection-object-mmiDimensionGroup">
                        <td>
                            <input type="text" class="csc-object-description-dimension-mmiDimensionSummary">
                        </td>
                        <td>
                            <input type="text" class="csc-object-description-dimension-mmiMeasuredPart" />
                        </td>
                        <td>
                            <select class="csc-object-description-dimension-mmiMeasurementUnit input-select">
                               <option value="">
                                    Options not loaded
                               </option>
                            </select>
                        </td>
                        <td>
                            <input type="text" class="csc-object-description-dimension-mmiValue">
                        </td>
                        <td>
                            <input type="text" class="csc-object-description-dimension-mmivalueQualifier">
                        </td>
                        <td>
                            <input type="text" class="csc-object-description-dimension-mmiValueDate">
                        </td>
                    </tr>
                </tbody>
             </table>
      </div>
 </div>

4. edit core-messages.properties

#collection-object-measuredPartLabel: Part
collection-object-mmiMeasuredPartLabel: Part
#collection-object-dimensionLabel: Dimension
#collection-object-valueLabel: Value
collection-object-mmiValueLabel: Value
#collection-object-measurementUnitLabel: Dimension Unit
collection-object-mmiMeasurementUnitLabel: Dimension Unit
#collection-object-valueQualifierLabel: Value Qualifier
collection-object-mmiValueQualifierLabel: Value Qualifier
#collection-object-valueDateLabel: Date
collection-object-mmiValueDateLabel: Date

#collection-object-dimensionGroupLabel: Dimension
collection-object-mmiDimensionGroupLabel: Dimension

#collection-object-dimensionSummaryLabel: Dimension summary
collection-object-mmiDimensionSummaryLabel: Dimension summary
Add new Date group for Object History and Association Information group

1. Create new date group in domain-collectionobject.xml

This is a copy of objectProductionDateGroup found in base-collectionobject.xml

<xs:element name="objectProductionDateGroup" type="objectProductionDateGroup"/>

<xs:complexType name="objectHistoryDateGroup">
        <xs:sequence>
            <xs:element name="dateDisplayDate" type="xs:string"/>
            <xs:element name="dateAssociation" type="xs:string"/>
            <xs:element name="dateEarliestSingleYear" type="xs:string"/>
            <xs:element name="dateEarliestSingleMonth" type="xs:string"/>
            <xs:element name="dateEarliestSingleDay" type="xs:string"/>
            <xs:element name="dateEarliestSingleEra" type="xs:string"/>
            <xs:element name="dateEarliestSingleCertainty" type="xs:string"/>
            <xs:element name="dateEarliestSingleQualifier" type="xs:string"/>
            <xs:element name="dateEarliestSingleQualifierValue" type="xs:string"/>
            <xs:element name="dateEarliestSingleQualifierUnit" type="xs:string"/>
            <xs:element name="dateLatestYear" type="xs:string"/>
            <xs:element name="dateLatestMonth" type="xs:string"/>
            <xs:element name="dateLatestDay" type="xs:string"/>
            <xs:element name="dateLatestEra" type="xs:string"/>
            <xs:element name="dateLatestCertainty" type="xs:string"/>
            <xs:element name="dateLatestQualifier" type="xs:string"/>
            <xs:element name="dateLatestQualifierValue" type="xs:string"/>
            <xs:element name="dateLatestQualifierUnit" type="xs:string"/>
            <xs:element name="datePeriod" type="xs:string"/>
            <xs:element name="dateNote" type="xs:string"/>
        </xs:sequence>
</xs:complexType>

2. Add date group values into domain-collectionobject.xml

<field id="objectHistoryDate" ui-search="repeatable" ui-type="groupfield/structureddate" primarykey="objectHistoryDate.dateDisplayDate" ui-func="cspace.structuredDate" section="mmi">
       <services-tag>objectHistoryDateGroup</services-tag>
       <selector>object-history-date</selector>
</field>

3. Add field into CollectionobjectTemplate.html

<div class="info-pair">
     <div class="header">
          <div class="label csc-collection-object-objectHistoryDate-label"></div>
     </div>
     <div class="content">
          <input type="text" class="csc-object-history-date">
     </div>
</div>

4. Add field into core-messages.properties

collection-object-objectHistoryDateLabel: Associated Date