Examples of IfilterWrapper


Examples of net.sf.regain.crawler.preparator.ifilter.IfilterWrapper

    if (dotPos == -1) {
      throw new RegainException("Can't detect file extension: " + url);
    }
    String extension = url.substring(dotPos);

    IfilterWrapper ifilter = getIfilterWrapperForExtension(extension);

    String fileName = rawDocument.getContentAsFile().getAbsolutePath();
    StringBuffer buffer = new StringBuffer(DEFAULT_BUFFER_SIZE);

    ifilter.getText(fileName, buffer);

    setCleanedContent(buffer.toString());
  }
View Full Code Here

Examples of net.sf.regain.crawler.preparator.ifilter.IfilterWrapper

   * @throws RegainException If getting the IfilterWrapper failed.
   */
  private IfilterWrapper getIfilterWrapperForExtension(String extension)
    throws RegainException
  {
    IfilterWrapper ifilter = (IfilterWrapper) mExtensionToIFilterHash.get(extension);
    if (ifilter != null) {
      // We already have a cached one -> Return it
      return ifilter;
    }

View Full Code Here

Examples of net.sf.regain.crawler.preparator.ifilter.IfilterWrapper

   * @throws RegainException If getting the IfilterWrapper failed.
   */
  private IfilterWrapper getIfilterWrapperForGuid(String ifilterGuid)
    throws RegainException
  {
    IfilterWrapper ifilter = (IfilterWrapper) mGuidToIFilterHash.get(ifilterGuid);
    if (ifilter == null) {
      ifilter = new IfilterWrapper(ifilterGuid);
      mGuidToIFilterHash.put(ifilterGuid, ifilter);
    }

    return ifilter;
  }
View Full Code Here

Examples of net.sf.regain.crawler.preparator.ifilter.IfilterWrapper

  // overridden
  public void close() throws RegainException {
    // Close all ifilters
    Iterator ifilterIter = mGuidToIFilterHash.values().iterator();
    while (ifilterIter.hasNext()) {
      IfilterWrapper ifilter = (IfilterWrapper) ifilterIter.next();
      ifilter.close();
    }

    // Clean the hashes
    mExtensionToIFilterHash = null;
    mGuidToIFilterHash = null;
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.