import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.vamsas.client.IClientAppdata;
import org.vamsas.client.Vobject;
import org.vamsas.client.VorbaId;
import org.vamsas.client.simpleclient.ClientDocument;
import org.vamsas.objects.utils.ProvenanceStuff;
// simple holder to pass to client.
-public class ClientDoc {
+public class ClientDoc extends org.vamsas.client.ClientDocument {
+ /* (non-Javadoc)
+ * @see org.vamsas.client.IClientDocument#getClientAppdata()
+ */
+ public IClientAppdata getClientAppdata() {
+ throw new Error("Appdata access is not implemented in the test.simpleclient.ClientDoc instance."); // TODO Auto-generated method stub
+ }
protected boolean isModified=false;
private Log log = LogFactory.getLog(ClientDoc.class);
protected VamsasDocument doc;
* @param user
*/
public ClientDoc(VamsasDocument doc, VamsasArchive iohandler, VamsasArchiveReader reader, String app, String user, Hashtable objrefs) {
- super();
+ super(objrefs, (iohandler!=null) ? iohandler.getVorba() : null);
this.doc = doc;
this.iohandler = iohandler;
this.reader = reader;
}
if (unregistered!=null) {
- VorbaId id = iohandler.getVorba().makeVorbaId(unregistered);
+ VorbaId id = this._registerObject(unregistered);
log.debug("Registered object - total of "+objrefs.size()+" ids.");
return id;
}
log.warn("Null Vobject passed to registerObject.");
return null;
}
-
/*
* (non-Javadoc)
*
log.debug("getObject called on null objrefs list.");
return null;
}
- if (objrefs.containsKey(id))
- return (Vobject) objrefs.get(id);
+ if (objrefs.containsKey(id.getId()))
+ return (Vobject) objrefs.get(id.getId());
log.debug("Returning null Vobject reference for id "+id.getId());
return null;
}