@Test public void testMultiple() throws TransformationException { assertEquals(StringUtils.join(bibtexEntries, "\n\n"), writer.writeAll(bibEntries)); StringWriter sw = new StringWriter(); writer.writeAll(sw, bibEntries); assertEquals(StringUtils.join(bibtexEntries, "\n\n"), sw.toString()); }
@Override public String writeAll(List<BibEntry> objects, Object... hints) throws TransformationException { StringBuilder sb = new StringBuilder(); for (BibEntry entry : objects) { sb.append(entry.toBibTeX()); sb.append("\n\n"); } return sb.toString().trim(); }
BibEntryToBibTeXWriter implements ModelToFormatWriter<BibEntry> { @Override public String writeAll(List<BibEntry> objects, Object... hints) throws TransformationException { StringBuilder sb = new StringBuilder(); for (BibEntry entry : objects) { sb.append(entry.toBibTeX()); sb.append("\n\n"); } return sb.toString().trim(); } }
BibEntryToBibTeXWriter implements ModelToFormatWriter<BibEntry> { @Override public String writeAll(List<BibEntry> objects, Object... hints) throws TransformationException { StringBuilder sb = new StringBuilder(); for (BibEntry entry : objects) { sb.append(entry.toBibTeX()); sb.append("\n\n"); } return sb.toString().trim(); }  }
BibEntryToBibTeXWriter implements ModelToFormatWriter<BibEntry> { @Override public String writeAll(List<BibEntry> objects, Object... hints) throws TransformationException { StringBuilder sb = new StringBuilder(); for (BibEntry entry : objects) { sb.append(entry.toBibTeX()); sb.append("\n\n"); } return sb.toString().trim(); }  @Override String write(BibEntry object, Object... hints); @Override void write(Writer writer, BibEntry object, Object... hints); @Override String writeAll(List<BibEntry> objects, Object... hints); @Override void writeAll(Writer writer, List<BibEntry> objects, Object... hints); }
BibEntryToBibTeXWriter implements ModelToFormatWriter<BibEntry> { @Override public String writeAll(List<BibEntry> objects, Object... hints) throws TransformationException { StringBuilder sb = new StringBuilder(); for (BibEntry entry : objects) { sb.append(entry.toBibTeX()); sb.append("\n\n"); } return sb.toString().trim(); }  @Override String write(BibEntry object, Object... hints); @Override void write(Writer writer, BibEntry object, Object... hints); @Override String writeAll(List<BibEntry> objects, Object... hints); @Override void writeAll(Writer writer, List<BibEntry> objects, Object... hints);  }