Package net.sourceforge.jwbf.core.actions

Examples of net.sourceforge.jwbf.core.actions.Get


    StringBuffer x = new StringBuffer();
    for (int i = 0; i < types.length; i++) {
      x.append(types[i] + "|");
    }
    String result = x.substring(0, x.length() - 1);
    msg = new Get("/api.php?action=query&meta=siteinfo" + "&siprop="
        + MediaWiki.encode(result) + "&format=xml");
  }
View Full Code Here


    sa.setTitle(articlename);
    String uS = "/api.php?action=query&prop=revisions&titles="
      + MediaWiki.encode(articlename) + "&rvprop="
      + getDataProperties(properties) + getReversion(properties)
      + "&rvlimit=1" + "&format=xml";
    msg = new Get(uS);

  }
View Full Code Here

      + "?action=query"
      + "&prop=info"
      + "&intoken=" + intoken.toString().toLowerCase()
      + "&titles=" + MediaWiki.encode(title)
      + "&format=xml";
    msg = new Get(uS);

  }
View Full Code Here

    }
    sa = new SimpleArticle();
    sa.setTitle(articlename);

   
    contentGet = new Get("/" + articlename + "?action=export&format=raw&");
    versionGet = new Get("/" + articlename);
    if (LOG.isDebugEnabled()) {
      LOG.debug(contentGet.getRequest());
      LOG.debug(versionGet.getRequest());
    }
View Full Code Here

      throws ProcessException {
    if (hm == contentGet) {
      sa.setText(s);
    } else if (hm == versionGet) {
      parseVersion(s);
      metaGet = new Get("/" + sa.getTitle() + "?action=diff&version=" + version);
     
    } else if (hm == metaGet) {
      parse(s);
    }
    return "";
View Full Code Here

   *             on any requesing problems
   */
  public final byte[] getBytes(String u) throws ActionException {

    try {
      return cc.get(new Get(u));
    } catch (ProcessException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

   * @throws VersionException if not supported
   */
  public GetRendering(MediaWikiBot bot, String wikitext) throws VersionException {
    super(bot.getVersion());
    this.bot = bot;
    msg = new Get("/api.php?action=parse&text=" + MediaWiki.encode(wikitext) + "&titles=API&format=xml");


  }
View Full Code Here

      } catch (VersionException e) {
        String uS = "/index.php?title="
          + MediaWiki.encode(a.getTitle())
          + "&action=edit&dontcountme=s";
        initOldGet = new Get(uS);
        first = false;
        return initOldGet;
      } catch (JwbfException e) {
        e.printStackTrace();
      }
View Full Code Here

      + ((prefix != null) ? ("&apprefix=" + MediaWiki.encode(prefix))
          : "")
          + ((namespace != null && namespace.length() != 0) ? ("&apnamespace=" + namespace)
              : "") + "&apfilterredir=" + apfilterredir + "&aplimit="
              + LIMIT + "&format=xml";
    return new Get(uS);

  }
View Full Code Here

   * Create the request.
   */
  @SuppressWarnings("deprecation")
  public GetVersion() {

    msg = new Get("/api.php?action=query&meta=siteinfo&format=xml");

  }
View Full Code Here

TOP

Related Classes of net.sourceforge.jwbf.core.actions.Get

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.