protected Object visit(BinaryLogicOperator filter,Object extraData){
  LOGGER.finer("exporting LogicFilter");
  final List<FilterBuilder> filterList=new ArrayList<>();
  for (  final Filter child : filter.getChildren()) {
    child.accept(this,extraData);
    filterList.add(filterBuilder);
  }
  final FilterBuilder[] filters;
  filters=filterList.toArray(new FilterBuilder[filterList.size()]);
  if (extraData.equals("AND")) {
    filterBuilder=FilterBuilders.andFilter(filters);
  }
 else {
    filterBuilder=FilterBuilders.orFilter(filters);
  }
  return extraData;
}

protected Object visit ( BinaryLogicOperator filter , Object extraData ) { LOGGER . finer ( "exporting LogicFilter" ) ; final List < FilterBuilder > filterList = new ArrayList < > ( ) ; for ( final Filter child : filter . getChildren ( ) ) { child . accept ( this , extraData ) ; filterList . add ( filterBuilder ) ; } final FilterBuilder [ ] filters ; filters = filterList . toArray ( new FilterBuilder [ filterList . size ( ) ] ) ; if ( extraData . equals ( "AND" ) ) { filterBuilder = FilterBuilders . andFilter ( filters ) ; } else { filterBuilder = FilterBuilders . orFilter ( filters ) ; } return extraData ; }
common implementation for binarylogicoperator filters . this way they ' re all handled centrally .
