private static VDBData generateVDBDataInternal(DBDData dbd, DBData db) {
private static VDBData generateVDBDataInternal(DBDData dbd, DBData db) throws DBException {
private static VDBData generateVDBDataInternal(DBDData dbd, DBData db) {		VDBData vdb = new VDBData();	if (dbd!=null && db!=null) {		// extract templates		extractTemplates(dbd, db, vdb);				// add records, template instances and entries		Enumeration e = db.getStructure().elements();		while (e.hasMoreElements())		{			Object obj = e.nextElement();			if (obj instanceof DBRecordData)			{				DBRecordData dbRecord = (DBRecordData)obj;				vdb.addRecord(generateVDBRecordData(dbd, dbRecord));			}			else if (obj instanceof DBTemplateInstance)			{				DBTemplateInstance dbTemplateInstance = (DBTemplateInstance)obj;				VDBTemplateInstance vti = generateVDBTemplateInstance(dbTemplateInstance);				if (vti!=null)					vdb.addTemplateInstance(vti);			}			else if (obj instanceof DBEntry)			{				vdb.addEntry((DBEntry)obj);				}					}	}			return vdb;}