Package info.bliki.wiki.tags.util

Examples of info.bliki.wiki.tags.util.TagStack


      fToCSet = null;
      fTableOfContent = null;
      fCategoryNamespaces = new ArrayList<String>();
      fTemplateNamespaces = new ArrayList<String>();
      fImageNamespaces = new ArrayList<String>();
      fTagStack = new TagStack();
      fReferences = null;
      fReferenceNames = null;
      fRecursionLevel = 0;
      fSectionCounter = 0;
      fReplaceColon = false;
View Full Code Here


  public int stackSize() {
    return fTagStack.size();
  }

  public TagStack swapStack(TagStack stack) {
    TagStack temp = fTagStack;
    fTagStack = stack;
    return temp;
  }
View Full Code Here

   *
   * @param rawHead
   * @param headLevel
   */
  public ITableOfContent appendHead(String rawHead, int headLevel, boolean noToC, int headCounter) {
    TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(), this, true, true);

    WPTag headTagNode = new WPTag("h" + headLevel);
    headTagNode.addChildren(localStack.getNodeList());
    String tocHead = headTagNode.getBodyString();
    String anchor = Encoder.encodeUrl(tocHead);
    createTableOfContent(false);
    if (!noToC && (headCounter > 3)) {
      fTableOfContentTag.setShowToC(true);
View Full Code Here

   * @param headLevel
   */
  @Override
  public ITableOfContent appendHead(String rawHead, int headLevel, boolean noToC, int headCounter, int startPosition,
      int endPosition) {
    TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(), this, true, true);

    WPTag headTagNode = new WPTag("h" + headLevel);
    TagNode spanTagNode = new TagNode("span");
    // Example:
    // <h2><span class="mw-headline" id="Header_level_2">Header level
    // 2</span></h2>
    spanTagNode.addChildren(localStack.getNodeList());
    headTagNode.addChild(spanTagNode);
    String tocHead = headTagNode.getBodyString();
    String anchor = Encoder.encodeDotUrl(tocHead);
    createTableOfContent(false);
    if (!noToC && (headCounter > 3)) {
View Full Code Here

        if (type != null) {
          clazzValue = type + clazzValue;
        }
        captionTagNode.addAttribute("class", clazzValue, false);
        //     
        TagStack localStack = WikipediaParser.parseRecursive(caption, this, true, true);
        captionTagNode.addChildren(localStack.getNodeList());
        String altAttribute = imageFormat.getAlt();
        if (altAttribute == null) {
          altAttribute = captionTagNode.getBodyString();
          imageFormat.setAlt(Encoder.encodeHtml(altAttribute));// see issue #25
        }
View Full Code Here

      fWikiListener = null;
      fFormatter = null;
      fToCSet = null;
      fTableOfContent = null;
      fTableOfContentTag = null;
      fTagStack = new TagStack();
      fReferences = null;
      fReferenceNames = null;
      fRecursionLevel = 0;
      fTemplateRecursionCount = 0;
      fSectionCounter = 0;
View Full Code Here

  public void setUp() {
    fFormatter = null;
    fToCSet = null;
    fTableOfContent = null;
    fTableOfContentTag = null;
    fTagStack = new TagStack();
    fReferences = null;
    fReferenceNames = null;
    fRecursionLevel = 0;
    fTemplateRecursionCount = 0;
    fRedirectLink = null;
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public TagStack swapStack(TagStack stack) {
    TagStack temp = fTagStack;
    fTagStack = stack;
    return temp;
  }
View Full Code Here

   * @param rawHead
   * @param headLevel
   */
  public ITableOfContent appendHead(String rawHead, int headLevel, boolean noToC, int headCounter, int startPosition,
      int endPosition) {
    TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(), this, true, true);

    WPTag headTagNode = new WPTag("h" + headLevel);
    TagNode spanTagNode = new TagNode("span");
    // Example:
    // <h2><span class="mw-headline" id="Header_level_2">Header level
    // 2</span></h2>
    spanTagNode.addChildren(localStack.getNodeList());
    headTagNode.addChild(spanTagNode);
    String tocHead = headTagNode.getBodyString();
    String anchor = Encoder.encodeDotUrl(tocHead);
    createTableOfContent(false);
    if (!noToC && (headCounter > 3)) {
View Full Code Here

        if (type != null) {
          clazzValue = type + clazzValue;
        }
        captionTagNode.addAttribute("class", clazzValue, false);
        //     
        TagStack localStack = WikipediaParser.parseRecursive(caption, this, true, true);
        captionTagNode.addChildren(localStack.getNodeList());
        String altAttribute = imageFormat.getAlt();
        if (altAttribute == null) {
          altAttribute = captionTagNode.getBodyString();
          imageFormat.setAlt(Encoder.encodeHtml(altAttribute));// see issue #25
        }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.tags.util.TagStack

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.