/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }
/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }
/** * Assumes the <content> element's contents are plain-text and * returns its value as a string * * @return A string containing the plain-text value of the content tag. * * @throws IllegalStateException * If the content element is not a text type. */ public String getPlainTextContent() { TextConstruct textConstruct = getTextContent().getContent(); if (!(textConstruct instanceof PlainTextConstruct)) { throw new IllegalStateException( "TextConstruct object is not a PlainTextConstruct"); } return textConstruct.getPlainText(); }