Paragraph extends Component implements TextboxContainer,
		TextHyperlinkContainer, ControlContainer { public void setTextContent(String content) { removeTextContentImpl(getOdfElement()); Node lastNode = getOdfElement().getLastChild(); if (lastNode != null && lastNode.getNodeName() != null && (lastNode.getNodeName().equals("text:a") || lastNode.getNodeName().equals("text:span"))) { if (content != null && !content.equals("")) appendTextElements((TextAElement) lastNode, content, true); } else { if (content != null && !content.equals("")) appendTextElements(getOdfElement(), content, true); } removeEmptyHyperlink(getOdfElement()); } private  Paragraph(TextParagraphElementBase paragraphElement); static Paragraph getInstanceof(TextParagraphElementBase paragraphElement); static Paragraph newParagraph(ParagraphContainer container); void setTextContent(String content); void removeTextContent(); String getTextContent(); void setTextContentNotCollapsed(String content); void appendTextContent(String content); void appendTextContent(String content, boolean isStyleInherited); void appendTextContentNotCollapsed(String content); void setStyleName(String styleName); String getStyleName(); Document getOwnerDocument(); void remove(); ParagraphStyleHandler getStyleHandler(); @Override TextParagraphElementBase getOdfElement(); void addComment(String content, String creator); boolean isHeading(); int getHeadingLevel(); void applyHeading(boolean isHeading, int level); void applyHeading(); Font getFont(); void setFont(Font font); HorizontalAlignmentType getHorizontalAlignment(); void setHorizontalAlignment(HorizontalAlignmentType alignType); Textbox addTextbox(); Iterator<Textbox> getTextboxIterator(); boolean removeTextbox(Textbox box); OdfElement getFrameContainerElement(); Textbox addTextbox(FrameRectangle position); Textbox getTextboxByName(String name); List<Textbox> getTextboxByUsage(PresentationDocument.PresentationClass usage); TextHyperlink applyHyperlink(URI linkto); Iterator<TextHyperlink> getHyperlinkIterator(); void removeHyperlinks(); TextHyperlink appendHyperlink(String text, URI linkto); Control createDrawControl(); OdfElement getDrawControlContainerElement();  }
@Test public void testSetTextContent() { TextDocument doc; try { doc = TextDocument.newTextDocument(); int i; for (i = 0; i < PLAIN_TEXT.length; i++) { Paragraph para = Paragraph.newParagraph(doc); para.setTextContent(PLAIN_TEXT[i]); compareResults(para.getOdfElement(), PLAIN_TEXT[i], ELEMENT_RESULT[i]); String content = para.getTextContent(); Assert.assertEquals(PLAIN_TEXT[i], content); } } catch (Exception e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); Assert.fail(e.getMessage()); } }