Examples of HostMatchFilter


Examples of org.archive.wayback.resourceindex.filters.HostMatchFilter

    return getRequired(wbRequest, field, null);
  }

  private HostMatchFilter getExactHostFilter(WaybackRequest wbRequest) {

    HostMatchFilter filter = null;
    String exactHostFlag = wbRequest.get(
        WaybackConstants.REQUEST_EXACT_HOST_ONLY);
    if(exactHostFlag != null &&
        exactHostFlag.equals(WaybackConstants.REQUEST_YES)) {

      String searchUrl = wbRequest.get(WaybackConstants.REQUEST_URL);
      try {

        UURI searchURI = UURIFactory.getInstance(searchUrl);
        String exactHost = searchURI.getHost();
        filter = new HostMatchFilter(exactHost);

      } catch (URIException e) {
        // Really, this isn't gonna happen, we've already canonicalized
        // it... should really optimize and do that just once.
        e.printStackTrace();
View Full Code Here

Examples of org.archive.wayback.resourceindex.filters.HostMatchFilter

    // count how many results got past the ExclusionFilter, or how
    // many total matched, if there was no ExclusionFilter:
    CounterFilter finalCounter = new CounterFilter();
   
    // has the user asked for only results on the exact host specified?
    HostMatchFilter hostMatchFilter = getExactHostFilter(wbRequest);

    if (searchType.equals(WaybackConstants.REQUEST_REPLAY_QUERY)
        || searchType.equals(WaybackConstants.REQUEST_CLOSEST_QUERY)) {

      results = new CaptureSearchResults();
View Full Code Here

Examples of org.archive.wayback.resourceindex.filters.HostMatchFilter

   
    // Other Filters:
    if(request.isExactHost()) {
      chain.addFilter(
          new HostMatchFilter(
              UrlOperations.urlToHost(request.getRequestUrl()),
              this)
          );
    }
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.