Package com.browseengine.bobo.api

Examples of com.browseengine.bobo.api.BrowseException


      }
      return serializableResult;
    }
    catch(IOException ioe)
    {
      throw new BrowseException(ioe.getMessage(),ioe);
    }
    finally{
      try{
        if (browsable!=null){
        browsable.close();
View Full Code Here


        if (_reader!=null)
        {
        _reader.close();
      }
    } catch (IOException e) {
      throw new BrowseException(e.getMessage(),e);
    }
  }
View Full Code Here

  }

  @SuppressWarnings("serial")
  public BrowseResult browse(BrowseRequest req) throws BrowseException {
    BrowseResult result=BrowseService.EMPTY_RESULT;
    if (req.getOffset() < 0) throw new BrowseException("Invalid offset: "+req.getOffset());
    if (_reader!=null){
      BoboBrowser browser;
      try
      {
        browser = new BoboBrowser(_reader);
      }
      catch(IOException e)
      {
        throw new BrowseException("failed to create BoboBrowser", e);
      }
      result=browser.browse(req);     
    }       
    return result;
  }
View Full Code Here

          try{
            _reader.close();
            _reader=null;
          }
          catch(IOException ioe){
            throw new BrowseException(ioe.getMessage(),ioe);
          }
        }
      }
    }
  }
View Full Code Here

  }
 
  public static BoboIndexReader getBoboIndexReader(Directory idxDir) throws BrowseException{
    try{
        if (!BoboIndexReader.indexExists(idxDir)){
            throw new BrowseException("Index does not exist at: "+idxDir);
        }
        }
        catch(IOException ioe){
            throw new BrowseException(ioe.getMessage(),ioe);
        }
           
        IndexReader reader=null;
        try{
            reader=IndexReader.open(idxDir,true);
        }
        catch(IOException ioe){
            throw new BrowseException(ioe.getMessage(),ioe);
        }
       
        BoboIndexReader bReader=null;
        try{
            bReader=BoboIndexReader.getInstance(reader);
        }
        catch(IOException ioe){
            if (reader!=null){
                try {
                    reader.close();
                } catch (IOException e) {
                    logger.error(e.getMessage(),e);
                }
            }
            throw new BrowseException(ioe.getMessage(),ioe);
        }
        return bReader;
  }
View Full Code Here

      }
      else if ("or".equals(selop)){
        return ValueOperation.ValueOperationOr;
      }
      else{
        throw new BrowseException(name+": selection operation: "+selop+" not supported");
      }
    }
    else{
      return ValueOperation.ValueOperationOr;
    }
View Full Code Here

    try {
      if (_reader != null) {
        _reader.close();
      }
    } catch (IOException e) {
      throw new BrowseException(e.getMessage(), e);
    }
  }
View Full Code Here

  }

  @Override
  public BrowseResult browse(BrowseRequest req) throws BrowseException {
    BrowseResult result = BrowseService.EMPTY_RESULT;
    if (req.getOffset() < 0) throw new BrowseException("Invalid offset: " + req.getOffset());
    if (_reader != null) {
      BoboBrowser browser;
      try {
        browser = new BoboBrowser(_reader);
      } catch (IOException e) {
        throw new BrowseException("failed to create BoboBrowser", e);
      }
      result = browser.browse(req);
    }
    return result;
  }
View Full Code Here

        if (_reader != null) {
          try {
            _reader.close();
            _reader = null;
          } catch (IOException ioe) {
            throw new BrowseException(ioe.getMessage(), ioe);
          }
        }
      }
    }
  }
View Full Code Here

  }

  public static BoboMultiReader getBoboIndexReader(Directory idxDir) throws BrowseException {
    try {
      if (!BoboMultiReader.indexExists(idxDir)) {
        throw new BrowseException("Index does not exist at: " + idxDir);
      }
    } catch (IOException ioe) {
      throw new BrowseException(ioe.getMessage(), ioe);
    }

    DirectoryReader reader = null;
    try {
      reader = DirectoryReader.open(idxDir);
    } catch (IOException ioe) {
      throw new BrowseException(ioe.getMessage(), ioe);
    }

    BoboMultiReader bReader = null;
    try {
      bReader = BoboMultiReader.getInstance(reader);
    } catch (IOException ioe) {
      if (reader != null) {
        try {
          reader.close();
        } catch (IOException e) {
          logger.error(e.getMessage(), e);
        }
      }
      throw new BrowseException(ioe.getMessage(), ioe);
    }
    return bReader;
  }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.api.BrowseException

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.