Page implements WikiConstants { public String getText() { Session session = wiki.__getHibernateSession(); session.beginTransaction(); String text = hibernatePage.getText(); session.getTransaction().commit(); StringBuilder sb = new StringBuilder(text); int t = 0; boolean seenLineBreak = false; char breakQue = ' '; for (int s = 0; s < sb.length(); s++) { char c = sb.charAt(s); boolean isLineBreak = c == '\n' || c == '\r'; if (isLineBreak) { if (seenLineBreak && !(c == breakQue)) { seenLineBreak = false; continue; } else { seenLineBreak = true; breakQue = c; } } else { seenLineBreak = false; } sb.setCharAt(t, isLineBreak ? '\n' : c); t++; } sb.setLength(t); return sb.toString(); } protected  Page(Wikipedia wiki, long id); protected  Page(Wikipedia wiki, int pageID);  Page(Wikipedia wiki, String pName);  Page(Wikipedia wiki, String pName, boolean useExactTitle); protected  Page(Wikipedia wiki, long id,
			de.tudarmstadt.ukp.wikipedia.api.hibernate.Page hibernatePage); int getPageId(); Set<Category> getCategories(); int getNumberOfCategories(); Set<Page> getInlinks(); int getNumberOfInlinks(); Set<Integer> getInlinkIDs(); Set<Page> getOutlinks(); int getNumberOfOutlinks(); Set<Integer> getOutlinkIDs(); Title getTitle(); Set<String> getRedirects(); String getText(); boolean isDisambiguation(); boolean isRedirect(); boolean isDiscussion(); String getPlainText();  }
@Test public void testGetText() { String expectedMarkupText = "Wikipedia API ist die wichtigste [[Software]] überhaupt.\n" + "[[JWPL|Wikipedia API]].\n\n" + "*Nicht zu übertreffen.\n\n" + "*Unglaublich\n\n" + "*[[http: "[[en:Wikipedia API]] [[fi:WikipediaAPI]]"; try { String textWithMarkup = page.getText(); assertNotNull(textWithMarkup); assertTrue(textWithMarkup.length() > 0); assertEquals(expectedMarkupText, textWithMarkup); } catch (RuntimeException e) { fail("A RuntimeException occurred while accessing the page for its text (markup): " + e.getLocalizedMessage()); } }