for(Entry e: file){ if(e instanceof client.model.parser.dom.Record){ client.model.parser.dom.Record rec = (client.model.parser.dom.Record) e; Map> map = new HashMap>(); for(String key: rec){ List newVal= new LinkedList(); Value val = rec.get(key); //TODO Multiple Values if(val instanceof BibTeXString){ BibTeXString bib = (BibTeXString) val; newVal.clear(); newVal.add(new common.data.StringValue(bib.toString())); map.put(key, newVal); } else if(val instanceof MultipleValues){ MultipleValues mult = (MultipleValues) val; newVal.clear(); for(Value multVal:mult){ if(multVal instanceof BibTeXString){ newVal.add(new common.data.StringValue(((BibTeXString) multVal).toString())); } } map.put(key, newVal); } else{ } } // CommonRecord newRec = new CommonRecord(rec.getType(),null,map); CommonRecord newRec = new CommonRecord(rec.getType(), "key", map); // setRec.add(newRec); recList.add(newRec); } }