Package org.wikipediacleaner.api.request

Examples of org.wikipediacleaner.api.request.ApiPagePropsRequest


      WPCConfiguration config = wiki.getConfiguration();
      boolean useDisambig = config.getBoolean(
          WPCConfigurationBoolean.DAB_USE_DISAMBIG_MAGIC_WORD);
      if (useDisambig) {
        ApiPagePropsResult result = new ApiXmlPagePropsResult(wiki, httpClient);
        ApiPagePropsRequest request = new ApiPagePropsRequest(wiki, result);
        request.setDisambiguationStatus(pages);
        return;
      }

      // Use categories if possible
      List<Page> dabCategories = wiki.getConfiguration().getDisambiguationCategories();
      if ((dabCategories != null) && (dabCategories.size() > 0)) {
        ApiCategoriesResult result = new ApiXmlCategoriesResult(wiki, httpClient);
        ApiCategoriesRequest request = new ApiCategoriesRequest(wiki, result);
        request.setDisambiguationStatus(pages);
        return;
      }

      // Use templates otherwise
      ApiTemplatesResult result = new ApiXmlTemplatesResult(wiki, httpClient);
      ApiTemplatesRequest request = new ApiTemplatesRequest(wiki, result);
      request.setDisambiguationStatus(pages);
    }
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.request.ApiPagePropsRequest

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.