]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Fixing missing CSID bug in CollectionObject service
authorRichard Millet <richard.millet@berkeley.edu>
Thu, 9 Apr 2009 18:39:34 +0000 (18:39 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Thu, 9 Apr 2009 18:39:34 +0000 (18:39 +0000)
HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd
HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java
HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/DomainIdentifierResource.java

index bf3dcfc21142e71af227fdacc5724ce8a2242cb6..221a00bbaaa4ae7649db00047f4ee578eeb9914f 100644 (file)
     <xs:element name="collection-object">
         <xs:complexType>
             <xs:sequence>
+                           <xs:element name="csid" type="xs:string" />
                            <xs:element name="objectNumber" type="xs:string"/>
                            <xs:element name="otherNumber" type="xs:string"/>
                            <xs:element name="briefDescription" type="xs:string"/>
index af28915c770994dfc66f39085c0931a90cf9afa2..90255d06db96982927f49ba347be9011c04b160a 100644 (file)
@@ -131,6 +131,7 @@ public class CollectionObjectResource implements CollectionSpaceResource {
                 Element element = (Element) i.next();
                 if ("docRef".equals(element.getName())){
                     csid = (String) element.getData();
+                    co.setCsid(csid);
                 }
             }
         } catch(Exception e){
@@ -139,6 +140,7 @@ public class CollectionObjectResource implements CollectionSpaceResource {
             throw new WebApplicationException(response);
         }
 
+        
         verbose("createCollectionObject: ", co);
         UriBuilder path = UriBuilder.fromResource(PersonNuxeoResource.class);
         path.path("" + csid);
index 67e30515bd48ba3c056690d2f7b88c2d06480e5d..16a465c11678bfb4e7f2405c4944f36353f22256 100644 (file)
@@ -39,7 +39,7 @@ public class DomainIdentifierResource implements CollectionSpaceResource {
         if (newId.getDsid() == null) {
                newId.setDsid("org.collectionspace");
         }
-        newId.setDsid(newId.getDsid() + System.currentTimeMillis());
+        newId.setDsid(newId.getDsid() + "." + System.currentTimeMillis());
         idDB.put(newId.getDsid(), newId);
         
         verbose("createIdentifier: ", newId);