Examples of WPATag


Examples of info.bliki.wiki.tags.WPATag

  /**
   * {@inheritDoc}
   */
  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    // aTagNode.addAttribute("id", "w", true);
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

    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

Examples of info.bliki.wiki.tags.WPATag

  /**
   * {@inheritDoc}
   */
  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    // aTagNode.addAttribute("id", "w", true);
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

    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

Examples of info.bliki.wiki.tags.WPATag

   */
  @Override
  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    String hrefLink;
    String description = topicDescription;
    WPATag aTagNode = new WPATag();
    if (topic.length() > 0) {
      aTagNode.addAttribute("title", topic, true);
      String encodedtopic = encodeTitleToUrl(topic, true);
      if (replaceColon()) {
        encodedtopic = encodedtopic.replace(':', '/');
      }
      hrefLink = getWikiBaseURL().replace("${title}", encodedtopic);
    } else {
      if (hashSection != null) {
        hrefLink = "";
        if (description.length() == 0) {
          description = "#" + hashSection; // #....
        }
      } else {
        hrefLink = getWikiBaseURL().replace("${title}", "");
      }
    }

    String href = hrefLink;
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

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

Examples of info.bliki.wiki.tags.WPATag

  public String encodeTitleDotUrl(String wikiTitle, boolean firstCharacterAsUpperCase) {
    return Encoder.encodeTitleDotUrl(wikiTitle, firstCharacterAsUpperCase);
  }

  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    // aTagNode.addAttribute("id", "w", true);
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

    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

Examples of info.bliki.wiki.tags.WPATag

  /**
   * {@inheritDoc}
   */
  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    // aTagNode.addAttribute("id", "w", true);
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

    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

Examples of info.bliki.wiki.tags.WPATag

    // // Show only descriptions no internal wiki links
    // ContentToken text = new ContentToken(topicDescription);
    // // append(text);
    // aTagNode.addChild(text);

    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    aTagNode.addAttribute("id", "w", true);
    String href = topic;
    if (hashSection != null) {
      href = href + '#' + hashSection;
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);
    pushNode(aTagNode);
    WikipediaParser.parseRecursive(topicDescription.trim(), this, false, true);
    popNode();
    // ContentToken text = new ContentToken(topicDescription);
    // aTagNode.addChild(text);
View Full Code Here

Examples of info.bliki.wiki.tags.WPATag

  protected void appendInternalLink(String topic, String hashSection,
      String topicDescription, String cssClass, boolean parseRecursive,
      boolean topicExists) {
    String hrefLink;
    String description = topicDescription.trim();
    WPATag aTagNode = new WPATag();
    if (topic.length() > 0) {
      String title = Encoder.normaliseTitle(topic, true, ' ', true);
      if (hashSection == null) {
        String pageName = Encoder.normaliseTitle(fPageTitle, true, ' ',
            true);
        // self link?
        if (title.equals(pageName)) {
          HTMLTag selfLink = new HTMLTag("strong");
          selfLink.addAttribute("class", "selflink", false);
          pushNode(selfLink);
          selfLink.addChild(new ContentToken(description));
          popNode();
          return;
        }
      }

      String encodedtopic = encodeTitleToUrl(topic, true);
      if (replaceColon()) {
        encodedtopic = encodedtopic.replace(':', '/');
      }
      hrefLink = getWikiBaseURL().replace("${title}", encodedtopic);
      if (!topicExists) {
        if (cssClass == null) {
          cssClass = "new";
        }
        if (hrefLink.indexOf('?') != -1) {
          hrefLink += "&";
        } else {
          hrefLink += "?";
        }
        hrefLink += "action=edit&redlink=1";
        String redlinkString = Messages.getString(getResourceBundle(),
            Messages.WIKI_TAGS_RED_LINK,
            "${title} (page does not exist)");
        title = redlinkString.replace("${title}", title);
      }
      aTagNode.addAttribute("title", title, true);
    } else {
      // assume, the own topic exists
      if (hashSection != null) {
        hrefLink = "";
        if (description.length() == 0) {
          description = "#" + hashSection; // #....
        }
      } else {
        hrefLink = getWikiBaseURL().replace("${title}", "");
      }
    }

    String href = hrefLink;
    if (topicExists && hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, false);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

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

Examples of info.bliki.wiki.tags.WPATag

  /**
   * {@inheritDoc}
   */
  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, false);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

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

Examples of info.bliki.wiki.tags.WPATag

    popNode(); // div

  }

  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    // aTagNode.addAttribute("id", "w", true);
    String href = encodeTitleToUrl(topic, true);
    if (hashSection != null) {
      href = href + '#' + encodeTitleDotUrl(hashSection, true);
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);

    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

Examples of info.bliki.wiki.tags.WPATag

      e.printStackTrace();
    }
  }

  public void appendInternalLink(String topic, String hashSection, String topicDescription, String cssClass, boolean parseRecursive) {
    WPATag aTagNode = new WPATag();
    // append(aTagNode);
    aTagNode.addAttribute("id", "w", true);
    String titleURL = Encoder.encodeTitleLocalUrl(topic);
    String href = titleURL + ".html";
    if (hashSection != null) {
      href = href + '#' + hashSection;
    }
    aTagNode.addAttribute("href", href, true);
    if (cssClass != null) {
      aTagNode.addAttribute("class", cssClass, true);
    }
    aTagNode.addObjectAttribute("wikilink", topic);
    pushNode(aTagNode);
    WikipediaParser.parseRecursive(topicDescription.trim(), this, false, true);
    popNode();
    // ContentToken text = new ContentToken(topicDescription);
    // aTagNode.addChild(text);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.