Package org.archive.wayback.exception

Examples of org.archive.wayback.exception.ResourceIndexNotAvailableException


   */
  public SearchResults query(WaybackRequest wbRequest) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException {
    while(true) {
      RangeMember best = findBestMember();
      if(best == null) {
        throw new ResourceIndexNotAvailableException("Unable to find active range for request.");
      }
      best.noteConnectionStart();
      SearchResults results;
      try {

View Full Code Here


      // HTTP Request + parse
      document =  getHttpDocument(requestUrl);
    } catch (IOException e) {
      // TODO: better error for user:
      e.printStackTrace();
      throw new ResourceIndexNotAvailableException(e.getMessage());
    } catch (SAXException e) {
      e.printStackTrace();
      throw new ResourceIndexNotAvailableException("Unexpected SAX: " +
          e.getMessage());
    }

    SearchResults results;
    String type = wbRequest.get(WaybackConstants.REQUEST_TYPE);
View Full Code Here

        String d = getNodeNutchContent(e,NUTCH_ARCDATE);
        if(d == null) {
          d = getNodeNutchContent(e,NUTCH_ARCDATE_ALT);
        }
        if(d == null) {
          throw new ResourceIndexNotAvailableException("Missing arcdate field in search results");
        }
        if (d.length() == 17) {
            d = d.substring(0, 14);
        }
    result.put(WaybackConstants.RESULT_CAPTURE_DATE, d);
View Full Code Here

      LOGGER.info("Requesting OpenSearch: " + requestUrl);
      document =  getHttpDocument(requestUrl);
    } catch (IOException e) {
      // TODO: better error for user:
      e.printStackTrace();
      throw new ResourceIndexNotAvailableException(e.getMessage());
    } catch (SAXException e) {
      e.printStackTrace();
      throw new ResourceIndexNotAvailableException("Unexpected SAX: " +
          e.getMessage());
    }

    CaptureSearchResults results;
    if(wbRequest.isReplayRequest() || wbRequest.isCaptureQueryRequest()) {
View Full Code Here

  throws ResourceIndexNotAvailableException {
    try {
      itr.close();
    } catch (IOException e) {
      e.printStackTrace();
      throw new ResourceIndexNotAvailableException(
          e.getLocalizedMessage());
    }
  }
View Full Code Here

     
      while(itr.hasNext()) {
        results.addSearchResult(itr.next());
      }
    } catch(RuntimeIOException e) {
      throw new ResourceIndexNotAvailableException(e.getLocalizedMessage());
    } finally {
      if (itr != null) {
        cleanupIterator(itr);
      }
     
View Full Code Here

      throws ResourceIndexNotAvailableException {
   
    try {
      return adaptIterator(recordIterator(prefix,true));
    } catch (DatabaseException e) {
      throw new ResourceIndexNotAvailableException(e.getMessage());
    }
  }
View Full Code Here

  public CloseableIterator<CaptureSearchResult> getPrefixReverseIterator(String prefix)
      throws ResourceIndexNotAvailableException {
    try {
      return adaptIterator(recordIterator(prefix,false));
    } catch (DatabaseException e) {
      throw new ResourceIndexNotAvailableException(e.getMessage());
    }
  }
View Full Code Here

     
      return new AdaptedIterator<String,CaptureSearchResult>(cdxIter, this);
      
     
    } catch (IOException e) {
      throw new ResourceIndexNotAvailableException(e.toString());
    }
  }
View Full Code Here

  @Override
  public CloseableIterator<CaptureSearchResult> getPrefixReverseIterator(
      String prefix) throws ResourceIndexNotAvailableException {
   
    throw new ResourceIndexNotAvailableException("Unsupported");
  }
View Full Code Here

TOP

Related Classes of org.archive.wayback.exception.ResourceIndexNotAvailableException

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.