Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.PageComment


  /**
   * Action called when OK button is pressed.
   */
  public void actionOk() {
    if (page != null) {
      PageComment comment = page.getComment();
      if (comment == null) {
        comment = new PageComment();
      }
      comment.setComment(txtComments.getText());
      try {
        comment.setMaxMainArticles(Integer.valueOf(txtMaxMain.getText()));
      } catch (NumberFormatException e) {
        comment.setMaxMainArticles(null);
      }
      try {
        comment.setMaxTemplateArticles(Integer.valueOf(txtMaxTemplate.getText()));
      } catch (NumberFormatException e) {
        comment.setMaxTemplateArticles(null);
      }
      try {
        comment.setMaxOtherArticles(Integer.valueOf(txtMaxOther.getText()));
      } catch (NumberFormatException e) {
        comment.setMaxOtherArticles(null);
      }
      page.setComment(comment);
      Configuration config = Configuration.getConfiguration();
      config.addPojo(page.getWikipedia(), Configuration.POJO_PAGE_COMMENTS, comment, page.getTitle());
    }
View Full Code Here


    int backlinks = 0;
    int maxMain = 0;
    int actualMain = 0;
    for (Page page : pages) {
      if (page != null) {
        PageComment comment = page.getComment();
        Integer tmpLinks = page.getBacklinksCountInMainNamespace();
        if (tmpLinks != null) {
          backlinksMain += tmpLinks.intValue();
          if ((comment != null) && (comment.getMaxMainArticles() != null)) {
            maxMain += comment.getMaxMainArticles().intValue();
            actualMain += tmpLinks.intValue();
          }
        }
        tmpLinks = page.getBacklinksCount();
        if (tmpLinks != null) {
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.PageComment

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.