public static Object[] getVamsasObjects(Reader instream,\r
VorbaIdFactory factory, Vobject root) {\r
Unmarshaller unmarshaller = new Unmarshaller(root);\r
+ final VorbaIdFactory ourfactory = factory;\r
unmarshaller.setIDResolver(new IDResolver() {\r
public Object resolve(String id) {\r
- // TODO: allow for external ID resolution\r
- VorbaXmlBinder.log\r
- .warn("Warning - id "\r
- + id\r
- + " is not found in the Vamsas XML! (TODO: Ignore if this is a forward reference!)");\r
+ if (ourfactory.warnUnresolved) {\r
+ // TODO: allow for external ID resolution\r
+ VorbaXmlBinder.log\r
+ .warn("Warning - id "\r
+ + id\r
+ + " is not found in the Vamsas XML! (TODO: Ignore if this is a forward reference!)");\r
+ }\r
return null;\r
}\r
});\r
// TODO: mark objects in oobjhash prior to unmarshalling, to detect when\r
// objects have been lost through an update.\r
// tohere\r
+ factory.warnUnresolved = false;\r
Object obj = unmarshaller.unmarshal(instream);\r
+ factory.warnUnresolved = true;\r
boolean sync = ensure_references(unrefedObj, objrefs);\r
if (!(obj instanceof Vobject))\r
return null;\r