]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-717: Adding v0.4 specific fields to the list results of the Intake, Acquisitio...
authorRichard Millet <richard.millet@berkeley.edu>
Fri, 8 Jan 2010 18:38:27 +0000 (18:38 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Fri, 8 Jan 2010 18:38:27 +0000 (18:38 +0000)
12 files changed:
services/acquisition/client/src/test/java/org/collectionspace/services/client/test/AcquisitionServiceTest.java
services/acquisition/jaxb/src/main/java/org/collectionspace/services/AcquisitionListItemJAXBSchema.java
services/acquisition/jaxb/src/main/resources/acquisitions_common.xsd
services/acquisition/service/src/main/java/org/collectionspace/services/acquisition/nuxeo/AcquisitionDocumentModelHandler.java
services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java
services/collectionobject/jaxb/src/main/java/org/collectionspace/services/CollectionObjectListItemJAXBSchema.java
services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd
services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/nuxeo/CollectionObjectDocumentModelHandler.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/IntakeServiceTest.java
services/intake/jaxb/src/main/java/org/collectionspace/services/IntakeListItemJAXBSchema.java
services/intake/jaxb/src/main/resources/intakes-common.xsd
services/intake/service/src/main/java/org/collectionspace/services/intake/nuxeo/IntakeDocumentModelHandler.java

index f7aed8c5b48652dba26707d010234c2f41a109b6..1932ced3d0b9c20564e32ba32b98b5fec0264a11 100644 (file)
@@ -604,6 +604,7 @@ public class AcquisitionServiceTest extends AbstractServiceTest {
     private MultipartOutput createAcquisitionInstance(String identifier) {
         AcquisitionsCommon acquisition = new AcquisitionsCommon();
         acquisition.setAcquisitionReferenceNumber("acquisitionReferenceNumber-"  + identifier);
+        acquisition.setAcquisitionSource("acquisitionSource-"  + identifier);
         MultipartOutput multipart = new MultipartOutput();
         OutputPart commonPart = multipart.addPart(acquisition,
             MediaType.APPLICATION_XML_TYPE);
index 103338b98b394c638bc12348b3c6c3a0480f77a1..2158915f22c00d5b0e004b720f8ff915a40fb09c 100644 (file)
@@ -2,6 +2,7 @@ package org.collectionspace.services;
 \r
 public interface AcquisitionListItemJAXBSchema {\r
        final static String ACQUISITION_REFERENCE_NUMBER = "AcquisitionReferenceNumber";\r
+       final static String ACQUISITION_SOURCE="AcquisitionSource";\r
        final static String CSID = "csid";\r
        final static String URI = "url";\r
 }\r
index 9c0dfaf81d6d5d21f8e28a9ca475ae123d5c6fcd..350f783d20e07b0fc8ef4bc74b911e09c0daf55a 100644 (file)
@@ -65,6 +65,8 @@
                         <xs:sequence>
                             <xs:element name="AcquisitionReferenceNumber" type="xs:string"
                                 minOccurs="1" />
+                            <xs:element name="AcquisitionSource" type="xs:string"
+                                minOccurs="1" />
                             <!-- uri to retrive acquisition details -->
                             <xs:element name="uri" type="xs:anyURI"
                                 minOccurs="1" />
index 2c15d6f593b684c405a2b7a51d706774de544632..f720b9e06449f8c3442a5429f8d9cfabbdb87850 100644 (file)
@@ -124,6 +124,8 @@ public class AcquisitionDocumentModelHandler
             AcquisitionListItem listItem = new AcquisitionListItem();
             listItem.setAcquisitionReferenceNumber((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
                     AcquisitionListItemJAXBSchema.ACQUISITION_REFERENCE_NUMBER));
+            listItem.setAcquisitionSource((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
+                    AcquisitionListItemJAXBSchema.ACQUISITION_SOURCE));
             //need fully qualified context for URI
             String id = NuxeoUtils.extractId(docModel.getPathAsString());
             listItem.setUri(getServiceContextPath() + id);
index e2532e4fdee2f65f2d15414f6512d5bc3a739891..bef77e5b3391f58bf8fd31824a7294019ac3cc47 100644 (file)
@@ -645,11 +645,13 @@ public class CollectionObjectServiceTest extends AbstractServiceTest {
             ons.add("urn:org.walkerart.id:123");
         }
         multivalue = !multivalue;
+        //FIXME: Title does not need to be set.
+        collectionObject.setTitle("acoward");
         collectionObject.setOtherNumbers(onList);
         collectionObject.setObjectNumber(objectNumber);
         collectionObject.setObjectName(objectName);
         collectionObject.setAge(""); //test for null string
-        collectionObject.setBriefDescription("Papier mache bird mask with horns, "
+        collectionObject.setBriefDescription("Papier mache bird cow mask with horns, "
                 + "painted red with black and yellow spots. "
                 + "Puerto Rico. ca. 8&quot; high, 6&quot; wide, projects 10&quot; (with horns).");
         MultipartOutput multipart = new MultipartOutput();
index 39a6b50a03736e3e65ed810f51ddb1c816a5fcea..09b04413313175d81b2d1908cf435668b9b5d04a 100644 (file)
@@ -2,6 +2,7 @@ package org.collectionspace.services;
 \r
 public interface CollectionObjectListItemJAXBSchema {\r
        final static String OBJECT_NUMBER = "objectNumber";\r
+       final static String TITLE = "title";\r
        final static String CSID = "csid";\r
        final static String URI = "url";\r
 }\r
index 0ad19e79a075f52aa62e815169c309326ddb7c5f..f51021ce032bb647c4c1bb78e4bdc91e43bea06f 100644 (file)
                         <xs:sequence>
                             <xs:element name="objectNumber" type="xs:string"
                                 minOccurs="1" />
+                            <xs:element name="title" type="xs:string"
+                                minOccurs="1" />
                             <!-- uri to retrive collection object details -->
                             <xs:element name="uri" type="xs:anyURI"
                                 minOccurs="1" />
index 72fb11e428ac58272cba4a87fb817e8f04fd1f8d..cdad7f58b00c996c5c4107c6ba2bd303f94514cc 100644 (file)
@@ -117,6 +117,8 @@ public class CollectionObjectDocumentModelHandler
             CollectionObjectListItem coListItem = new CollectionObjectListItem();
             coListItem.setObjectNumber((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
                        CollectionObjectListItemJAXBSchema.OBJECT_NUMBER));
+            coListItem.setTitle((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
+                       CollectionObjectListItemJAXBSchema.TITLE));
             String id = NuxeoUtils.extractId(docModel.getPathAsString());
             coListItem.setUri(getServiceContextPath() + id);
             coListItem.setCsid(id);
index e929092d8f24e5cc6c9088258dc35ce192192519..30d8468c188fcb6b778fdae9e1cc86dff4a40796 100644 (file)
@@ -609,13 +609,17 @@ public class IntakeServiceTest extends AbstractServiceTest {
     private MultipartOutput createIntakeInstance(String identifier) {
         return createIntakeInstance(
                 "entryNumber-" + identifier,
-                "entryDate-" + identifier);
+                "entryDate-" + identifier,
+                "depositor-" + identifier);
     }
 
-    private MultipartOutput createIntakeInstance(String entryNumber, String entryDate) {
+    private MultipartOutput createIntakeInstance(String entryNumber,
+               String entryDate,
+               String depositor) {
         IntakesCommon intake = new IntakesCommon();
         intake.setEntryNumber(entryNumber);
         intake.setEntryDate(entryDate);
+        intake.setDepositor(depositor);
         MultipartOutput multipart = new MultipartOutput();
         OutputPart commonPart =
             multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE);
index 22fbe87a8bfe8e84b7565f1502a50f716373b062..5d225097601fec5aefd2b6b1cf5e1eb2e053dd71 100644 (file)
@@ -2,6 +2,7 @@ package org.collectionspace.services;
 \r
 public interface IntakeListItemJAXBSchema {\r
        final static String ENTRY_NUMBER = "entryNumber";\r
+       final static String DEPOSITOR="depositor";\r
        final static String CSID = "csid";\r
        final static String URI = "url";\r
 }\r
index d0dc652c1aeb508fb7ad87621438232599f8f820..e20eb2a4016f5a3900b184e7aee4f17da9de1d36 100644 (file)
                         <xs:sequence>
                             <xs:element name="entryNumber" type="xs:string"
                                 minOccurs="1" />
+                            <xs:element name="depositor" type="xs:string"
+                                minOccurs="1" />
                             <!-- uri to retrive intake details -->
                             <xs:element name="uri" type="xs:anyURI"
                                 minOccurs="1" />
index c6ddab7202e9a63db6efdaa4a6212a9c40a263d8..6f1beae77b72d553bdd79bc85c2dfbbe9d9b773d 100644 (file)
@@ -124,6 +124,8 @@ public class IntakeDocumentModelHandler
             IntakeListItem ilistItem = new IntakeListItem();
             ilistItem.setEntryNumber((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
                     IntakeJAXBSchema.ENTRY_NUMBER));
+            ilistItem.setDepositor((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
+                    IntakeJAXBSchema.DEPOSITOR));
             String id = NuxeoUtils.extractId(docModel.getPathAsString());
             ilistItem.setUri(getServiceContextPath() + id);
             ilistItem.setCsid(id);