Package info.bliki.htmlcleaner

Examples of info.bliki.htmlcleaner.ContentToken


    pushNode(aTagNode);
    if (parseRecursive) {
      WikipediaParser.parseRecursive(topicDescription.trim(), this,
          false, true);
    } else {
      aTagNode.addChild(new ContentToken(topicDescription));
    }
    popNode();
  }
View Full Code Here


                        } else {
                            tag.getBodyString(countingBuffer);
                        }

                    } else if (node instanceof ContentToken) {
                        ContentToken contentToken = (ContentToken) node;
                        countingBuffer.append(contentToken.getContent());
                    } else if (node instanceof List) {
                    } else if (node instanceof WPList) {
                    } else if (node instanceof WPTable) {
                        // ignore lists and tables since they most of the time
                        // do not hold grammatically correct
View Full Code Here

    }
  }

  public void nodeToWiki(BaseToken node, StringBuilder wikiText) {
    if (node instanceof ContentToken) {
      ContentToken contentToken = (ContentToken) node;
      String content = contentToken.getContent();
      // content = content.replaceAll(" ", " ");
      content = StringUtils.replace(content, " ", " ");
      wikiText.append(content);
    } else if (node instanceof TagNode) {
      TagNode tagNode = (TagNode) node;
View Full Code Here

    }
  }

  public void nodesToPlainText(BaseToken node, StringBuilder plainText) {
    if (node instanceof ContentToken) {
      ContentToken contentToken = (ContentToken) node;
      String content = contentToken.getContent();
      content = content.replaceAll(" ", " ");
      plainText.append(content);
    } else if (node instanceof TagNode) {
      TagNode tagNode = (TagNode) node;
      List children = tagNode.getChildren();
View Full Code Here

    }
  }

  public void nodeToWiki(BaseToken node, StringBuilder wikiText) {
    if (node instanceof ContentToken) {
      ContentToken contentToken = (ContentToken) node;
      String content = contentToken.getContent();
      // content = content.replaceAll(" ", " ");
      content = StringUtils.replace(content, " ", " ");
      wikiText.append(content);
    } else if (node instanceof TagNode) {
      TagNode tagNode = (TagNode) node;
View Full Code Here

    }
  }

  public void nodesToPlainText(BaseToken node, StringBuilder plainText) {
    if (node instanceof ContentToken) {
      ContentToken contentToken = (ContentToken) node;
      String content = contentToken.getContent();
      content = content.replaceAll(" ", " ");
      plainText.append(content);
    } else if (node instanceof TagNode) {
      TagNode tagNode = (TagNode) node;
      List children = tagNode.getChildren();
View Full Code Here

    pushNode(aTagNode);
    if (parseRecursive) {
      WikipediaParser.parseRecursive(topicDescription.trim(), this, false, true);
    } else {
      aTagNode.addChild(new ContentToken(topicDescription));
    }
    popNode();
  }
View Full Code Here

    aTagNode.addAttribute("class", "externallink", true);
    aTagNode.addAttribute("title", link, true);
    aTagNode.addAttribute("rel", "nofollow", true);
    if (withoutSquareBrackets) {
      append(aTagNode);
      aTagNode.addChild(new ContentToken(linkName));
    } else {
      String trimmedText = linkName.trim();
      if (trimmedText.length() > 0) {
        pushNode(aTagNode);
        WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

    pushNode(aTagNode);
    if (parseRecursive) {
      WikipediaParser.parseRecursive(topicDescription.trim(), this, false, true);
    } else {
      aTagNode.addChild(new ContentToken(topicDescription));
    }
    popNode();

    // ContentToken text = new ContentToken(topicDescription);
    // aTagNode.addChild(text);
View Full Code Here

    append(aTagNode);
    aTagNode.addAttribute("href", isbnString, true);
    aTagNode.addAttribute("class", "external text", true);
    aTagNode.addAttribute("title", isbnString, true);
    aTagNode.addAttribute("rel", "nofollow", true);
    aTagNode.addChild(new ContentToken(isbnPureText));
  }
View Full Code Here

TOP

Related Classes of info.bliki.htmlcleaner.ContentToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.