]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-2468: Modified CollectionObject records in the services layer, making the...
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 6 Aug 2010 20:46:01 +0000 (20:46 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 6 Aug 2010 20:46:01 +0000 (20:46 +0000)
14 files changed:
services/IntegrationTests/src/test/java/org/collectionspace/services/ItegrationTests/test/CollectionSpaceIntegrationTest.java
services/PerformanceTests/src/test/java/org/collectionspace/services/PerformanceTests/test/CollectionSpacePerformanceTest.java
services/PerformanceTests/src/test/java/org/collectionspace/services/PerformanceTests/test/PerformanceTest.java
services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/schemas/collectionobjects_common.xsd
services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java
services/collectionobject/client/src/test/resources/test-data/cspace-2242-first-value-instance-blank.xml
services/collectionobject/client/src/test/resources/test-data/cspace-2242-first-value-instance-nonblank.xml
services/collectionobject/client/src/test/resources/test-data/repfield_whitesp1.xml
services/collectionobject/client/src/test/resources/test-data/repfield_whitesp2.xml
services/collectionobject/client/src/test/resources/test-data/repfield_whitesp3.xml
services/collectionobject/client/src/test/resources/test-data/repfield_whitesp4.xml
services/collectionobject/client/src/test/resources/test-data/testCambridge.xml
services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd
services/security/client/src/test/java/org/collectionspace/services/security/client/test/AuthenticationServiceTest.java

index 1f3bf427bf215f696586f75896c7190a5a630158..66ea211857b811fe2b5a8bf4a0ec9a7c6c856615 100644 (file)
@@ -57,7 +57,7 @@ public abstract class CollectionSpaceIntegrationTest {
         * @param identifier the identifier\r
         */\r
        void fillCollectionObject(CollectionobjectsCommon co, String identifier) {\r
-               fillCollectionObject(co, "objectNumber-" + identifier, "objectName-"\r
+               fillCollectionObject(co, "objectNumber-" + identifier, "title-"\r
                                + identifier);\r
        }\r
 \r
@@ -66,12 +66,12 @@ public abstract class CollectionSpaceIntegrationTest {
         * \r
         * @param co the co\r
         * @param objectNumber the object number\r
-        * @param objectName the object name\r
+        * @param title the object title\r
         */\r
        void fillCollectionObject(CollectionobjectsCommon co, String objectNumber,\r
-                       String objectName) {\r
+                       String title) {\r
                co.setObjectNumber(objectNumber);\r
-               co.setObjectName(objectName);\r
+               co.setTitle(title);\r
        }\r
 \r
        /**\r
index b887f20ff95b5ee961c04027676bb9f00831673e..d84a6754ca92345c86703ad181e698bdb08a1067 100644 (file)
@@ -48,7 +48,7 @@ import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
 public abstract class CollectionSpacePerformanceTest {\r
 \r
        protected final static String OBJECT_NUMBER = "objectNumber_";\r
-       protected final static String OBJECT_NAME = "objectName_";\r
+       protected final static String OBJECT_TITLE = "objectTitle_";\r
        \r
        /*\r
         * Package scoped methods.\r
@@ -61,7 +61,7 @@ public abstract class CollectionSpacePerformanceTest {
         * @param identifier the identifier\r
         */\r
        void fillCollectionObject(CollectionobjectsCommon co, String identifier) {\r
-               fillCollectionObject(co, OBJECT_NUMBER + identifier, OBJECT_NAME + identifier);\r
+               fillCollectionObject(co, OBJECT_NUMBER + identifier, OBJECT_TITLE + identifier);\r
        }\r
 \r
        /**\r
@@ -69,12 +69,12 @@ public abstract class CollectionSpacePerformanceTest {
         * \r
         * @param co the co\r
         * @param objectNumber the object number\r
-        * @param objectName the object name\r
+        * @param title the object title\r
         */\r
        void fillCollectionObject(CollectionobjectsCommon co, String objectNumber,\r
-                       String objectName) {\r
+                       String title) {\r
                co.setObjectNumber(objectNumber);\r
-               co.setObjectName(objectName);\r
+               co.setTitle(title);\r
        }\r
 \r
        /**\r
index c48dc167f74c1200737caf272ee74b74589b0de7..3c05a512bfe6ee4373221fb64c8433a53d23d635 100644 (file)
@@ -131,7 +131,7 @@ public class PerformanceTest extends CollectionSpacePerformanceTest {
                String times = "";
                for (int numOfKeywords = 0; numOfKeywords < MAX_KEYWORDS;
                                numOfKeywords++, totalTime = 0, totalSearchResults = 0, times = "") {
-                       keywords = keywords + " " + OBJECT_NAME + randomGenerator.nextInt(numberOfObjects);
+                       keywords = keywords + " " + OBJECT_TITLE + randomGenerator.nextInt(numberOfObjects);
                        for (int i = 0; i < MAX_SEARCHES; i++) {
                                //sandwich the call with timestamps
                                Date startTime = new Date();
index b0c3f0779778a04c1edb58f1b93a06b09d183d0f..3c3319578b736f8227da58ae169e73510cb49a20 100644 (file)
     xmlns="http://collectionspace.org/collectionobject/"\r
     targetNamespace="http://collectionspace.org/collectionobject/" version="0.1">\r
 \r
-    <xs:complexType name="otherNumberList">\r
-        <xs:sequence>\r
-            <xs:element name="otherNumber" type="ns:otherNumber" minOccurs="0"\r
-                maxOccurs="unbounded"/>\r
-        </xs:sequence>\r
-    </xs:complexType>\r
-\r
-    <xs:complexType name="otherNumber">\r
-        <xs:sequence>\r
-            <xs:element name="numberValue" type="xs:string"/>\r
-            <xs:element name="numberType" type="xs:string"/>\r
-        </xs:sequence>\r
-    </xs:complexType>\r
-\r
     <!-- Object identification information -->\r
     <xs:element name="objectNumber" type="xs:string"/>\r
     <xs:element name="otherNumberList" type="ns:otherNumberList"/>\r
     </xs:element>\r
     <xs:element name="distinguishingFeatures" type="xs:string"/>\r
     <xs:element name="numberOfObjects" type="xs:string"/>\r
-    <xs:element name="objectName" type="xs:string"/>\r
-    <xs:element name="objectNameCurrency" type="xs:string"/>\r
-    <xs:element name="objectNameLevel" type="xs:string"/>\r
-    <xs:element name="objectNameNote" type="xs:string"/>\r
-    <xs:element name="objectNameSystem" type="xs:string"/>\r
-    <xs:element name="objectNameType" type="xs:string"/>\r
-    <xs:element name="objectNameLanguage" type="xs:string"/>\r
+    <xs:element name="objectNameList" type="ns:objectNameList"/>\r
+\r
     <xs:element name="responsibleDepartments">\r
         <xs:complexType>\r
             <xs:sequence>\r
     </xs:element>\r
     <xs:element name="fieldCollectionEventName" type="xs:string"/>\r
 \r
+    <xs:complexType name="otherNumberList">\r
+        <xs:sequence>\r
+            <xs:element name="otherNumber" type="ns:otherNumber" minOccurs="0"\r
+                maxOccurs="unbounded"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+\r
+    <xs:complexType name="otherNumber">\r
+        <xs:sequence>\r
+            <xs:element name="numberValue" type="xs:string"/>\r
+            <xs:element name="numberType" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+\r
+    <xs:complexType name="objectNameList">\r
+        <xs:sequence>\r
+            <xs:element name="objectNameGroup" type="objectNameGroup" minOccurs="0"\r
+                maxOccurs="unbounded"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+\r
+    <xs:complexType name="objectNameGroup">\r
+        <xs:sequence>\r
+                <xs:element name="objectName" type="xs:string"/>\r
+                <xs:element name="objectNameCurrency" type="xs:string"/>\r
+                <xs:element name="objectNameLevel" type="xs:string"/>\r
+                <xs:element name="objectNameNote" type="xs:string"/>\r
+                <xs:element name="objectNameSystem" type="xs:string"/>\r
+                <xs:element name="objectNameType" type="xs:string"/>\r
+                <xs:element name="objectNameLanguage" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+\r
     <!-- Object Description Date Information -->\r
     <!-- This appears to be a placeholder structured date -->\r
     <xs:element name="dateAssociation" type="xs:string"/>\r
index 70d459ede0e1c0f46981567c841faa7e0e06d0da..30beb96ca7bdf521673bf338da68ca6fff25bd66 100644 (file)
@@ -35,6 +35,8 @@ import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
 import org.collectionspace.services.collectionobject.domain.naturalhistory.CollectionobjectsNaturalhistory;
 import org.collectionspace.services.collectionobject.CollectionobjectsCommonList;
 import org.collectionspace.services.collectionobject.ResponsibleDepartmentList;
+import org.collectionspace.services.collectionobject.ObjectNameGroup;
+import org.collectionspace.services.collectionobject.ObjectNameList;
 import org.collectionspace.services.collectionobject.OtherNumber;
 import org.collectionspace.services.collectionobject.OtherNumberList;
 
@@ -67,6 +69,8 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
     /** The known resource id. */
     private String knownResourceId = null;
 
+    private final String OBJECT_NAME_VALUE = "an object name";
+
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
      */
@@ -456,8 +460,14 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
         // a non-empty value is required, as enforced by the service's
         // validation routine(s).
         CollectionobjectsCommon collectionObject = new CollectionobjectsCommon();
-        collectionObject.setTitle("atitle");
-        collectionObject.setObjectName("some name");
+        collectionObject.setTitle("a title");
+
+        ObjectNameList objNameList = new ObjectNameList();
+        List<ObjectNameGroup> objNameGroups = objNameList.getObjectNameGroup();
+        ObjectNameGroup objectNameGroup = new ObjectNameGroup();
+        objectNameGroup.setObjectName("an object name");
+        objNameGroups.add(objectNameGroup);
+        collectionObject.setObjectNameList(objNameList);
 
         // Submit the request to the service and store the response.
         CollectionObjectClient client = new CollectionObjectClient();
@@ -480,9 +490,14 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
         // empty String, in a field that requires a non-empty value,
         // as enforced by the service's validation routine(s).
         collectionObject = new CollectionobjectsCommon();
-        collectionObject.setTitle("atitle");
-        collectionObject.setObjectName("some name");
         collectionObject.setObjectNumber("");
+        collectionObject.setTitle("a title");
+        objNameList = new ObjectNameList();
+        objNameGroups = objNameList.getObjectNameGroup();
+        objectNameGroup = new ObjectNameGroup();
+        objectNameGroup.setObjectName(OBJECT_NAME_VALUE);
+        objNameGroups.add(objectNameGroup);
+        collectionObject.setObjectNameList(objNameList);
 
         // Submit the request to the service and store the response.
         multipart =
@@ -669,7 +684,17 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
 
         // Change the content of one or more fields in the common part.
         collectionObject.setObjectNumber("updated-" + collectionObject.getObjectNumber());
-        collectionObject.setObjectName("updated-" + collectionObject.getObjectName());
+        
+        ObjectNameList objNameList = collectionObject.getObjectNameList();
+        List<ObjectNameGroup> objNameGroups = objNameList.getObjectNameGroup();
+        Assert.assertNotNull(objNameGroups);
+        Assert.assertTrue(objNameGroups.size() >= 1);
+        String objectName = objNameGroups.get(0).getObjectName();
+        Assert.assertEquals(objectName, OBJECT_NAME_VALUE);
+        String updatedObjectName = "updated-" + objectName;
+        objNameGroups.get(0).setObjectName(updatedObjectName);
+        collectionObject.setObjectNameList(objNameList);
+
         if (logger.isDebugEnabled()) {
             logger.debug("sparse update that will be sent in update request:");
             logger.debug(objectAsXmlString(collectionObject,
@@ -693,8 +718,13 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
                 (CollectionobjectsCommon) extractPart(input,
                 client.getCommonPartName(), CollectionobjectsCommon.class);
         Assert.assertNotNull(updatedCollectionObject);
-        Assert.assertEquals(updatedCollectionObject.getObjectName(),
-                collectionObject.getObjectName(),
+
+        objNameList = collectionObject.getObjectNameList();
+        objNameGroups = objNameList.getObjectNameGroup();
+        Assert.assertNotNull(objNameGroups);
+        Assert.assertTrue(objNameGroups.size() >= 1);
+        Assert.assertEquals(updatedObjectName,
+                objNameGroups.get(0).getObjectName(),
                 "Data in updated object did not match submitted data.");
 
     }
@@ -1132,7 +1162,13 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl {
         // is supported by the application layers
         collectionObject.setOtherNumber("urn:org.walkerart.id:123");
         
-        collectionObject.setObjectName(objectName);
+        ObjectNameList objNameList = new ObjectNameList();
+        List<ObjectNameGroup> objNameGroups = objNameList.getObjectNameGroup();
+        ObjectNameGroup objectNameGroup = new ObjectNameGroup();
+        objectNameGroup.setObjectName(OBJECT_NAME_VALUE);
+        objNameGroups.add(objectNameGroup);
+        collectionObject.setObjectNameList(objNameList);
+
         collectionObject.setAge(""); //test for null string
         collectionObject.setBriefDescriptions(descriptionList);
 
index 9a69aa8c7f8c573869765d0de0000fe384f5d55d..c0ab86876ed1f7cf3150c73d97242a9e03ef5ce9 100644 (file)
@@ -12,7 +12,6 @@
     xsi:schemaLocation="http://collectionspace.org/services/collectionobject http://services.collectionspace.org/collectionobject/collectionobjects_common.xsd">
     <objectNumber>2</objectNumber>
     <comments>description</comments>
-    <objectName>Left-handed screwdriver</objectName>
     <title></title>
     <briefDescriptions>
         <!-- First value instance of this repeatable field is blank -->
index a8bad2b51b786023d68995514629ed56a25b8bd5..a75c5847252d7fbb0943e856ff86ae91ed613aa2 100644 (file)
@@ -12,7 +12,6 @@
     xsi:schemaLocation="http://collectionspace.org/services/collectionobject http://services.collectionspace.org/collectionobject/collectionobjects_common.xsd">
     <objectNumber>2</objectNumber>
     <comments>description</comments>
-    <objectName>Left-handed screwdriver</objectName>
     <title></title>
     <briefDescriptions>
         <!-- First value instance of this repeatable field is non-blank -->
index 5660ba962e7f9f54b562de3963b7cb4f80778b33..df977b5f2c4d72c082bdde29ff21c452b6a995b7 100644 (file)
@@ -7,14 +7,6 @@
 <briefDescriptions> <briefDescription> briefDescription</briefDescription></briefDescriptions>
 <distinguishingFeatures>distFeatures</distinguishingFeatures>
 <numberOfObjects>numberOfObjects</numberOfObjects>
-<objectName>objectName</objectName>
-<objectNameCurrency>objectNameCurrency</objectNameCurrency>
-<objectNameLevel>XXX</objectNameLevel>
-<objectNameNote>objectNameNote</objectNameNote>
-<objectNameSystem>objectNameSystem</objectNameSystem>
-<objectNameType>objectNameType</objectNameType>
-
-<objectNameLanguage>objectNameLanguage</objectNameLanguage>
 <!-- test whitespace as first child node -->
 <responsibleDepartments> <responsibleDepartment> responsibleDept1</responsibleDepartment><responsibleDepartment>responsibleDept2</responsibleDepartment></responsibleDepartments>
 <title>title</title>
index c55a973e79079f732e32d3689f15a69de4dea0d6..1917883d77013871b4b0f15e5c2591b001f9d8a9 100644 (file)
 </briefDescriptions>
 <distinguishingFeatures>distFeatures</distinguishingFeatures>
 <numberOfObjects>numberOfObjects</numberOfObjects>
-<objectName>objectName</objectName>
-<objectNameCurrency>objectNameCurrency</objectNameCurrency>
-<objectNameLevel>XXX</objectNameLevel>
-<objectNameNote>objectNameNote</objectNameNote>
-<objectNameSystem>objectNameSystem</objectNameSystem>
-<objectNameType>objectNameType</objectNameType>
-
-<objectNameLanguage>objectNameLanguage</objectNameLanguage>
 <!-- test newline whitespace -->
 <responsibleDepartments>
 <responsibleDepartment>responsibleDept1</responsibleDepartment>
index cf90657b43136d9ead2b6c859bd07c07b5d3ca19..ab44bf31424d8cbf3f6026299da1e3861c86c4f0 100644 (file)
 
 <distinguishingFeatures>distFeatures</distinguishingFeatures>
 <numberOfObjects>numberOfObjects</numberOfObjects>
-<objectName>objectName</objectName>
-<objectNameCurrency>objectNameCurrency</objectNameCurrency>
-<objectNameLevel>XXX</objectNameLevel>
-<objectNameNote>objectNameNote</objectNameNote>
-<objectNameSystem>objectNameSystem</objectNameSystem>
-<objectNameType>objectNameType</objectNameType>
-
-<objectNameLanguage>objectNameLanguage</objectNameLanguage>
 <!-- test newline whitespace -->
 <responsibleDepartments>
 <!-- test childnode as whitespace -->
index 3e9184c60e95ab973aaded1a1d5dd020a5224a5d..e8746eed1b4ec232949703c9405dbafc93104c69 100644 (file)
 </briefDescriptions>
 <distinguishingFeatures>distFeatures</distinguishingFeatures>
 <numberOfObjects>numberOfObjects</numberOfObjects>
-<objectName>objectName</objectName>
-<objectNameCurrency>objectNameCurrency</objectNameCurrency>
-<objectNameLevel>XXX</objectNameLevel>
-<objectNameNote>objectNameNote</objectNameNote>
-<objectNameSystem>objectNameSystem</objectNameSystem>
-<objectNameType>objectNameType</objectNameType>
-
-<objectNameLanguage>objectNameLanguage</objectNameLanguage>
 <!-- test newline and tab whitespace -->
 <responsibleDepartments>
     <responsibleDepartment>responsibleDept1</responsibleDepartment>
index c95d79a3f1cffdb092c3daa1b4430496862ae617..61a0799d10c9a36058005b783cd8537b821a1454 100644 (file)
   <comments>comments</comments>
   <distinguishingFeatures>distFeatures</distinguishingFeatures>
   <numberOfObjects>numberOfObjects</numberOfObjects>
-  <objectName>objectName</objectName>
-  <objectNameCurrency>objectNameCurrency</objectNameCurrency>
-  <objectNameLevel>XXX</objectNameLevel>
-  <objectNameNote>objectNameNote</objectNameNote>
-  <objectNameSystem>objectNameSystem</objectNameSystem>
-  <objectNameType>objectNameType</objectNameType>
-  <objectNameLanguage>objectNameLanguage</objectNameLanguage>
   <responsibleDepartments>
     <!--
                       <responsibleDepartment xtmplpoint="responsibleDept"/>
index 6518e79e5d20610702ba86072ffb9782c9656150..306361991424fbc0d70185c00d5c9d4887f27aa5 100644 (file)
   xmlns="http://collectionspace.org/services/collectionobject"
   targetNamespace="http://collectionspace.org/services/collectionobject"
   version="0.1">
-
-    <xs:complexType name="otherNumberList">
-        <xs:sequence>
-            <xs:element name="otherNumber" type="ns:otherNumber" minOccurs="0" maxOccurs="unbounded"/>
-        </xs:sequence>
-    </xs:complexType>
-    
-    <xs:complexType name="otherNumber">
-        <xs:sequence>
-            <xs:element name="numberValue" type="xs:string"/>
-            <xs:element name="numberType" type="xs:string"/>
-        </xs:sequence>
-    </xs:complexType>
     
 <!--
     Avoid XmlRootElement nightmare:
@@ -47,7 +34,7 @@
                 
                 <!-- Object Identification Information -->
                 <xs:element name="objectNumber" type="xs:string"/>
-                <xs:element name="otherNumberList" type="ns:otherNumberList"/>
+                <xs:element name="otherNumberList" type="otherNumberList"/>
                 
                 <!-- Remove these two elements when the App/UI layer is -->
                 <!-- using the new repeatable 'otherNumbers' field -->
                 <xs:element name="comments" type="commentList"/>
                 <xs:element name="distinguishingFeatures" type="xs:string"/>
                 <xs:element name="numberOfObjects" type="xs:string"/>
-                <xs:element name="objectName" type="xs:string"/>
-                <xs:element name="objectNameCurrency" type="xs:string"/>
-                <xs:element name="objectNameLevel" type="xs:string"/>
-                <xs:element name="objectNameNote" type="xs:string"/>
-                <xs:element name="objectNameSystem" type="xs:string"/>
-                <xs:element name="objectNameType" type="xs:string"/>
-                <xs:element name="objectNameLanguage" type="xs:string"/>
+                <xs:element name="objectNameList" type="ns:objectNameList"/>
                 <xs:element name="responsibleDepartments" type="responsibleDepartmentList"/>
                 <xs:element name="collection" type="xs:string"/>
                 <xs:element name="title" type="xs:string"/>
         </xs:complexType>
     </xs:element>
 
+    <xs:complexType name="otherNumberList">
+        <xs:sequence>
+            <xs:element name="otherNumber" type="otherNumber" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="otherNumber">
+        <xs:sequence>
+            <xs:element name="numberValue" type="xs:string"/>
+            <xs:element name="numberType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="objectNameList">
+        <xs:sequence>
+            <xs:element name="objectNameGroup" type="objectNameGroup" minOccurs="0"
+                maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="objectNameGroup">
+        <xs:sequence>
+                <xs:element name="objectName" type="xs:string"/>
+                <xs:element name="objectNameCurrency" type="xs:string"/>
+                <xs:element name="objectNameLevel" type="xs:string"/>
+                <xs:element name="objectNameNote" type="xs:string"/>
+                <xs:element name="objectNameSystem" type="xs:string"/>
+                <xs:element name="objectNameType" type="xs:string"/>
+                <xs:element name="objectNameLanguage" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+
     <xs:complexType name="responsibleDepartmentList">
         <xs:sequence>
             <xs:element name="responsibleDepartment" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
index eb74db3c7763f6dd68c2c84feb20993b09b3523f..8eaac972511f8f13201a56ee56179a209fa0135a 100644 (file)
@@ -431,7 +431,7 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl {
     private MultipartOutput createCollectionObjectInstance(
             String commonPartName, String identifier) {
         return createCollectionObjectInstance(commonPartName, "objectNumber-"
-                + identifier, "objectName-" + identifier);
+                + identifier, "title-" + identifier);
     }
 
     /**
@@ -439,16 +439,16 @@ public class AuthenticationServiceTest extends AbstractServiceTestImpl {
      *
      * @param commonPartName the common part name
      * @param objectNumber the object number
-     * @param objectName the object name
+     * @param title the object title
      *
      * @return the multipart output
      */
     private MultipartOutput createCollectionObjectInstance(
-            String commonPartName, String objectNumber, String objectName) {
+            String commonPartName, String objectNumber, String title) {
         CollectionobjectsCommon collectionObject = new CollectionobjectsCommon();
 
         collectionObject.setObjectNumber(objectNumber);
-        collectionObject.setObjectName(objectName);
+        collectionObject.setTitle(title);
         MultipartOutput multipart =
                 CollectionObjectFactory.createCollectionObjectInstance(
                 commonPartName, collectionObject, null, null);