@Test public void getBxDocumentWithSpecificLabelsTest() throws IOException, AnalysisException, URISyntaxException, TransformationException { InputStream testStream = ContentExtractorTest.class.getResourceAsStream(TEST_PDF_1); BxDocument testDocument; try { extractor.setPDF(testStream); testDocument = extractor.getBxDocumentWithSpecificLabels(); } finally { testStream.close(); } InputStream expStream = ContentExtractorTest.class.getResourceAsStream(EXP_STR_SPE_1); TrueVizToBxDocumentReader reader = new TrueVizToBxDocumentReader(); BxDocument expDocument = new BxDocument().setPages(reader.read(new InputStreamReader(expStream, "UTF-8"))); assertTrue(BxModelUtils.areEqual(expDocument, testDocument)); }
private BxDocument getBxDocumentWithSpecificLabels(Timeout timeout) throws AnalysisException, TimeoutException { try { TimeoutRegister.set(timeout); TimeoutRegister.get().check(); return extractor.getBxDocumentWithSpecificLabels(); } finally { TimeoutRegister.remove(); } }
ContentExtractor { private BxDocument getBxDocumentWithSpecificLabels(Timeout timeout) throws AnalysisException, TimeoutException { try { TimeoutRegister.set(timeout); TimeoutRegister.get().check(); return extractor.getBxDocumentWithSpecificLabels(); } finally { TimeoutRegister.remove(); } } }
ContentExtractor { private BxDocument getBxDocumentWithSpecificLabels(Timeout timeout) throws AnalysisException, TimeoutException { try { TimeoutRegister.set(timeout); TimeoutRegister.get().check(); return extractor.getBxDocumentWithSpecificLabels(); } finally { TimeoutRegister.remove(); } } ContentExtractor();  ContentExtractor(long timeoutSeconds); }
ContentExtractor { private BxDocument getBxDocumentWithSpecificLabels(Timeout timeout) throws AnalysisException, TimeoutException { try { TimeoutRegister.set(timeout); TimeoutRegister.get().check(); return extractor.getBxDocumentWithSpecificLabels(); } finally { TimeoutRegister.remove(); } } ContentExtractor();  ContentExtractor(long timeoutSeconds); void setTimeout(long timeoutSeconds); void removeTimeout(); void setPDF(InputStream pdfFile); void setBxDocument(BxDocument bxDocument); void reset(); ComponentConfiguration getConf(); void setConf(ComponentConfiguration conf); BxDocument getBxDocument(); BxDocument getBxDocument(long timeoutSeconds); BxDocument getBxDocumentWithGeneralLabels(); BxDocument getBxDocumentWithGeneralLabels(long timeoutSeconds); BxDocument getBxDocumentWithSpecificLabels(); BxDocument getBxDocumentWithSpecificLabels(long timeoutSeconds); List<BxImage> getImages(String imagesPrefix); List<BxImage> getImages(String imagesPrefix, long timeoutSeconds); DocumentMetadata getMetadata(); DocumentMetadata getMetadata(long timeoutSeconds); Element getMetadataAsNLM(); Element getMetadataAsNLM(long timeoutSeconds); List<BibEntry> getReferences(); List<BibEntry> getReferences(long timeoutSeconds); List<Element> getReferencesAsNLM(); List<Element> getReferencesAsNLM(long timeoutSeconds); String getRawFullText(); String getRawFullText(long timeoutSeconds); Element getLabelledFullText(); Element getLabelledFullText(long timeoutSeconds); ContentStructure getBody(); ContentStructure getBody(long timeoutSeconds); Element getBodyAsNLM(); Element getBodyAsNLM(String imagesPrefix); Element getBodyAsNLM(long timeoutSeconds); Element getBodyAsNLM(String imagesPrefix, long timeoutSeconds); Element getContentAsNLM(); Element getContentAsNLM(String imagesPrefix); Element getContentAsNLM(long timeoutSeconds); Element getContentAsNLM(String imagesPrefix, long timeoutSeconds); static void main(String[] args); }
ContentExtractor { private BxDocument getBxDocumentWithSpecificLabels(Timeout timeout) throws AnalysisException, TimeoutException { try { TimeoutRegister.set(timeout); TimeoutRegister.get().check(); return extractor.getBxDocumentWithSpecificLabels(); } finally { TimeoutRegister.remove(); } } ContentExtractor();  ContentExtractor(long timeoutSeconds); void setTimeout(long timeoutSeconds); void removeTimeout(); void setPDF(InputStream pdfFile); void setBxDocument(BxDocument bxDocument); void reset(); ComponentConfiguration getConf(); void setConf(ComponentConfiguration conf); BxDocument getBxDocument(); BxDocument getBxDocument(long timeoutSeconds); BxDocument getBxDocumentWithGeneralLabels(); BxDocument getBxDocumentWithGeneralLabels(long timeoutSeconds); BxDocument getBxDocumentWithSpecificLabels(); BxDocument getBxDocumentWithSpecificLabels(long timeoutSeconds); List<BxImage> getImages(String imagesPrefix); List<BxImage> getImages(String imagesPrefix, long timeoutSeconds); DocumentMetadata getMetadata(); DocumentMetadata getMetadata(long timeoutSeconds); Element getMetadataAsNLM(); Element getMetadataAsNLM(long timeoutSeconds); List<BibEntry> getReferences(); List<BibEntry> getReferences(long timeoutSeconds); List<Element> getReferencesAsNLM(); List<Element> getReferencesAsNLM(long timeoutSeconds); String getRawFullText(); String getRawFullText(long timeoutSeconds); Element getLabelledFullText(); Element getLabelledFullText(long timeoutSeconds); ContentStructure getBody(); ContentStructure getBody(long timeoutSeconds); Element getBodyAsNLM(); Element getBodyAsNLM(String imagesPrefix); Element getBodyAsNLM(long timeoutSeconds); Element getBodyAsNLM(String imagesPrefix, long timeoutSeconds); Element getContentAsNLM(); Element getContentAsNLM(String imagesPrefix); Element getContentAsNLM(long timeoutSeconds); Element getContentAsNLM(String imagesPrefix, long timeoutSeconds); static void main(String[] args);  }