From 224fcb3e9a7910c13b9b895d05321b6c3b735fad Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Fri, 11 Jun 2010 22:05:51 +0000 Subject: [PATCH] CSPACE-1879: Brief Description is now a repeatable (single String scalar) field in CollectionObject records. --- .../schemas/collectionobjects_common.xsd | 6 ++--- .../test/CollectionObjectServiceTest.java | 25 ++++++------------- .../resources/test-data/repfield_whitesp1.xml | 2 +- .../resources/test-data/repfield_whitesp2.xml | 5 +++- .../resources/test-data/repfield_whitesp3.xml | 7 +++++- .../resources/test-data/repfield_whitesp4.xml | 5 +++- .../resources/test-data/testCambridge.xml | 2 +- .../resources/collectionobjects_common.xsd | 3 +-- 8 files changed, 27 insertions(+), 28 deletions(-) diff --git a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/schemas/collectionobjects_common.xsd b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/schemas/collectionobjects_common.xsd index a4e1dde2b..79a709eeb 100644 --- a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/schemas/collectionobjects_common.xsd +++ b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/schemas/collectionobjects_common.xsd @@ -39,9 +39,7 @@ - - + diff --git a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java index ff96591c3..a647eee74 100644 --- a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java +++ b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java @@ -66,9 +66,6 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl { // Instance variables specific to this test. /** The known resource id. */ private String knownResourceId = null; - - /** The multivalue. */ - private boolean multivalue; //toggle /* (non-Javadoc) * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent() @@ -1052,27 +1049,21 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl { String objectNumber, String objectName) { CollectionobjectsCommon collectionObject = new CollectionobjectsCommon(); - /* BriefDescriptionList descriptionList = new BriefDescriptionList(); List descriptions = descriptionList.getBriefDescription(); descriptions.add("Papier mache bird cow mask with horns, " + "painted red with black and yellow spots. " + "Puerto Rico. ca. 8" high, 6" wide, projects 10" (with horns)."); - */ + descriptions.add("Papier mache bird cow mask with horns, " + + "painted red with black and yellow spots. " + + "Puerto Rico. ca. 8" high, 6" wide, projects 10" (with horns)."); ResponsibleDepartmentList deptList = new ResponsibleDepartmentList(); List depts = deptList.getResponsibleDepartment(); // @TODO Use properly formatted refNames for representative departments // in this example test record. The following are mere placeholders. depts.add("urn:org.collectionspace.services.department:Registrar"); - if (multivalue == true) { - depts.add("urn:org.walkerart.department:Fine Art"); - } - // - // FIXME: REM - Can someone please document why we are toggling this - // value? Thanks. - // - multivalue = !multivalue; + depts.add("urn:org.walkerart.department:Fine Art"); OtherNumberList otherNumList = new OtherNumberList(); List otherNumbers = otherNumList.getOtherNumber(); @@ -1093,14 +1084,14 @@ public class CollectionObjectServiceTest extends AbstractServiceTestImpl { collectionObject.setObjectNumber(objectNumber); collectionObject.setOtherNumberList(otherNumList); + + // FIXME this can be removed when the repeatable other number list + // is supported by the application layers collectionObject.setOtherNumber("urn:org.walkerart.id:123"); collectionObject.setObjectName(objectName); collectionObject.setAge(""); //test for null string - // collectionObject.setBriefDescriptions(descriptionList); - collectionObject.setBriefDescription("Papier mache bird cow mask with horns, " - + "painted red with black and yellow spots. " - + "Puerto Rico. ca. 8" high, 6" wide, projects 10" (with horns)."); + collectionObject.setBriefDescriptions(descriptionList); CollectionobjectsNaturalhistory conh = new CollectionobjectsNaturalhistory(); conh.setNhString("test-string"); diff --git a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp1.xml b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp1.xml index b7b659f29..8300737c0 100644 --- a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp1.xml +++ b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp1.xml @@ -4,7 +4,7 @@ XXX otherNumberType -briefDescription + briefDescription comments distFeatures numberOfObjects diff --git a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp2.xml b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp2.xml index 1af625071..fadcd2a88 100644 --- a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp2.xml +++ b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp2.xml @@ -4,7 +4,10 @@ XXX otherNumberType -briefDescription + +briefDescription1 +briefDescription2 + comments distFeatures numberOfObjects diff --git a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp3.xml b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp3.xml index 2d47eee1a..29d8de6f2 100644 --- a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp3.xml +++ b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp3.xml @@ -4,7 +4,12 @@ XXX otherNumberType -briefDescription + + + briefDescription1 +briefDescription2 + + comments distFeatures numberOfObjects diff --git a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp4.xml b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp4.xml index b17b621d4..72094ee21 100644 --- a/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp4.xml +++ b/services/collectionobject/client/src/test/resources/test-data/repfield_whitesp4.xml @@ -4,7 +4,10 @@ XXX otherNumberType -briefDescription + + briefDescription1 + briefDescription2 + comments distFeatures numberOfObjects diff --git a/services/collectionobject/client/src/test/resources/test-data/testCambridge.xml b/services/collectionobject/client/src/test/resources/test-data/testCambridge.xml index 8f87e621c..ca2e0370b 100644 --- a/services/collectionobject/client/src/test/resources/test-data/testCambridge.xml +++ b/services/collectionobject/client/src/test/resources/test-data/testCambridge.xml @@ -11,7 +11,7 @@ objectNumber XXX otherNumberType - briefDescription + comments distFeatures numberOfObjects diff --git a/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd b/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd index 471a965ec..8537ff458 100644 --- a/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd +++ b/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd @@ -54,8 +54,7 @@ - - + -- 2.47.3