/** * Returns the textual contents of this <code>BODY</code> tag. * Equivalent to <code>toPlainTextString()</code>. * @return The 'browser' text in this tag. */ public String getBody() { return toPlainTextString(); }
/** * Return a string representation of this <code>BODY</code> tag suitable for debugging. * @return A string representing this <code>BODY</code> tag. */ public String toString() { return "BODY: "+getBody(); } }
registerTag (new Div ()); registerTag (new Span ()); registerTag (new BodyTag ()); registerTag (new HeadTag ()); registerTag (new Html ());
registerTag (new BlockquoteTag ()); registerTag (new Span ()); registerTag (new BodyTag ()); registerTag (new HeadTag ()); registerTag (new Html ());
@Override public void visitTag(Tag tag) { if (tag instanceof LinkTag) { LinkTag linkTag = (LinkTag) tag; if (linkTag.getLink().startsWith(baseUrl) && isProbablyHtml(linkTag.getLink())) { logger.debug("Using link pointing to {}", linkTag.getLink()); linksToVisit.add(linkTag.getLink()); } else { logger.debug("Skipping link pointing to {}", linkTag.getLink()); } } else if (tag instanceof TitleTag) { TitleTag titleTag = (TitleTag) tag; title = titleTag.getTitle(); } else if (tag instanceof BodyTag) { BodyTag bodyTag = (BodyTag) tag; content = bodyTag.toPlainTextString(); } }