]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-4057,CSPACE-3268,CSPACE-3269: Set datatype of multiple date fields, across...
authorAron Roberts <aron@socrates.berkeley.edu>
Mon, 14 Nov 2011 23:38:04 +0000 (23:38 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Mon, 14 Nov 2011 23:38:04 +0000 (23:38 +0000)
23 files changed:
services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/src/main/resources/schemas/acquisitions_common.xsd
services/acquisition/client/src/test/java/org/collectionspace/services/client/test/AcquisitionServiceTest.java
services/blob/3rdparty/nuxeo-platform-cs-blob/src/main/resources/schemas/blobs_common.xsd
services/collectionobject/3rdparty/nuxeo-platform-collectionobject-lifesci/src/main/resources/schemas/collectionobjects_naturalhistory.xsd
services/collectionobject/jaxb/src/main/resources/collectionobjects_common.xsd
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/common/src/main/java/org/collectionspace/services/common/datetime/DateTimeFormatUtils.java
services/common/src/main/java/org/collectionspace/services/common/datetime/GregorianCalendarDateTimeUtils.java
services/intake/3rdparty/nuxeo-platform-cs-intake/src/main/resources/schemas/intakes_common.xsd
services/intake/client/src/test/java/org/collectionspace/services/client/test/IntakeServiceTest.java
services/loanin/3rdparty/nuxeo-platform-cs-loanin/src/main/resources/schemas/loansin_common.xsd
services/loanin/client/src/test/java/org/collectionspace/services/client/test/LoaninServiceTest.java
services/loanin/jaxb/src/main/resources/loansin-common.xsd
services/loanout/3rdparty/nuxeo-platform-cs-loanout/src/main/resources/schemas/loansout_common.xsd
services/loanout/client/src/test/java/org/collectionspace/services/client/test/LoanoutServiceTest.java
services/loanout/jaxb/src/main/resources/loansout-common.xsd
services/location/3rdparty/nuxeo-platform-cs-location/src/main/resources/schemas/locations_common.xsd
services/location/client/src/test/java/org/collectionspace/services/client/test/LocationAuthorityServiceTest.java
services/media/3rdparty/nuxeo-platform-cs-media/src/main/resources/schemas/media_common.xsd
services/movement/3rdparty/nuxeo-platform-cs-movement/src/main/resources/schemas/movements_common.xsd
services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java
services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/src/main/resources/schemas/objectexit_common.xsd
services/objectexit/jaxb/src/main/resources/objectexit_common.xsd

index 5046ade10dd831af2d9ce7e6b57980d8340c7ccd..ebba7a018b5c8e464cf701b5e16a54d6f0800acf 100644 (file)
     <!-- See http://wiki.collectionspace.org/display/collectionspace/Acquisition+Schema -->\r
 \r
     <!--  Object Entry Information Group -->\r
-    <xs:element name="accessionDate" type="xs:string"/>\r
+    <xs:element name="accessionDate" type="xs:date"/>\r
     <xs:element name="acquisitionAuthorizer" type="xs:string"/>\r
-    <xs:element name="acquisitionAuthorizerDate" type="xs:string"/>\r
+    <xs:element name="acquisitionAuthorizerDate" type="xs:date"/>\r
     <xs:element name="acquisitionDates">\r
         <xs:complexType>\r
             <xs:sequence>\r
-                <xs:element name="acquisitionDate" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>\r
+                <xs:element name="acquisitionDate" type="xs:date" minOccurs="0" maxOccurs="unbounded"/>\r
             </xs:sequence>\r
         </xs:complexType>\r
     </xs:element>\r
index c43ef9ec794155d235464dc556e946f53959c868..3147e8a153846c83614b02e7bba56cf789fbf6ee 100644 (file)
@@ -32,6 +32,7 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 
 import org.collectionspace.services.acquisition.AcquisitionsCommon;
@@ -62,17 +63,20 @@ public class AcquisitionServiceTest extends AbstractServiceTestImpl {
     // Instance variables specific to this test.
     /** The known resource id. */
     private String knownResourceId = null;
+    private final static String CURRENT_DATE_UTC =
+            GregorianCalendarDateTimeUtils.timestampUTC();
 
-       @Override
-       public String getServicePathComponent() {
-               return AcquisitionClient.SERVICE_PATH_COMPONENT;
-       }
+
+    @Override
+    public String getServicePathComponent() {
+        return AcquisitionClient.SERVICE_PATH_COMPONENT;
+    }
 
 
-       @Override
-       protected String getServiceName() {
-               return AcquisitionClient.SERVICE_NAME;
-       }
+    @Override
+    protected String getServiceName() {
+        return AcquisitionClient.SERVICE_NAME;
+    }
     
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
@@ -797,10 +801,8 @@ public class AcquisitionServiceTest extends AbstractServiceTestImpl {
 
         AcquisitionDateList acqDatesList = new AcquisitionDateList();
         List<String> acqDates = acqDatesList.getAcquisitionDate();
-        // FIXME Use properly timestamps for representative acquisition
-        // dates in this example test record. The following are mere placeholders.
-        acqDates.add("First Acquisition Date -" + identifier);
-        acqDates.add("Second Acquisition Date-" + identifier);
+        acqDates.add(CURRENT_DATE_UTC);
+        acqDates.add(CURRENT_DATE_UTC);
         acquisition.setAcquisitionDates(acqDatesList);
 
         OwnerList ownersList = new OwnerList();
index fa00fd0e478354d3564a19294e3fcb5978feab65..cbc5707d25e0110900c1eb713835fc8b7fd800bc 100644 (file)
@@ -60,7 +60,7 @@
             <xs:element name="measurementUnit" type="xs:string"/>\r
             <xs:element name="measurementMethod" type="xs:string"/>\r
             <xs:element name="value" type="xs:decimal"/>\r
-            <xs:element name="valueDate" type="xs:dateTime"/>\r
+            <xs:element name="valueDate" type="xs:date"/>\r
             <xs:element name="valueQualifier" type="xs:string"/>\r
         </xs:sequence>\r
     </xs:complexType>\r
index 40118113dc549ee66d016e7fff20235d643bfe4a..895a69a7d415a60987f0cc35185ee8776f333c59 100644 (file)
   <xs:element name="catalogDate" type="xs:string"/>\r
   -->\r
 \r
-  <xs:element name="labelHeader" type="xs:string"/>\r
-  <xs:element name="labelFooter" type="xs:string"/>\r
+    <xs:element name="labelHeader" type="xs:string"/>\r
+    <xs:element name="labelFooter" type="xs:string"/>\r
 \r
-  <xs:element name="fieldLocVerbatim" type="xs:string"/>\r
-  <xs:element name="fieldCollectionDateEarliest" type="xs:string"/>\r
-  <xs:element name="fieldCollectionDateLatest" type="xs:string"/>\r
-  <xs:element name="fieldLocLatDecimal" type="xs:string"/>\r
-  <xs:element name="fieldLocLongDecimal" type="xs:string"/>\r
-  <xs:element name="fieldLocElevation" type="xs:string"/>\r
+    <xs:element name="fieldLocVerbatim" type="xs:string"/>\r
+    <xs:element name="fieldCollectionDateEarliest" type="xs:string"/>\r
+    <xs:element name="fieldCollectionDateLatest" type="xs:string"/>\r
+    <xs:element name="fieldLocLatDecimal" type="xs:string"/>\r
+    <xs:element name="fieldLocLongDecimal" type="xs:string"/>\r
+    <xs:element name="fieldLocElevation" type="xs:string"/>\r
 \r
   <!-- These will become contolled lists -->\r
-  <xs:element name="fieldLocGeodeticDatum" type="xs:string"/>\r
-  <xs:element name="fieldLocCoordinateSystem" type="xs:string"/>\r
-  <xs:element name="fieldLocCounty" type="xs:string"/>\r
-  <xs:element name="fieldLocState" type="xs:string"/>\r
-  <xs:element name="fieldLocCountry" type="xs:string"/>\r
-  <xs:element name="fieldLocHigherGeography" type="xs:string"/>\r
+    <xs:element name="fieldLocGeodeticDatum" type="xs:string"/>\r
+    <xs:element name="fieldLocCoordinateSystem" type="xs:string"/>\r
+    <xs:element name="fieldLocCounty" type="xs:string"/>\r
+    <xs:element name="fieldLocState" type="xs:string"/>\r
+    <xs:element name="fieldLocCountry" type="xs:string"/>\r
+    <xs:element name="fieldLocHigherGeography" type="xs:string"/>\r
 \r
-  <xs:element name="taxonomicIdentGroupList" type="taxonomicIdentGroupList"/>\r
-  <xs:element name="typeSpecimenGroupList" type="typeSpecimenGroupList"/>\r
-  <xs:element name="fieldCollElevationGroupList" type="fieldCollElevationGroupList"/>\r
-  <xs:element name="fieldCollDepthGroupList" type="fieldCollDepthGroupList"/>\r
-  <xs:element name="associatedTaxaGroupList" type="associatedTaxaGroupList"/>\r
+    <xs:element name="taxonomicIdentGroupList" type="taxonomicIdentGroupList"/>\r
+    <xs:element name="typeSpecimenGroupList" type="typeSpecimenGroupList"/>\r
+    <xs:element name="fieldCollElevationGroupList" type="fieldCollElevationGroupList"/>\r
+    <xs:element name="fieldCollDepthGroupList" type="fieldCollDepthGroupList"/>\r
+    <xs:element name="associatedTaxaGroupList" type="associatedTaxaGroupList"/>\r
 \r
-       <xs:complexType name="taxonomicIdentGroupList">\r
-                       <xs:sequence>\r
-                                       <xs:element name="taxonomicIdentGroup" type="taxonomicIdentGroup" minOccurs="0"\r
+    <xs:complexType name="taxonomicIdentGroupList">\r
+        <xs:sequence>\r
+            <xs:element name="taxonomicIdentGroup" type="taxonomicIdentGroup" minOccurs="0"\r
                                                        maxOccurs="unbounded"/>\r
-                       </xs:sequence>\r
-       </xs:complexType>\r
-       <xs:complexType name="taxonomicIdentGroup">\r
-                       <xs:sequence>\r
-                                       <xs:element name="taxon" type="xs:string"/>\r
-                                       <xs:element name="qualifier" type="xs:string"/>\r
-                                       <xs:element name="identBy" type="xs:string"/>\r
-                                       <xs:element name="identDate" type="xs:string"/>\r
-                                       <xs:element name="institution" type="xs:string"/>\r
-                                       <xs:element name="identKind" type="xs:string"/>\r
-                                       <xs:element name="reference" type="xs:string"/>\r
-                                       <xs:element name="refPage" type="xs:string"/>\r
-                                       <xs:element name="notes" type="xs:string"/>\r
-                        </xs:sequence>\r
-       </xs:complexType>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+    <xs:complexType name="taxonomicIdentGroup">\r
+        <xs:sequence>\r
+            <xs:element name="taxon" type="xs:string"/>\r
+            <xs:element name="qualifier" type="xs:string"/>\r
+            <xs:element name="identBy" type="xs:string"/>\r
+            <xs:element name="identDate" type="xs:string"/>\r
+            <xs:element name="institution" type="xs:string"/>\r
+            <xs:element name="identKind" type="xs:string"/>\r
+            <xs:element name="reference" type="xs:string"/>\r
+            <xs:element name="refPage" type="xs:string"/>\r
+            <xs:element name="notes" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
 \r
-       <xs:complexType name="typeSpecimenGroupList">\r
-                       <xs:sequence>\r
-                                       <xs:element name="typeSpecimenGroup" type="typeSpecimenGroup" minOccurs="0"\r
+    <xs:complexType name="typeSpecimenGroupList">\r
+        <xs:sequence>\r
+            <xs:element name="typeSpecimenGroup" type="typeSpecimenGroup" minOccurs="0"\r
                                                        maxOccurs="unbounded"/>\r
-                       </xs:sequence>\r
-       </xs:complexType>\r
-       <xs:complexType name="typeSpecimenGroup">\r
-                       <xs:sequence>\r
-                                       <xs:element name="kindOfType" type="xs:string"/>\r
-                                       <xs:element name="reference" type="xs:string"/>\r
-                                       <xs:element name="refPage" type="xs:string"/>\r
-                                       <xs:element name="institution" type="xs:string"/>\r
-                                       <xs:element name="institutionType" type="xs:string"/>\r
-                                       <xs:element name="notes" type="xs:string"/>\r
-                        </xs:sequence>\r
-       </xs:complexType>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+    <xs:complexType name="typeSpecimenGroup">\r
+        <xs:sequence>\r
+            <xs:element name="kindOfType" type="xs:string"/>\r
+            <xs:element name="reference" type="xs:string"/>\r
+            <xs:element name="refPage" type="xs:string"/>\r
+            <xs:element name="institution" type="xs:string"/>\r
+            <xs:element name="institutionType" type="xs:string"/>\r
+            <xs:element name="notes" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
 \r
-       <xs:complexType name="fieldCollElevationGroupList">\r
-                       <xs:sequence>\r
-                                       <xs:element name="fieldCollElevationGroup" type="fieldCollElevationGroup" minOccurs="0"\r
+    <xs:complexType name="fieldCollElevationGroupList">\r
+        <xs:sequence>\r
+            <xs:element name="fieldCollElevationGroup" type="fieldCollElevationGroup" minOccurs="0"\r
                                                        maxOccurs="unbounded"/>\r
-                       </xs:sequence>\r
-       </xs:complexType>\r
-       <xs:complexType name="fieldCollElevationGroup">\r
-                       <xs:sequence>\r
-                                       <xs:element name="minElevation" type="xs:integer"/>\r
-                                       <xs:element name="maxElevation" type="xs:integer"/>\r
-                                       <xs:element name="units" type="xs:string"/>\r
-                                       <xs:element name="qualifier" type="xs:string"/>\r
-                                       <xs:element name="notes" type="xs:string"/>\r
-                        </xs:sequence>\r
-       </xs:complexType>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+    <xs:complexType name="fieldCollElevationGroup">\r
+        <xs:sequence>\r
+            <xs:element name="minElevation" type="xs:integer"/>\r
+            <xs:element name="maxElevation" type="xs:integer"/>\r
+            <xs:element name="units" type="xs:string"/>\r
+            <xs:element name="qualifier" type="xs:string"/>\r
+            <xs:element name="notes" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
 \r
-       <xs:complexType name="fieldCollDepthGroupList">\r
-                       <xs:sequence>\r
-                                       <xs:element name="fieldCollDepthGroup" type="fieldCollDepthGroup" minOccurs="0"\r
+    <xs:complexType name="fieldCollDepthGroupList">\r
+        <xs:sequence>\r
+            <xs:element name="fieldCollDepthGroup" type="fieldCollDepthGroup" minOccurs="0"\r
                                                        maxOccurs="unbounded"/>\r
-                       </xs:sequence>\r
-       </xs:complexType>\r
-       <xs:complexType name="fieldCollDepthGroup">\r
-                       <xs:sequence>\r
-                                       <xs:element name="minDepth" type="xs:integer"/>\r
-                                       <xs:element name="maxDepth" type="xs:integer"/>\r
-                                       <xs:element name="units" type="xs:string"/>\r
-                                       <xs:element name="qualifier" type="xs:string"/>\r
-                                       <xs:element name="notes" type="xs:string"/>\r
-                        </xs:sequence>\r
-       </xs:complexType>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+    <xs:complexType name="fieldCollDepthGroup">\r
+        <xs:sequence>\r
+            <xs:element name="minDepth" type="xs:integer"/>\r
+            <xs:element name="maxDepth" type="xs:integer"/>\r
+            <xs:element name="units" type="xs:string"/>\r
+            <xs:element name="qualifier" type="xs:string"/>\r
+            <xs:element name="notes" type="xs:string"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
 \r
-       <xs:complexType name="associatedTaxaGroupList">\r
-                       <xs:sequence>\r
-                                       <xs:element name="associatedTaxaGroup" type="associatedTaxaGroup" minOccurs="0"\r
+    <xs:complexType name="associatedTaxaGroupList">\r
+        <xs:sequence>\r
+            <xs:element name="associatedTaxaGroup" type="associatedTaxaGroup" minOccurs="0"\r
                                                        maxOccurs="unbounded"/>\r
-                       </xs:sequence>\r
-       </xs:complexType>\r
-       <xs:complexType name="associatedTaxaGroup">\r
-                       <xs:sequence>\r
-                                       <xs:element name="taxon" type="xs:string"/>\r
-                                       <xs:element name="commonName" type="xs:integer"/>\r
-                                       <xs:element name="interaction" type="xs:integer"/>\r
-                        </xs:sequence>\r
-       </xs:complexType>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
+    <xs:complexType name="associatedTaxaGroup">\r
+        <xs:sequence>\r
+            <xs:element name="taxon" type="xs:string"/>\r
+            <xs:element name="commonName" type="xs:integer"/>\r
+            <xs:element name="interaction" type="xs:integer"/>\r
+        </xs:sequence>\r
+    </xs:complexType>\r
 \r
 </xs:schema>\r
index e9f8bdd342db052297a9c3cb420a6e227364b00e..3b209b3556da135e391257302f3ca389930ef518 100644 (file)
             <xs:element name="measurementUnit" type="xs:string"/>
             <xs:element name="measurementMethod" type="xs:string"/>
             <xs:element name="value" type="xs:decimal"/>
-            <xs:element name="valueDate" type="xs:string"/>
+            <xs:element name="valueDate" type="xs:date"/>
             <xs:element name="valueQualifier" type="xs:string"/>
         </xs:sequence>
     </xs:complexType>
index 01d127ad63a0016e6750d10f573756930f674caa..1dd48b19ab78c62cd13a9af6f61fdee27702ffbd 100644 (file)
               <types:key>authRef</types:key>
               <types:value>borrowersAuthorizer</types:value>
             </types:item>
-            <!-- To be added to Loan In records per CSPACE-3269 -->
-            <!--
             <types:item xmlns:types="http://collectionspace.org/services/common/types">
                <types:key>authRef</types:key>
                <types:value>borrowersContact</types:value>
             </types:item>
-            -->
             <!-- Commented out for now, as searching within a field in a complexType breaks searches -->
             <!--
             <types:item xmlns:types="http://collectionspace.org/services/common/types">
index 9c3af532f1b8c8913b81196f5848c142c28e64f4..373b9c0d4a0beb3bb0290c65a71236b43a4dbfea 100644 (file)
@@ -54,7 +54,7 @@ public class DateTimeFormatUtils {
     final static String LOCALE_LANGUAGE_CODE_PROPERTY_NAME = "localeLanguage";
     final static Locale NULL_LOCALE = null;
     final static List<String> isoLanguageCodes = new ArrayList(Arrays.asList(Locale.getISOLanguages()));
-    final static String ISO_8601_FLOATING_DATE_PATTERN = "yyyy-MM-dd";
+    final static String ISO_8601_DATE_PATTERN = "yyyy-MM-dd";
     final static String ISO_8601_UTC_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
     static Map<String,List<DateFormat>> dateFormatters = new HashMap<String,List<DateFormat>>();
     static Map<String,List<String>> datePatterns = new HashMap<String,List<String>>();
@@ -346,6 +346,20 @@ public class DateTimeFormatUtils {
         return formatGregorianCalendarDate(cal, GregorianCalendarDateTimeUtils.UTCTimeZone(),
                 getDateFormatter(ISO_8601_UTC_TIMESTAMP_PATTERN));
     }
+    
+    /**
+     * Returns a representation of a calendar date and time instance,
+     * as an ISO 8601-formatted date.
+     *
+     * @param cal a calendar date and time instance.
+     *
+     * @return    a representation of that calendar date and time instance,
+     *            as an ISO 8601-formatted date.
+     */
+    public static String formatAsISO8601Date(GregorianCalendar cal) {
+        return formatGregorianCalendarDate(cal, GregorianCalendarDateTimeUtils.UTCTimeZone(),
+                getDateFormatter(ISO_8601_DATE_PATTERN));
+    }
 
     /**
      * Formats a provided calendar date using a supplied date formatter,
index a37cc72359fe17bcd657441aec4b8f610ced6416..ec2217a0efae4b3268a638e871bf11a57cefeb5d 100644 (file)
@@ -86,5 +86,15 @@ public class GregorianCalendarDateTimeUtils {
     public static String timestampUTC() {
         return DateTimeFormatUtils.formatAsISO8601Timestamp(currentDateAndTime(UTCTimeZone()));
     }
+    
+   /**
+    * Returns a String representing the current date and time instance.
+    * in the UTC time zone, formatted as an ISO 8601 date.
+    *
+    * @return A String representing the current date and time instance.
+    */
+    public static String currentDateUTC() {
+        return DateTimeFormatUtils.formatAsISO8601Date(currentDateAndTime(UTCTimeZone()));
+    }
 
 }
index 8f8b62f249153732db1169425dbdc190de941ac5..3d222efa6527ed16d07a78c51175863062f21748 100644 (file)
@@ -24,7 +24,7 @@
     <xs:element name="currentOwner" type="xs:string"/>\r
     <xs:element name="depositor" type="xs:string"/>\r
     <xs:element name="depositorsRequirements" type="xs:string"/>\r
-    <xs:element name="entryDate" type="xs:string"/>\r
+    <xs:element name="entryDate" type="xs:date"/>\r
     <xs:element name="entryMethods">\r
         <xs:complexType>\r
             <xs:sequence>\r
@@ -36,7 +36,7 @@
     <xs:element name="entryNumber" type="xs:string"/>\r
     <xs:element name="entryReason" type="xs:string"/>\r
     <xs:element name="packingNote" type="xs:string"/>\r
-    <xs:element name="returnDate" type="xs:string"/>\r
+    <xs:element name="returnDate" type="xs:date"/>\r
     \r
     <!--  Object Collection Information Group -->\r
     <xs:element name="fieldCollectionDate" type="xs:string"/>\r
@@ -81,7 +81,7 @@
     <xs:element name="insuranceNote" type="xs:string"/>\r
     <xs:element name="insurancePolicyNumber" type="xs:string"/>\r
     <xs:element name="insuranceReferenceNumber" type="xs:string"/>\r
-    <xs:element name="insuranceRenewalDate" type="xs:string"/>\r
+    <xs:element name="insuranceRenewalDate" type="xs:date"/>\r
     <xs:element name="insurers">\r
         <xs:complexType>\r
             <xs:sequence>\r
 \r
     <xs:element name="currentLocationGroupList" type="currentLocationGroupList"/>\r
 \r
-    <xs:element name="locationDate" type="xs:string"/>\r
+    <xs:element name="locationDate" type="xs:date"/>\r
     <xs:element name="normalLocation" type="xs:string"/>\r
     \r
     <!-- Condition Check/Technical Assessment Information Group -->\r
-    <xs:element name="conditionCheckDate" type="xs:string"/>\r
+    <xs:element name="conditionCheckDate" type="xs:date"/>\r
     <xs:element name="conditionCheckMethods">\r
         <xs:complexType>\r
             <xs:sequence>\r
index 4a5fbbfc1e66f05e210178e5cc292d5c7d94ddbc..055323dadd3975db4942fc156bbd980c18ccb131 100644 (file)
@@ -65,6 +65,8 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
     private final Logger logger = LoggerFactory.getLogger(IntakeServiceTest.class);
     /** The known resource id. */
     private String knownResourceId = null;
+    private final static String CURRENT_DATE_UTC =
+            GregorianCalendarDateTimeUtils.currentDateUTC();
 
     @Override
     protected CollectionSpaceClient getClientInstance() {
@@ -465,7 +467,6 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
 
         // Update the content of this resource.
         intakeCommons.setEntryNumber("updated-" + intakeCommons.getEntryNumber());
-        intakeCommons.setEntryDate("updated-" + intakeCommons.getEntryDate());
         if (logger.isDebugEnabled()) {
             logger.debug("to be updated object");
             logger.debug(objectAsXmlString(intakeCommons, IntakesCommon.class));
@@ -507,8 +508,8 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
 
         Assert.assertNotNull(updatedIntake);
 
-        Assert.assertEquals(updatedIntake.getEntryDate(),
-                intakeCommons.getEntryDate(),
+        Assert.assertEquals(updatedIntake.getEntryNumber(),
+                intakeCommons.getEntryNumber(),
                 "Data in updated object did not match submitted data.");
 
         currentLocationGroupList = updatedIntake.getCurrentLocationGroupList();
@@ -908,7 +909,7 @@ public class IntakeServiceTest extends AbstractServiceTestImpl {
     protected PoxPayloadOut createInstance(String identifier) {
         return createIntakeInstance(
                 "entryNumber-" + identifier,
-                "entryDate-" + identifier,
+                CURRENT_DATE_UTC,
                 "depositor-" + identifier);
     }
 
index b6ec0d8821e7905116b9a0faa48c14c88eb7eeb1..6503d151b04fcfee0e706bfa7380936d923d29fa 100644 (file)
     <xs:element name="loanInNumber" type="xs:string"/>\r
     <xs:element name="lenderGroupList" type="lenderGroupList"/>\r
     <xs:element name="loanInContact" type="xs:string"/>\r
+    <xs:element name="borrowersContact" type="xs:string"/>\r
     <xs:element name="borrowersAuthorizer" type="xs:string"/>\r
+    <xs:element name="borrowersAuthorizationDate" type="xs:date"/>\r
     <xs:element name="loanInConditions" type="xs:string"/>\r
-    <xs:element name="loanInDate" type="xs:string"/>\r
-    <xs:element name="loanReturnDate" type="xs:string"/>\r
-    <xs:element name="loanRenewalApplicationDate" type="xs:string"/>\r
+    <xs:element name="loanInDate" type="xs:date"/>\r
+    <xs:element name="loanReturnDate" type="xs:date"/>\r
+    <xs:element name="loanRenewalApplicationDate" type="xs:date"/>\r
     <xs:element name="loanInNote" type="xs:string"/>\r
     <xs:element name="loanPurpose" type="xs:string"/>\r
+    <xs:element name="loanStatusGroupList" type="loanStatusGroupList"/>\r
 \r
     <xs:complexType name="lenderGroupList">\r
        <xs:sequence>\r
        <xs:sequence>\r
            <xs:element name="lender" type="xs:string"/>\r
            <xs:element name="lendersAuthorizer" type="xs:string"/>\r
-           <xs:element name="lendersAuthorizationDate" type="xs:string"/>\r
+           <xs:element name="lendersAuthorizationDate" type="xs:date"/>\r
            <xs:element name="lendersContact" type="xs:string"/>\r
        </xs:sequence>\r
     </xs:complexType>\r
+    \r
+    <xs:complexType name="loanStatusGroupList">\r
+       <xs:sequence>\r
+           <xs:element name="loanStatusGroup" type="loanStatusGroup" minOccurs="0"\r
+                   maxOccurs="unbounded"/>\r
+       </xs:sequence>\r
+    </xs:complexType>\r
+\r
+    <xs:complexType name="loanStatusGroup">\r
+       <xs:sequence>\r
+           <xs:element name="loanStatus" type="xs:string"/>\r
+           <xs:element name="loanStatusDate" type="xs:date"/>\r
+           <xs:element name="loanStatusNote" type="xs:string"/>\r
+       </xs:sequence>\r
+    </xs:complexType>\r
 \r
 </xs:schema>\r
index a101f882307788277cb52d478cf0867a44aad9e2..a2820ff57907e6e64d83174f3b06c152670a26dd 100644 (file)
@@ -34,6 +34,7 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanin.LenderGroup;
 import org.collectionspace.services.loanin.LenderGroupList;
@@ -65,7 +66,9 @@ public class LoaninServiceTest extends AbstractServiceTestImpl {
     /** The known resource id. */
     private String knownResourceId = null;
     private String LENDER_REF_NAME =
-            "urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Harry Lender)'Harry Lender'";
+            "urn:cspace:org.collectionspace.demo:personauthorities:name(TestPersonAuth):item:name(HarryLender)'Harry Lender'";
+    private final static String CURRENT_DATE_UTC =
+            GregorianCalendarDateTimeUtils.currentDateUTC();
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
@@ -477,7 +480,6 @@ public class LoaninServiceTest extends AbstractServiceTestImpl {
 
         // Update the content of this resource.
         loaninCommon.setLoanInNumber("updated-" + loaninCommon.getLoanInNumber());
-        loaninCommon.setLoanReturnDate("updated-" + loaninCommon.getLoanReturnDate());
         loaninCommon.setLoanInNote("updated-" + loaninCommon.getLoanInNote());
         if (logger.isDebugEnabled()) {
             logger.debug("to be updated object");
@@ -513,8 +515,8 @@ public class LoaninServiceTest extends AbstractServiceTestImpl {
         Assert.assertNotNull(updatedLoaninCommon);
 
         // Check selected fields in the updated common part.
-        Assert.assertEquals(updatedLoaninCommon.getLoanReturnDate(),
-                loaninCommon.getLoanReturnDate(),
+        Assert.assertEquals(updatedLoaninCommon.getLoanInNumber(),
+                loaninCommon.getLoanInNumber(),
                 "Data in updated object did not match submitted data.");
 
         if (logger.isDebugEnabled()) {
@@ -831,7 +833,7 @@ public class LoaninServiceTest extends AbstractServiceTestImpl {
 
         LoansinCommon loaninCommon = new LoansinCommon();
         loaninCommon.setLoanInNumber(loaninNumber);
-        loaninCommon.setLoanReturnDate(returnDate);
+        loaninCommon.setLoanReturnDate(CURRENT_DATE_UTC);
         LenderGroupList lenderGroupList = new LenderGroupList();
         LenderGroup lenderGroup = new LenderGroup();
         lenderGroup.setLender(LENDER_REF_NAME);
index 9fe86ee6784d333bdeb427b090d9d2ec624e61a9..f330feae4768b1e8cd30c7105b0a8421cffb8649 100644 (file)
 -->
 <!-- See http://wiki.collectionspace.org/display/collectionspace/Loans+In+Schema -->    
     
-    <!-- loanin -->
+    <!--  Loan In Information Group -->
     <xs:element name="loansin_common">
         <xs:complexType>
-            <xs:sequence>                
-                <!--  Loan In Information Group -->
+            <xs:sequence> 
                 <xs:element name="loanInNumber" type="xs:string"/>
                 <xs:element name="lenderGroupList" type="lenderGroupList"/>
                 <xs:element name="loanInContact" type="xs:string"/>
+                <xs:element name="borrowersContact" type="xs:string"/>
                 <xs:element name="borrowersAuthorizer" type="xs:string"/>
+                <xs:element name="borrowersAuthorizationDate" type="xs:string"/>
                 <xs:element name="loanInConditions" type="xs:string"/>
                 <xs:element name="loanInDate" type="xs:string"/>
                 <xs:element name="loanReturnDate" type="xs:string"/>
                 <xs:element name="loanRenewalApplicationDate" type="xs:string"/>
                 <xs:element name="loanInNote" type="xs:string"/>
                 <xs:element name="loanPurpose" type="xs:string"/>
+                <xs:element name="loanStatusGroupList" type="loanStatusGroupList"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
 
     <xs:complexType name="lenderGroupList">
-       <xs:sequence>
-           <xs:element name="lenderGroup" type="lenderGroup" minOccurs="0"
+        <xs:sequence>
+            <xs:element name="lenderGroup" type="lenderGroup" minOccurs="0"
                    maxOccurs="unbounded"/>
-       </xs:sequence>
+        </xs:sequence>
     </xs:complexType>
 
     <xs:complexType name="lenderGroup">
-       <xs:sequence>
-           <xs:element name="lender" type="xs:string"/>
-           <xs:element name="lendersAuthorizer" type="xs:string"/>
-           <xs:element name="lendersAuthorizationDate" type="xs:string"/>
-           <xs:element name="lendersContact" type="xs:string"/>
-       </xs:sequence>
+        <xs:sequence>
+            <xs:element name="lender" type="xs:string"/>
+            <xs:element name="lendersAuthorizer" type="xs:string"/>
+            <xs:element name="lendersAuthorizationDate" type="xs:string"/>
+            <xs:element name="lendersContact" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="loanStatusGroupList">
+        <xs:sequence>
+            <xs:element name="loanStatusGroup" type="loanStatusGroup" minOccurs="0"
+                   maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="loanStatusGroup">
+        <xs:sequence>
+            <xs:element name="loanStatus" type="xs:string"/>
+            <xs:element name="loanStatusDate" type="xs:string"/>
+            <xs:element name="loanStatusNote" type="xs:string"/>
+        </xs:sequence>
     </xs:complexType>
     
 </xs:schema>
index 428076085428e60fe46017d3bf08becd0663947f..d29df396ffc0fef12b9ca802746065e1ae581858 100644 (file)
     <!--  Loan Out Information Group -->\r
     <xs:element name="loanOutNumber" type="xs:string"/>\r
     <xs:element name="borrower" type="xs:string"/>\r
+    <xs:element name="borrowersAuthorizer" type="xs:string"/>\r
+    <xs:element name="borrowersAuthorizationDate" type="xs:date"/>\r
     <xs:element name="borrowersContact" type="xs:string"/>\r
     <xs:element name="lendersAuthorizer" type="xs:string"/>\r
-    <xs:element name="lendersAuthorizationDate" type="xs:string"/>\r
+    <xs:element name="lendersAuthorizationDate" type="xs:date"/>\r
     <xs:element name="lendersContact" type="xs:string"/>\r
 \r
     <xs:element name="loanedObjectStatusGroupList" type="loanedObjectStatusGroupList"/>\r
     \r
-    <xs:element name="loanOutDate" type="xs:string"/>\r
-    <xs:element name="loanReturnDate" type="xs:string"/>\r
-    <xs:element name="loanRenewalApplicationDate" type="xs:string"/>\r
+    <xs:element name="loanOutDate" type="xs:date"/>\r
+    <xs:element name="loanReturnDate" type="xs:date"/>\r
+    <xs:element name="loanRenewalApplicationDate" type="xs:date"/>\r
     <xs:element name="specialConditionsOfLoan" type="xs:string"/>\r
     <xs:element name="loanOutNote" type="xs:string"/>\r
     <xs:element name="loanPurpose" type="xs:string"/>\r
         </xs:sequence>\r
     </xs:complexType>\r
 \r
-    <xs:complexType name="loanedObjectStatusGroup">\r
+    <xs:complexType name="loanStatusGroup">\r
         <xs:sequence>\r
-            <xs:element name="loanedObjectStatus" type="xs:string"/>\r
-            <xs:element name="loanedObjectStatusDate" type="xs:string"/>\r
-            <xs:element name="loanedObjectStatusNote" type="xs:string"/>\r
+            <xs:element name="loanStatus" type="xs:string"/>\r
+            <xs:element name="loanStatusDate" type="xs:date"/>\r
+            <xs:element name="loanStatusNote" type="xs:string"/>\r
         </xs:sequence>\r
     </xs:complexType>\r
     \r
index 960397b6468a3d7472fa1f6eda3e885c6763a453..e33b8f3e7d08750bf55da2abd201ad9d9677027e 100644 (file)
@@ -33,6 +33,7 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanout.LoanedObjectStatusGroup;
 import org.collectionspace.services.loanout.LoanedObjectStatusGroupList;
@@ -60,6 +61,8 @@ public class LoanoutServiceTest extends AbstractServiceTestImpl {
     private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
     /** The known resource id. */
     private String knownResourceId = null;
+    private final static String CURRENT_DATE_UTC =
+        GregorianCalendarDateTimeUtils.currentDateUTC();
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
@@ -436,7 +439,6 @@ public class LoanoutServiceTest extends AbstractServiceTestImpl {
 
         // Update the content of this resource.
         loanoutCommon.setLoanOutNumber("updated-" + loanoutCommon.getLoanOutNumber());
-        loanoutCommon.setLoanReturnDate("updated-" + loanoutCommon.getLoanReturnDate());
         LoanedObjectStatusGroupList statusGroupList = loanoutCommon.getLoanedObjectStatusGroupList();
         Assert.assertNotNull(statusGroupList);
         List<LoanedObjectStatusGroup> statusGroups = statusGroupList.getLoanedObjectStatusGroup();
@@ -480,8 +482,8 @@ public class LoanoutServiceTest extends AbstractServiceTestImpl {
         Assert.assertNotNull(updatedLoanoutCommon);
 
         // Check selected fields in the updated resource.
-        Assert.assertEquals(updatedLoanoutCommon.getLoanReturnDate(),
-                loanoutCommon.getLoanReturnDate(),
+        Assert.assertEquals(updatedLoanoutCommon.getLoanOutNumber(),
+                loanoutCommon.getLoanOutNumber(),
                 "Data in updated object did not match submitted data.");
 
         LoanedObjectStatusGroupList updatedStatusGroupList =
@@ -773,7 +775,7 @@ public class LoanoutServiceTest extends AbstractServiceTestImpl {
     private PoxPayloadOut createLoanoutInstance(String identifier) {
         return createLoanoutInstance(
                 "loanoutNumber-" + identifier,
-                "returnDate-" + identifier);
+                CURRENT_DATE_UTC);
     }
 
     /**
@@ -789,9 +791,9 @@ public class LoanoutServiceTest extends AbstractServiceTestImpl {
         loanoutCommon.setLoanOutNumber(loanOutNumber);
         loanoutCommon.setLoanReturnDate(returnDate);
         loanoutCommon.setBorrower(
-                "urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum'");
+                "urn:cspace:org.collectionspace.demo:orgauthorities:name(TestOrgAuth):item:name(NorthernClimesMuseum)'Northern Climes Museum'");
         loanoutCommon.setBorrowersContact(
-                "urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Chris Contact)'Chris Contact'");
+                "urn:cspace:org.collectionspace.demo:personauthorities:name(TestPersonAuth):item:name(ChrisContact)'Chris Contact'");
         loanoutCommon.setLoanPurpose("Allow people in cold climes to share the magic of Surfboards of the 1960s.");
         LoanedObjectStatusGroupList statusGroupList = new LoanedObjectStatusGroupList();
         List<LoanedObjectStatusGroup> statusGroups = statusGroupList.getLoanedObjectStatusGroup();
index 6f69e019fa3a07e1d9c3fc2165cecd07b192940e..ce575b2d02ee0c0580521192eb15d6abe0580a68 100644 (file)
@@ -34,6 +34,8 @@
                 <!--  Loan Out Information Group -->
                 <xs:element name="loanOutNumber" type="xs:string"/>
                 <xs:element name="borrower" type="xs:string"/>
+                <xs:element name="borrowersAuthorizer" type="xs:string"/>
+                <xs:element name="borrowersAuthorizationDate" type="xs:string"/>
                 <xs:element name="borrowersContact" type="xs:string"/>
                 <xs:element name="lendersAuthorizer" type="xs:string"/>
                 <xs:element name="lendersAuthorizationDate" type="xs:string"/>
index 738bf80abe1ad858e587361e9c239782321cfcf1..d0c24796d62b98aa80a3b813270c96559947a25c 100644 (file)
@@ -49,7 +49,7 @@
     <xs:complexType name="conditionGroup">
         <xs:sequence>
                                        <xs:element name="conditionNote" type="xs:string"/>
-                                       <xs:element name="conditionNoteDate" type="xs:string"/>
+                                       <xs:element name="conditionNoteDate" type="xs:date"/>
         </xs:sequence>
     </xs:complexType>
     
index 0f4e44fc3e61f8068a57ecd362710f8a053fc03c..e6df03a94e7b69e7abbb1bf477c818c15d245a79 100644 (file)
@@ -34,6 +34,7 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.client.LocationAuthorityClient;
 import org.collectionspace.services.client.LocationAuthorityClientUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
@@ -65,6 +66,8 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
     private final Logger logger = LoggerFactory.getLogger(LocationAuthorityServiceTest.class);
     private final String REFNAME = "refName";
     private final String DISPLAYNAME = "displayName";
+    private final static String CURRENT_DATE_UTC =
+        GregorianCalendarDateTimeUtils.currentDateUTC();
 
        @Override
        public String getServicePathComponent() {
@@ -94,7 +97,7 @@ public class LocationAuthorityServiceTest extends AbstractServiceTestImpl { //FI
     final String TEST_NAME = "Shelf 1";
     final String TEST_SHORTID = "shelf1";
     final String TEST_CONDITION_NOTE = "Basically clean";
-    final String TEST_CONDITION_NOTE_DATE = "June 11, 1979";
+    final String TEST_CONDITION_NOTE_DATE = CURRENT_DATE_UTC;
     final String TEST_SECURITY_NOTE = "Kind of safe";
     final String TEST_ACCESS_NOTE = "Only right-thinkers may see";
     final String TEST_ADDRESS = "123 Main Street, Anytown USA";
index c8834267a329c5cfc341909b83771b153362d405..d3b9f05dc984e6c933869997d1d75964422eaf38 100644 (file)
             <xs:element name="measurementUnit" type="xs:string"/>\r
             <xs:element name="measurementMethod" type="xs:string"/>\r
             <xs:element name="value" type="xs:decimal"/>\r
-            <xs:element name="valueDate" type="xs:dateTime"/>\r
+            <xs:element name="valueDate" type="xs:date"/>\r
             <xs:element name="valueQualifier" type="xs:string"/>\r
         </xs:sequence>\r
     </xs:complexType>\r
index 5cdf43fcbce79dfc4bff326710bd4f0e13313f45..21261a2bf4470c6089a59d412566be494e33418f 100644 (file)
@@ -24,7 +24,7 @@
     <xs:element name="currentLocation" type="xs:string"/>\r
     <xs:element name="currentLocationFitness" type="xs:string"/>\r
     <xs:element name="currentLocationNote" type="xs:string"/>\r
-    <xs:element name="locationDate" type="xs:dateTime"/>\r
+    <xs:element name="locationDate" type="xs:date"/>\r
     <xs:element name="normalLocation" type="xs:string"/>\r
     \r
     <!--  Movement Information Group -->\r
@@ -38,8 +38,8 @@
     </xs:element>\r
     <xs:element name="movementNote" type="xs:string"/>\r
     <xs:element name="movementReferenceNumber" type="xs:string"/>\r
-    <xs:element name="plannedRemovalDate" type="xs:dateTime"/>\r
-    <xs:element name="removalDate" type="xs:dateTime"/>\r
+    <xs:element name="plannedRemovalDate" type="xs:date"/>\r
+    <xs:element name="removalDate" type="xs:date"/>\r
     <xs:element name="reasonForMove" type="xs:string"/>\r
     \r
 </xs:schema>\r
index 2a10656982183af6f33719502be320d41ed5d0e0..d4c8d8b68dc17a1da63e25bc782b934040816611 100644 (file)
@@ -69,7 +69,8 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
 
     // Instance variables specific to this test.
     private String knownResourceId = null;
-    private final static String TIMESTAMP_UTC = GregorianCalendarDateTimeUtils.timestampUTC();
+    private final static String CURRENT_DATE_UTC =
+            GregorianCalendarDateTimeUtils.currentDateUTC();
     
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
@@ -307,10 +308,10 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         // Check the values of one or more date/time fields.
         if (logger.isDebugEnabled()) {
             logger.debug("locationDate=" + movementCommon.getLocationDate());
-            logger.debug("TIMESTAMP_UTC=" + TIMESTAMP_UTC);
+            logger.debug("TIMESTAMP_UTC=" + CURRENT_DATE_UTC);
         }
-        Assert.assertTrue(movementCommon.getLocationDate().equals(TIMESTAMP_UTC));
-        Assert.assertTrue(movementCommon.getPlannedRemovalDate().equals(TIMESTAMP_UTC));
+        Assert.assertTrue(movementCommon.getLocationDate().equals(CURRENT_DATE_UTC));
+        Assert.assertTrue(movementCommon.getPlannedRemovalDate().equals(CURRENT_DATE_UTC));
         Assert.assertNull(movementCommon.getRemovalDate());
         
         // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
@@ -794,7 +795,7 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         movementCommon.setCurrentLocation("currentLocation value");
         movementCommon.setCurrentLocationFitness("currentLocationFitness value");
         movementCommon.setCurrentLocationNote("currentLocationNote value");
-        movementCommon.setLocationDate(TIMESTAMP_UTC);
+        movementCommon.setLocationDate(CURRENT_DATE_UTC);
         movementCommon.setNormalLocation("normalLocation value");
         movementCommon.setMovementContact("movementContact value");
         MovementMethodsList movementMethodsList = new MovementMethodsList();
@@ -807,7 +808,7 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         movementCommon.setMovementMethods(movementMethodsList);
         movementCommon.setMovementNote(getUTF8DataFragment());
         movementCommon.setMovementReferenceNumber(movementReferenceNumber);
-        movementCommon.setPlannedRemovalDate(TIMESTAMP_UTC);
+        movementCommon.setPlannedRemovalDate(CURRENT_DATE_UTC);
         movementCommon.setRemovalDate(""); // Test empty date value
         movementCommon.setReasonForMove("reasonForMove value");
 
@@ -824,70 +825,4 @@ public class MovementServiceTest extends AbstractServiceTestImpl {
         return multipart;
     }
 
-    // FIXME Should be moved to a common class, as these are general utilities.
-    // FIXME Should be refactored to become a convenience variant of a
-    // general method to return a current datestamp or timestamp in any
-    // provided time zone.
-
-   /**
-    * Returns an ISO 8601 formatted timestamp of the
-    * current time instance in the UTC time zone.
-    */
-    public String datestampUTC() {
-        final String ISO_8601_DATE_FORMAT_PATTERN = "yyyy-MM-dd";
-        final DateFormat ISO_8601_DATE_FORMAT =
-            new SimpleDateFormat(ISO_8601_DATE_FORMAT_PATTERN);
-
-        final String UTC_TIMEZONE_IDENTIFIER = "UTC";
-        final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone(UTC_TIMEZONE_IDENTIFIER);
-
-        Date timestamp = new Date();
-        return formatDate(timestamp, UTC_TIMEZONE, ISO_8601_DATE_FORMAT);
-    }
-
-   /**
-    * Returns an ISO 8601 formatted timestamp of the
-    * current time instance in the UTC time zone.
-    */
-    public String timestampUTC() {
-        final String ISO_8601_FORMAT_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
-        final DateFormat ISO_8601_FORMAT =
-            new SimpleDateFormat(ISO_8601_FORMAT_PATTERN);
-
-        final String UTC_TIMEZONE_IDENTIFIER = "UTC";
-        final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone(UTC_TIMEZONE_IDENTIFIER);
-
-        Date timestamp = new Date();
-        return formatDate(timestamp, UTC_TIMEZONE, ISO_8601_FORMAT);
-    }
-
-   /**
-    * Formats a provided date using a provided date formatter,
-    * in the default system time zone.
-    *
-    * @param date  A date to format.
-    * @param df    A date formatter to apply.
-    * @return      A formatted date string.
-    */
-    public String formatDate(Date date, DateFormat df) {
-        return formatDate(date, TimeZone.getDefault(), df);
-    }
-
-    // FIXME Add error handling.
-
-   /**
-    * Formats a provided date using a provided date formatter,
-    * in a provided time zone.
-    *
-    * @param date  A date to format.
-    * @param tz    The time zone qualifier for the date to format.
-    * @param df    A date formatter to apply.
-    *
-    * @return      A formatted date string.
-    */
-    public String formatDate(Date date, TimeZone tz, DateFormat df) {
-        df.setTimeZone(tz);
-        return df.format(date);
-    }
-
 }
index 1aef98e8d08f72c37ef206e1ef03dd3a0edaf937..d2045e3c5499295e2f2f5baf0fa5fb6bc2180179 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
 \r
 <!--\r
-    Loan Out schema (XSD)\r
+    Object Exit schema (XSD)\r
     \r
     Entity  : ObjectExit\r
     Part    : Common\r
@@ -23,7 +23,7 @@
     <!--  ObjectExit Information Group -->\r
     <xs:element name="currentOwner" type="xs:string"/>\r
     <xs:element name="depositor" type="xs:string"/>\r
-    <xs:element name="exitDate" type="xs:string"/>\r
+    <xs:element name="exitDate" type="xs:date"/>\r
     <xs:element name="exitMethods">\r
         <xs:complexType>\r
             <xs:sequence>\r
index c82c14a5c53a1cc77a72f47b3142c585fa13770b..0fb56d74033db97ac0d66ad685a543ea35029abe 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
 <!--
-    Loan Out schema (XSD)
+    Object Exit schema (XSD)
     
     Entity  : ObjectExit
     Part    : Common