@Test public void testImporter() throws IOException, ParserConfigurationException, SAXException, TransformationException { BxPage page = new TrueVizToBxDocumentReader().read(new InputStreamReader(TrueVizToBxDocumentReaderTest.class.getResourceAsStream("/pl/edu/icm/cermine/structure/imports/MargImporterTest1.xml"), "UTF-8")).get(0); boolean contains = false; boolean rightText = false; boolean rightSize = false; for (BxZone zone : page) { if (zone.getLabel() != null) { if (zone.getLabel().equals(BxZoneLabel.MET_AUTHOR)) { contains = true; if (zone.toText().trim().equalsIgnoreCase("Howard M Schachter Ba Pham Jim King tt\nStephanie Langford David Moher".trim())) { rightText = true; } if (zone.getBounds().getX() == 72 && zone.getBounds().getY() == 778 && zone.getBounds().getWidth() == 989 && zone.getBounds().getHeight() == 122) { rightSize = true; } } } } assertTrue(contains); assertTrue(rightText); assertTrue(rightSize); BxWord word = page.getChild(0).getChild(0).getChild(0); assertEquals("font-1", word.getChild(0).getFontName()); assertEquals("font-2", word.getChild(1).getFontName()); }
public List<BxPage> read(String string, Object... hints) throws TransformationException { return read(new StringReader(string), hints); }
TrueVizToBxDocumentReader { public List<BxPage> read(String string, Object... hints) throws TransformationException { return read(new StringReader(string), hints); } }
TrueVizToBxDocumentReader { public List<BxPage> read(String string, Object... hints) throws TransformationException { return read(new StringReader(string), hints); }  }
TrueVizToBxDocumentReader { public List<BxPage> read(String string, Object... hints) throws TransformationException { return read(new StringReader(string), hints); }  List<BxPage> read(String string, Object... hints); List<BxPage> read(Reader reader, Object... hints); }
TrueVizToBxDocumentReader { public List<BxPage> read(String string, Object... hints) throws TransformationException { return read(new StringReader(string), hints); }  List<BxPage> read(String string, Object... hints); List<BxPage> read(Reader reader, Object... hints); static final Map<String, BxZoneLabel> ZONE_LABEL_MAP; }