code: public SearchResults query(WaybackRequest wbRequest)
  			throws ResourceIndexNotAvailableException,
  			ResourceNotInArchiveException, BadQueryException,
  			AccessControlException {
  		SearchResults results = null; // return value placeholder
  
  		if (wbRequest.isReplayRequest()) {
  
  			results = doCaptureQuery(wbRequest, TYPE_REPLAY);
  			results.putFilter(WaybackRequest.REQUEST_TYPE, 
  					WaybackRequest.REQUEST_REPLAY_QUERY);
  
  		} else if (wbRequest.isCaptureQueryRequest()) {
  
  			results = doCaptureQuery(wbRequest, TYPE_CAPTURE);
  			results.putFilter(WaybackRequest.REQUEST_TYPE, 
  					WaybackRequest.REQUEST_CAPTURE_QUERY);
  
  		} else if (wbRequest.isUrlQueryRequest()) {
  
  			results = doUrlQuery(wbRequest);
  			results.putFilter(WaybackRequest.REQUEST_TYPE, 
  					WaybackRequest.REQUEST_URL_QUERY);
  
  		} else {
  
  			throw new BadQueryException("Unknown query type, must be " 
  					+ WaybackRequest.REQUEST_REPLAY_QUERY
  					+ ", " + WaybackRequest.REQUEST_CAPTURE_QUERY 
  					+ ", or " + WaybackRequest.REQUEST_URL_QUERY);
  		}
  		return results;
  	}
docs: /*
  (non-Javadoc)
  
  @see org.archive.wayback.ResourceIndex#query(org.archive.wayback.core.WaybackRequest)