fixed the User element and the form of the ApplicationData dataType.xsd definition.
[vamsas.git] / src / org / vamsas / client / simpleclient / VamsasArchive.java
index 721cdf9..39681ad 100644 (file)
@@ -105,7 +105,7 @@ public class VamsasArchive {
       this.archive = archive; // archive is written in place.
       virginArchive = true;
     }
-    this.openArchive();
+    this.openArchive(); // open archive
   }
   /**
    * name of backup of existing archive that has been updated/overwritten.
@@ -578,9 +578,9 @@ public class VamsasArchive {
         if (unmarsh==null)
           log.fatal("Couldn't unmarshall document!");
         
-        object[] vobjs = (object[]) unmarsh[0];
+        object vobjs = (object) unmarsh[0];
         if (vobjs!=null) { 
-          VamsasDocument doc=(VamsasDocument) vobjs[0];
+          VamsasDocument doc=(VamsasDocument) vobjs;
           if (doc!=null)
             return doc;
         }
@@ -621,7 +621,7 @@ public class VamsasArchive {
   }
   public void putVamsasDocument(VamsasDocument doc) throws IOException, 
   org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
-    VorbaIdFactory vorba = makeDefaultFactory(null);
+    VorbaIdFactory vorba = makeDefaultFactory(getVorba());
     VorbaXmlBinder.putVamsasDocument(getDocumentOutputStream(), vorba, doc);
   }
 }