Package com.browseengine.bobo.facets.filter

Examples of com.browseengine.bobo.facets.filter.RandomAccessFilter


      if (facetHandler == null){
        return EmptyFilter.getInstance();
      }
      List<String> selVals = entry.getValue();
      if (selVals==null || selVals.size()==0) return EmptyFilter.getInstance();
      RandomAccessFilter f = facetHandler.buildRandomAccessAndFilter(selVals.toArray(new String[0]), prop);
      if (f == EmptyFilter.getInstance()) return f;
      filterList.add(f);
    }
   
    if (filterList.size() == 0){
View Full Code Here


      }
      List<String> selVals = entry.getValue();
      if (selVals==null || selVals.size()==0){
        continue;
      }
      RandomAccessFilter f = facetHandler.buildRandomAccessOrFilter(selVals.toArray(new String[0]), prop,isNot);
      if (f == EmptyFilter.getInstance()) continue;
      filterList.add(f);
    }
   
    if (filterList.size() == 0){
View Full Code Here

    ArrayList<RandomAccessFilter> filterList = new ArrayList<RandomAccessFilter>(vals.length);

    for (String val : vals)
    {
      RandomAccessFilter f = buildRandomAccessFilter(val, prop);
      if(f != null)
      {
        filterList.add(f);
      }
      else
View Full Code Here

  }

  @Override
  public RandomAccessFilter buildRandomAccessOrFilter(String[] vals,Properties prop,boolean isNot) throws IOException
  {
    RandomAccessFilter filter = null;
    if (vals.length > 1)
    {
      MultiValueORFacetFilter f = new MultiValueORFacetFilter(this,vals,false);      // catch the "not" case later
      if (!isNot) {
        AdaptiveFacetFilter af = new AdaptiveFacetFilter(new FacetDataCacheBuilder(){
View Full Code Here

  {
    ArrayList<RandomAccessFilter> filterList = new ArrayList<RandomAccessFilter>(vals.length);
   
    for (String val : vals)
    {
      RandomAccessFilter f = buildRandomAccessFilter(val, prop);
      if(f != null)
      {
        filterList.add(f);
      }
      else
View Full Code Here

  }
 
  @Override
  public RandomAccessFilter buildRandomAccessOrFilter(String[] vals,Properties prop,boolean isNot) throws IOException
  {
    RandomAccessFilter filter = null;
   
    if(vals.length > 0)
    {
      filter = new CompactMultiValueFacetFilter(this,vals);
    }
View Full Code Here

  }

  @Override
  public RandomAccessFilter buildRandomAccessOrFilter(String[] vals,Properties prop,boolean isNot) throws IOException
  {
    RandomAccessFilter filter = null;
   
    if(vals.length > 1)
    {
      RandomAccessFilter f = new FacetOrFilter(this,vals,false);
      filter = new AdaptiveFacetFilter(new FacetDataCacheBuilder(){

      @Override
      public FacetDataCache build(BoboIndexReader reader) {
        return  getFacetData(reader);
View Full Code Here

  {
      String[] selections = sel.getValues();
      String[] notSelections = sel.getNotValues();
      Properties prop=sel.getSelectionProperties();
     
      RandomAccessFilter filter = null;
      if (selections!=null && selections.length > 0)
      {
        if (sel.getSelectionOperation() == ValueOperation.ValueOperationAnd)
        {
          filter = buildRandomAccessAndFilter(selections,prop);
          if (filter == null)
          {
            filter = EmptyFilter.getInstance();
          }
        }
        else
        {
          filter = buildRandomAccessOrFilter(selections, prop,false);
          if (filter == null)
          {
            return EmptyFilter.getInstance();
          }
        }
      }
     
      if (notSelections!=null && notSelections.length>0)
      {
        RandomAccessFilter notFilter = buildRandomAccessOrFilter(notSelections, prop, true);
        if (filter==null)
        {
          filter = notFilter;
        }
        else
        {
          RandomAccessFilter andFilter = new RandomAccessAndFilter(Arrays.asList(new RandomAccessFilter[]{filter,notFilter}));
          filter = andFilter;
        }
      }
     
      return filter;
View Full Code Here

  {
    ArrayList<RandomAccessFilter> filterList = new ArrayList<RandomAccessFilter>(vals.length);
   
    for (String val : vals)
    {
      RandomAccessFilter f = buildRandomAccessFilter(val, prop);
      if(f != null)
      {
        filterList.add(f);
      }
      else
View Full Code Here

    {
      ArrayList<RandomAccessFilter> filterList = new ArrayList<RandomAccessFilter>(vals.length);
     
      for (String val : vals)
      {
        RandomAccessFilter f = buildRandomAccessFilter(val, prop);
        if(f != null && !(f instanceof EmptyFilter))
        {
          filterList.add(f);
        }
      }
     
      RandomAccessFilter finalFilter;
      if (filterList.size() == 0)
      {
        finalFilter = EmptyFilter.getInstance();
      }
      else
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.filter.RandomAccessFilter

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.