Package com.google.gdata.data.webmastertools

Examples of com.google.gdata.data.webmastertools.SitemapsRegularEntry


   * @throws ServiceException if the service is unable to handle the request.
   * @throws IOException if there was an error communicating with the server.
   */
  public static SitemapsEntry insertSitemap(WebmasterToolsService myService,
      String siteUrl, String sitemapUrl) throws IOException, ServiceException {
    SitemapsRegularEntry entry = new SitemapsRegularEntry();
    entry.setId(sitemapUrl);
    entry.setSitemapType(GENERAL_WEB_SITEMAP);
    System.out.println("Sitemap: " + sitemapUrl + " now being added.");
    return myService.insert(getSitemapsFeedUrl(siteUrl), entry);
  }
View Full Code Here


  public static void deleteSitemap(WebmasterToolsService myService,
      String siteUrl, String sitemapUrl) throws IOException, ServiceException {
    String siteId = URLEncoder.encode(siteUrl, "UTF-8");
    String sitemapId = URLEncoder.encode(sitemapUrl, "UTF-8");
    URL feedUrl = new URL(getSitemapsFeedUrl(siteId) + sitemapId);
    SitemapsRegularEntry entry
        = myService.getEntry(feedUrl, SitemapsRegularEntry.class);
    System.out.println("Now deleting Sitemap: " + sitemapUrl);
    entry.delete();
  }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.webmastertools.SitemapsRegularEntry

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.