@Test public void testAppendLine() throws Exception { assertXpath("count(/Document/Page[1]/Zone[1]/Line[1]/LineCorners)", 1); assertXpath("count(/Document/Page[1]/Zone[1]/Line[1]/LineID)", 1); assertXpath("count(/Document/Page[1]/Zone[1]/Line[1]/LineNext)", 1); assertXpath("count(/Document/Page[1]/Zone[1]/Line[1]/LineNumChars)", 1); assertXpath("count(/Document/Page[1]/Zone[1]/Line[1]/Word)", 1); }
private void appendLine(Document doc, Element parent, BxLine line, Object... hints) { Element node = doc.createElement("Line"); appendPropertyIfNotNull(doc, node, "LineID", line.getId()); appendBounds(doc, node, "LineCorners", line.getBounds(), hints); appendPropertyIfNotNull(doc, node, "LineNext", line.getNextId()); appendProperty(doc, node, "LineNumChars", ""); for (BxWord word : line) { appendWord(doc, node, word, hints); } parent.appendChild(node); }
BxDocumentToTrueVizWriter { private void appendLine(Document doc, Element parent, BxLine line, Object... hints) { Element node = doc.createElement("Line"); appendPropertyIfNotNull(doc, node, "LineID", line.getId()); appendBounds(doc, node, "LineCorners", line.getBounds(), hints); appendPropertyIfNotNull(doc, node, "LineNext", line.getNextId()); appendProperty(doc, node, "LineNumChars", ""); for (BxWord word : line) { appendWord(doc, node, word, hints); } parent.appendChild(node); } }
BxDocumentToTrueVizWriter { private void appendLine(Document doc, Element parent, BxLine line, Object... hints) { Element node = doc.createElement("Line"); appendPropertyIfNotNull(doc, node, "LineID", line.getId()); appendBounds(doc, node, "LineCorners", line.getBounds(), hints); appendPropertyIfNotNull(doc, node, "LineNext", line.getNextId()); appendProperty(doc, node, "LineNumChars", ""); for (BxWord word : line) { appendWord(doc, node, word, hints); } parent.appendChild(node); }  }
BxDocumentToTrueVizWriter { private void appendLine(Document doc, Element parent, BxLine line, Object... hints) { Element node = doc.createElement("Line"); appendPropertyIfNotNull(doc, node, "LineID", line.getId()); appendBounds(doc, node, "LineCorners", line.getBounds(), hints); appendPropertyIfNotNull(doc, node, "LineNext", line.getNextId()); appendProperty(doc, node, "LineNumChars", ""); for (BxWord word : line) { appendWord(doc, node, word, hints); } parent.appendChild(node); }  String write(List<BxPage> objects, Object... hints); void write(Writer writer, List<BxPage> objects, Object... hints); }
BxDocumentToTrueVizWriter { private void appendLine(Document doc, Element parent, BxLine line, Object... hints) { Element node = doc.createElement("Line"); appendPropertyIfNotNull(doc, node, "LineID", line.getId()); appendBounds(doc, node, "LineCorners", line.getBounds(), hints); appendPropertyIfNotNull(doc, node, "LineNext", line.getNextId()); appendProperty(doc, node, "LineNumChars", ""); for (BxWord word : line) { appendWord(doc, node, word, hints); } parent.appendChild(node); }  String write(List<BxPage> objects, Object... hints); void write(Writer writer, List<BxPage> objects, Object... hints); static final String MINIMAL_OUTPUT_SIZE; static final Map<BxZoneLabel, String> ZONE_LABEL_MAP; }