@Test public void testConvertFull() throws Exception { SAXBuilder builder = new SAXBuilder(); builder.setValidation(false); builder.setFeature("http: builder.setFeature("http: builder.setFeature("http: InputStreamReader testIS = ClassPathResourceProvider.getResourceReader(testXML); Document document = builder.build(testIS); Element sourceDocument = document.getRootElement(); String testText = NlmToDocumentTextConverter.getDocumentText(sourceDocument, null); testIS.close(); String expectedText = ClassPathResourceProvider.getResourceContent(testTXT).replaceAll(System.getProperty("line.separator"), "\n"); assertEquals(expectedText, testText); }
public static String getDocumentText(Element source, Namespace namespace) { Element articleElement = getArticleElement(source, namespace); return Joiner.on("\n").skipNulls().join(getMetadataText(articleElement), getBodyText(articleElement), getReferencesText(articleElement)); }
NlmToDocumentTextConverter { public static String getDocumentText(Element source, Namespace namespace) { Element articleElement = getArticleElement(source, namespace); return Joiner.on("\n").skipNulls().join(getMetadataText(articleElement), getBodyText(articleElement), getReferencesText(articleElement)); } }
NlmToDocumentTextConverter { public static String getDocumentText(Element source, Namespace namespace) { Element articleElement = getArticleElement(source, namespace); return Joiner.on("\n").skipNulls().join(getMetadataText(articleElement), getBodyText(articleElement), getReferencesText(articleElement)); } private  NlmToDocumentTextConverter(); }
NlmToDocumentTextConverter { public static String getDocumentText(Element source, Namespace namespace) { Element articleElement = getArticleElement(source, namespace); return Joiner.on("\n").skipNulls().join(getMetadataText(articleElement), getBodyText(articleElement), getReferencesText(articleElement)); } private  NlmToDocumentTextConverter(); static String getDocumentText(Element source, Namespace namespace); }
NlmToDocumentTextConverter { public static String getDocumentText(Element source, Namespace namespace) { Element articleElement = getArticleElement(source, namespace); return Joiner.on("\n").skipNulls().join(getMetadataText(articleElement), getBodyText(articleElement), getReferencesText(articleElement)); } private  NlmToDocumentTextConverter(); static String getDocumentText(Element source, Namespace namespace);  }