Package com.browseengine.bobo.facets.filter

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


  }

  @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


  }

  @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

  {
    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

          continue;
        }
       
        FacetHitCollector facetHitCollector = null;

        RandomAccessFilter filter = null;
        if (sel != null)
        {
          filter = handler.buildFilter(sel);
        }
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

  }

  @Override
  public RandomAccessFilter buildRandomAccessFilter(String value, Properties selectionProperty)
      throws IOException {
    RandomAccessFilter retFilter = EmptyFilter.getInstance();
    ComboSelection comboSel = ComboSelection.parse(value, _separator);
    if (comboSel != null) {
      FacetHandler<?> handler = getDependedFacetHandler(comboSel.name);
      if (handler != null) {
        retFilter = handler.buildRandomAccessFilter(comboSel.val, selectionProperty);
View Full Code Here

      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);
    }
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.