@Override public ServiceDocumentQueryResult queryDocumentPage(String pageLink) throws BadRequestException, DocumentNotFoundException, TimeoutException, InterruptedException {
  checkNotNull(pageLink,"Cannot query documents with null pageLink");
  checkArgument(!pageLink.isEmpty(),"Cannot query documents with empty pageLink");
  pageLink=decodePageLink(pageLink);
  Operation result=get(pageLink);
  ServiceDocumentQueryResult queryResult=result.getBody(QueryTask.class).results;
  queryResult.nextPageLink=encodePageLink(queryResult.nextPageLink);
  queryResult.prevPageLink=encodePageLink(queryResult.prevPageLink);
  return queryResult;
}

@ Override public ServiceDocumentQueryResult queryDocumentPage ( String pageLink ) throws BadRequestException , DocumentNotFoundException , TimeoutException , InterruptedException { checkNotNull ( pageLink , "Cannot query documents with null pageLink" ) ; checkArgument ( ! pageLink . isEmpty ( ) , "Cannot query documents with empty pageLink" ) ; pageLink = decodePageLink ( pageLink ) ; Operation result = get ( pageLink ) ; ServiceDocumentQueryResult queryResult = result . getBody ( QueryTask . class ) . results ; queryResult . nextPageLink = encodePageLink ( queryResult . nextPageLink ) ; queryResult . prevPageLink = encodePageLink ( queryResult . prevPageLink ) ; return queryResult ; }
query a document page using the given page link .
