public String getText() { return delegate.getText(); }
public String toPlainTextString() { return delegate.toPlainTextString(); }
@Override public void visitStringNode(Text node) { super.visitStringNode(node); if ((processAll || this.inBody) && !this.inScript && (!skipWhitespace || !StringUtils.isBlank(node.getText()))) { int from = node.getStartPosition(); int to = node.getEndPosition(); textSpans.add(new HtmlConverterPSpan(from, to, node.getText())); } }
/** * @see com.frameworkset.platform.cms.driver.htmlconverter.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ public void visitStringNode(Text text) { if (m_echo) { if(text.getParent() instanceof StyleTag) { StyleTag style = (StyleTag)text.getParent(); if(style.changed()) m_result.append(style.getStyleCode()); else m_result.append(text.getText()); } else if(text.getParent() instanceof ResourceTag) { ResourceTag style = (ResourceTag)text.getParent(); if(style.isChanged()) m_result.append(style.getResourceText()); else m_result.append(text.getText()); } else { m_result.append(text.getText()); } } }
/** * Called for each chunk of text (<code>StringNode</code>) visited. * * @param string * The string node being visited. */ @Override public void visitStringNode(Text string) { recurse = true; // nbsp is special case - process it like usual spaces String trimmedtext = HTMLUtils.entitiesToChars(string.getText()).replace((char) 160, ' ').trim(); if (!trimmedtext.isEmpty()) { // Hack around HTMLParser not being able to handle XHTML // RFE pending: // http://sourceforge.net/tracker/index.php?func=detail&aid=1227222&group_id=24399&atid=381402 if (firstcall && PatternConsts.XML_HEADER.matcher(trimmedtext).matches()) { writeout(string.toHtml()); return; } text = true; firstcall = false; } if (text) { queueTranslatable(string); } else { queuePrefix(string); } }
public String toHtml() { return delegate.toHtml(); }
/** * Gets the ending position of the node. * @return The end position. */ public int getEndPosition () { return (delegate.getEndPosition ()); }
/** * Gets the starting position of the node. * @return The start position. */ public int getStartPosition () { return (delegate.getStartPosition ()); }
public Node getParent() { return delegate.getParent(); }
public void visitStringNode(Text stringNode) { modifiedResult.append (stringNode.toHtml()); }
/** * @see org.opencms.util.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { if (m_echo) { m_result.append(text.getText()); } }
@Override public void visitStringNode(final Text text) { if (visitMode == VisitMode.NONE) { return; } currentSB.append(text.toPlainTextString()); }
/** * Queues the text to the translatable paragraph. * <p> * Note that the queued text (if not-purely-whitespace) will also append the * previously queued tags and whitespace tags to the translatable paragraph. * <p> * Whitespace text is simply added to the queue. */ private void queueTranslatable(Text txt) { if (!txt.toHtml().trim().isEmpty()) { translatable.addAll(afters); afters.clear(); translatable.add(txt); } else { afters.add(txt); } }
/** * @see org.opencms.util.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { if (m_echo) { m_result.append(text.getText()); } }
public String toPlainTextString() { String result = delegate.toPlainTextString(); return result.replace ('\u00a0',' '); } }
public void visitStringNode(Text stringNode) { String stringToBeSearched = stringNode.getText().toUpperCase(locale); if (!multipleSearchesWithinStrings && stringToBeSearched.indexOf(stringToFind) != -1) { foundCount++; } else if (multipleSearchesWithinStrings) { int index = -1; do { index = stringToBeSearched.indexOf(stringToFind, index+1); if (index!=-1) foundCount++; } while (index != -1); } }
/** * @see org.htmlparser.visitors.NodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { appendText(text.toPlainTextString()); }
public void visitStringNode(Text stringNode) { String stringToBeSearched = stringNode.getText().toUpperCase(locale); if (!multipleSearchesWithinStrings && stringToBeSearched.indexOf(stringToFind) != -1) { foundCount++; } else if (multipleSearchesWithinStrings) { int index = -1; do { index = stringToBeSearched.indexOf(stringToFind, index+1); if (index!=-1) foundCount++; } while (index != -1); } }
/** * @see org.htmlparser.visitors.NodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { appendText(text.toPlainTextString(), DELIMITERS, true); }
public void visitStringNode(Text TextNode) { String text = cleanText(TextNode.getText()); if (mIsInCode) { if (mExcludeCode) text = ""; else { text = mPunctCleanUp.matcher(text).replaceAll(" "); ArrayList<String> parts = new ArrayList<String>(); text = text.replaceAll("\\s", " "); for (String s: mSpaceSplit.split(text)) { if (s.length() >= mMinCodeChars) parts.add(s); } text = mSpaceJoin.join(parts); } } mTextBuffer.append(text); }