@Test public void testAppendPage() throws Exception { assertXpath("count(/Document/Page[1]/Zone)", 1); assertXpath("count(/Document/Page[1]/PageID)", 1); assertXpath("count(/Document/Page[1]/PageType)", 1); assertXpath("count(/Document/Page[1]/PageNumber)", 1); assertXpath("count(/Document/Page[1]/PageColumns)", 1); assertXpath("count(/Document/Page[1]/PageNext)", 1); assertXpath("count(/Document/Page[1]/PageZones)", 1); }
private void appendPage(Document doc, Element parent, BxPage page, Object... hints) throws TransformationException { Element node = doc.createElement("Page"); appendPropertyIfNotNull(doc, node, "PageID", page.getId()); appendProperty(doc, node, "PageType", ""); appendProperty(doc, node, "PageNumber", ""); appendProperty(doc, node, "PageColumns", ""); appendPropertyIfNotNull(doc, node, "PageNext", page.getNextId()); appendProperty(doc, node, "PageZones", ""); for (BxZone zone : page) { appendZone(doc, node, zone, hints); } parent.appendChild(node); }
BxDocumentToTrueVizWriter { private void appendPage(Document doc, Element parent, BxPage page, Object... hints) throws TransformationException { Element node = doc.createElement("Page"); appendPropertyIfNotNull(doc, node, "PageID", page.getId()); appendProperty(doc, node, "PageType", ""); appendProperty(doc, node, "PageNumber", ""); appendProperty(doc, node, "PageColumns", ""); appendPropertyIfNotNull(doc, node, "PageNext", page.getNextId()); appendProperty(doc, node, "PageZones", ""); for (BxZone zone : page) { appendZone(doc, node, zone, hints); } parent.appendChild(node); } }
BxDocumentToTrueVizWriter { private void appendPage(Document doc, Element parent, BxPage page, Object... hints) throws TransformationException { Element node = doc.createElement("Page"); appendPropertyIfNotNull(doc, node, "PageID", page.getId()); appendProperty(doc, node, "PageType", ""); appendProperty(doc, node, "PageNumber", ""); appendProperty(doc, node, "PageColumns", ""); appendPropertyIfNotNull(doc, node, "PageNext", page.getNextId()); appendProperty(doc, node, "PageZones", ""); for (BxZone zone : page) { appendZone(doc, node, zone, hints); } parent.appendChild(node); }  }
BxDocumentToTrueVizWriter { private void appendPage(Document doc, Element parent, BxPage page, Object... hints) throws TransformationException { Element node = doc.createElement("Page"); appendPropertyIfNotNull(doc, node, "PageID", page.getId()); appendProperty(doc, node, "PageType", ""); appendProperty(doc, node, "PageNumber", ""); appendProperty(doc, node, "PageColumns", ""); appendPropertyIfNotNull(doc, node, "PageNext", page.getNextId()); appendProperty(doc, node, "PageZones", ""); for (BxZone zone : page) { appendZone(doc, node, zone, hints); } parent.appendChild(node); }  String write(List<BxPage> objects, Object... hints); void write(Writer writer, List<BxPage> objects, Object... hints); }
BxDocumentToTrueVizWriter { private void appendPage(Document doc, Element parent, BxPage page, Object... hints) throws TransformationException { Element node = doc.createElement("Page"); appendPropertyIfNotNull(doc, node, "PageID", page.getId()); appendProperty(doc, node, "PageType", ""); appendProperty(doc, node, "PageNumber", ""); appendProperty(doc, node, "PageColumns", ""); appendPropertyIfNotNull(doc, node, "PageNext", page.getNextId()); appendProperty(doc, node, "PageZones", ""); for (BxZone zone : page) { appendZone(doc, node, zone, 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; }