- }
- });
- final Hashtable objrefs = new Hashtable();
- if (factory.extanthashv==null)
- factory.extanthashv=new Hashtable();
- final Hashtable oobjhashes=factory.extanthashv;
- final VorbaIdFactory vorbafactory = factory;
- final Vector unrefedObj = new Vector();
- final Vector updatedObj = new Vector();
- unmarshaller.setUnmarshalListener(new VorbaXmlBinder(vorbafactory, unrefedObj, objrefs, oobjhashes, updatedObj));
- // Call the unmarshaller.
- try {
- while (instream.ready()) {
- // TODO: mark objects in oobjhash prior to unmarshalling, to detect when objects have been lost through an update.
- //tohere
- Object obj = unmarshaller.unmarshal(instream);
- boolean sync=ensure_references(unrefedObj, objrefs);
- if (!(obj instanceof Vobject))
- return null;
- vorbafactory.setNewIdHash(objrefs); // update the Document IO Handler's set of vorbaId<>Object bindings.
- return new Object[] { obj, objrefs, new Boolean(sync),updatedObj};
- }
- } catch (MarshalException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ValidationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();