From 11e4c8141c9aa1246716acddeee37178071f49a3 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Wed, 3 Feb 2010 02:00:37 +0000 Subject: [PATCH] CSPACE-773,CSPACE-872,CSPACE-874,CSPACE-875: Multiple revisions to names and repeatability attributes of fields in the CollectionObject Common schema. IMPORTANT: Due to changes in Nuxeo document type, will require running 'ant deploy' and a two-server restart. Renamed responsibleDept to responsibleDepartment and distFeatures to distinguishingFeatures to conform to naming conventions for all other fields in schema. Made responsibleDepartment repeatable. Removed repeatability of otherNumber, for now. Added missing fields objectNameLevel and contentScript. Fixed typo (Earlierist) in dateEarliestSingleQualifier. --- .../resources/schemas/collectionobject.xsd | 4 +- .../resources/OSGI-INF/layouts-contrib.xml | 17 ++++---- .../schemas/collectionobjects_common.xsd | 41 ++++++++++--------- .../test/CollectionObjectServiceTest.java | 15 ++++--- .../services/CollectionObjectJAXBSchema.java | 4 +- .../resources/collectionobjects_common.xsd | 34 +++++++-------- .../client/sample/Sample.java | 17 ++++---- 7 files changed, 68 insertions(+), 64 deletions(-) diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionobject.xsd b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionobject.xsd index 31dbaf299..651013caf 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionobject.xsd +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionobject.xsd @@ -18,9 +18,9 @@ - + - + diff --git a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/OSGI-INF/layouts-contrib.xml b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/OSGI-INF/layouts-contrib.xml index a27ee1ff7..11e69e9f2 100644 --- a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/OSGI-INF/layouts-contrib.xml +++ b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/src/main/resources/OSGI-INF/layouts-contrib.xml @@ -15,17 +15,18 @@ otherNumberType briefDescription comments - distFeatures + distinguishingFeatures numberOfObjects objectName objectNameCurrency + objectNameLevel objectNameNote objectNameSystem objectNameType objectNameLanguage - responsibleDept + responsibleDepartment title objectTitleLanguage titleTranslation @@ -97,13 +98,13 @@ - + - + true - distFeatures + distinguishingFeatures dataInputText @@ -123,13 +124,13 @@ - + - + true - responsibleDept + responsibleDepartment dataInputText 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 c3545ded9..096ab50c4 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 @@ -18,39 +18,40 @@ targetNamespace="http://collectionspace.org/collectionobject/" version="0.1"> - + - - - - - - - + - + + - + + + + + + + - + - + @@ -68,9 +69,10 @@ + - + @@ -81,7 +83,7 @@ - + @@ -94,8 +96,7 @@ - - + @@ -104,14 +105,14 @@ - + - + @@ -123,11 +124,11 @@ - + - + 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 45362fa0d..776d2b0a7 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 @@ -31,7 +31,7 @@ import org.collectionspace.services.client.CollectionObjectClient; 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.OtherNumberList; +import org.collectionspace.services.collectionobject.ResponsibleDepartmentList; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; @@ -713,17 +713,20 @@ public class CollectionObjectServiceTest extends AbstractServiceTest { private MultipartOutput createCollectionObjectInstance(String commonPartName, String objectNumber, String objectName) { CollectionobjectsCommon collectionObject = new CollectionobjectsCommon(); - OtherNumberList onList = new OtherNumberList(); - List ons = onList.getOtherNumber(); - ons.add("urn:org.collectionspace.id:24082390"); + 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) { - ons.add("urn:org.walkerart.id:123"); + depts.add("urn:org.walkerart.department:Fine Art"); } multivalue = !multivalue; //FIXME: Title does not need to be set. collectionObject.setTitle("acoward"); - collectionObject.setOtherNumbers(onList); + collectionObject.setResponsibleDepartments(deptList); collectionObject.setObjectNumber(objectNumber); + collectionObject.setOtherNumber("urn:org.walkerart.id:123"); collectionObject.setObjectName(objectName); collectionObject.setAge(""); //test for null string collectionObject.setBriefDescription("Papier mache bird cow mask with horns, " diff --git a/services/collectionobject/jaxb/src/main/java/org/collectionspace/services/CollectionObjectJAXBSchema.java b/services/collectionobject/jaxb/src/main/java/org/collectionspace/services/CollectionObjectJAXBSchema.java index 721e439f4..b964dff0e 100644 --- a/services/collectionobject/jaxb/src/main/java/org/collectionspace/services/CollectionObjectJAXBSchema.java +++ b/services/collectionobject/jaxb/src/main/java/org/collectionspace/services/CollectionObjectJAXBSchema.java @@ -12,9 +12,9 @@ public interface CollectionObjectJAXBSchema { final static String OTHER_NUMBER = "otherNumber"; final static String BRIEF_DESCRIPTION = "briefDescription"; final static String COMMENTS = "comments"; - final static String DIST_FEATURES = "distFeatures"; + final static String DISTINGUISHING_FEATURES = "distinguishingFeatures"; final static String OBJECT_NAME = "objectName"; - final static String RESPONSIBLE_DEPT = "responsibleDept"; + final static String RESPONSIBLE_DEPARTMENT = "responsibleDepartment"; final static String TITLE = "title"; } diff --git a/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd b/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd index f51021ce0..c285bba18 100644 --- a/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd +++ b/services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd @@ -33,31 +33,32 @@ - + - + + - + - - + + - + @@ -75,9 +76,11 @@ + + - + @@ -88,7 +91,7 @@ - + @@ -101,8 +104,7 @@ - - + @@ -111,14 +113,14 @@ - + - + @@ -130,11 +132,11 @@ - + - + @@ -145,9 +147,9 @@ - + - + diff --git a/services/collectionobject/sample/sample/src/main/java/org/collectionspace/services/collectionobject/client/sample/Sample.java b/services/collectionobject/sample/sample/src/main/java/org/collectionspace/services/collectionobject/client/sample/Sample.java index a143cc20e..799446a1a 100644 --- a/services/collectionobject/sample/sample/src/main/java/org/collectionspace/services/collectionobject/client/sample/Sample.java +++ b/services/collectionobject/sample/sample/src/main/java/org/collectionspace/services/collectionobject/client/sample/Sample.java @@ -36,7 +36,7 @@ import javax.xml.bind.Marshaller; import org.collectionspace.services.client.CollectionObjectClient; import org.collectionspace.services.collectionobject.CollectionobjectsCommon; import org.collectionspace.services.collectionobject.CollectionobjectsCommonList; -import org.collectionspace.services.collectionobject.OtherNumberList; +import org.collectionspace.services.collectionobject.ResponsibleDepartmentList; import org.collectionspace.services.collectionobject.domain.naturalhistory.CollectionobjectsNaturalhistory; import org.jboss.resteasy.client.ClientResponse; @@ -204,15 +204,12 @@ public class Sample { CollectionobjectsCommon collectionObject = new CollectionobjectsCommon(); collectionObject.setObjectNumber("some object number here"); collectionObject.setObjectName("some object name here"); - // The 'other number' field in the common part of a CollectionObject record - // is multi-valued. - OtherNumberList onList = new OtherNumberList(); - List ons = onList.getOtherNumber(); - // Note: the structured (URN) format of the values below is for - // illustrative purposes only. - ons.add("urn:org.collectionspace.id:24082390"); - ons.add("urn:org.walkerart.id:123"); - collectionObject.setOtherNumbers(onList); + 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"); + depts.add("urn:org.walkerart.department:Fine Art"); collectionObject.setAge(""); // Test using an empty String. collectionObject.setBriefDescription("Papier mache bird mask with horns, " + "painted red with black and yellow spots. " + -- 2.47.3