public boolean isModified() {
return isModified;
}
- private java.util.Hashtable objrefs=null;
+ private Vector updatedObjects=null;
/**
*
* prepare Application-side dataset from the vamsas Document archive
protected ClientDocument(VamsasDocument doc, VamsasArchive docHandler, IdFactory Factory, SimpleClient sclient) {
super(Factory.getVorbaIdHash(), Factory);
+
/**
* prepare Application-side dataset from the vamsas Document archive
*/
this.sclient = sclient;
archive = docHandler;
this.doc = doc;
- objrefs = Factory.getVorbaIdHash();
+ updatedObjects=null; /// TODO: correct this line
}
/*
* @see org.vamsas.client.IClientDocument#getObject(org.vamsas.client.VorbaId)
*/
public Vobject getObject(VorbaId id) {
- if (objrefs==null) {
+ if (vamsasObjects==null) {
log.debug("getObject called on null objrefs list.");
return null;
}
- if (objrefs.containsKey(id))
- return (Vobject) objrefs.get(id);
+ if (vamsasObjects.containsKey(id))
+ return (Vobject) vamsasObjects.get(id);
log.debug("Returning null Vobject reference for id "+id.getId());
return null;
}
* @see org.vamsas.client.IClientDocument#getObjects(org.vamsas.client.VorbaId[])
*/
public Vobject[] getObjects(VorbaId[] ids) {
- if (objrefs==null) {
- log.debug("getObject[] called on null objrefs list.");
+ if (vamsasObjects==null) {
+ log.debug("getObject[] called on null vamsasObjects list.");
return null;
}
Vobject[] vo = new Vobject[ids.length];
for (int i=0,j=ids.length; i<j;i++)
- if (objrefs.containsKey(ids[i]))
- vo[i] = (Vobject) objrefs.get(ids[i]);
+ if (vamsasObjects.containsKey(ids[i]))
+ vo[i] = (Vobject) vamsasObjects.get(ids[i]);
else
log.debug("Returning null Vobject reference for id "+ids[i].getId());
return vo;
log.warn("registerObjects[] called on null document.");
return null;
}
- if (objrefs==null) {
- log.warn("registerObjects[] called for null objrefs hasharray.");
+ if (vamsasObjects==null) {
+ log.warn("registerObjects[] called for null vamsasObjects hasharray.");
return null;
}
if (unregistered!=null) {
} else {
ids[i]=registerObject(unregistered[i]);
}
- log.debug("Registered "+unregistered.length+" objects - total of "+objrefs.size()+" ids.");
+ log.debug("Registered "+unregistered.length+" objects - total of "+vamsasObjects.size()+" ids.");
return ids;
}
return null;
log.warn("registerObjects called on null document.");
return null;
}
- if (objrefs==null) {
- log.warn("registerObjects called for null objrefs hasharray.");
+ if (vamsasObjects==null) {
+ log.warn("registerObjects called for null vamsasObjects hasharray.");
return null;
}
if (unregistered!=null) {
VorbaId id = _registerObject(unregistered);
- log.debug("Registered object - total of "+objrefs.size()+" ids.");
+ log.debug("Registered object - total of "+vamsasObjects.size()+" ids.");
return id;
}
log.warn("Null Vobject passed to registerObject.");
// first write for this application - add a new section in document
ApplicationData appd = scappd.appsGlobal = new ApplicationData();
appd.setName(client.getClientName());
- appd.setUrn(client.getClientUrn());
+ // appd.setUrn(client.getClientUrn());
appd.setVersion(client.getVersion());
doc.addApplicationData(appd);
// embed or jarEntry ? - for now only jarEntry's are dealt with.
super.finalize();
}
-
+ public Vector getUpdatedObjects() {
+ return updatedObjects;
+ }
}