<p>doFilter.</p>

@param example a {@link com.greenpepper.Example} object.
@return a {@link com.greenpepper.Example} object.
193770
protected Example doFilter(Example example)
    {
        Example result = example;

        while ( !isBeginTag(result) && !isEndTag(result) )
        {
            if (result.nextSibling() == null)
            {
                return getNextEndTag(example) == null ? null : example;
            }
            result = result.nextSibling();
        }

        return filter(result.nextSibling());
    }
553748
@Override
	public <S extends T> Iterable<S> findAll(final Example<S> example) {
		final ArangoCursor cursor = findAllInternal((Pageable) null, example, new HashMap<>());
		return cursor;
	}
224872
public static <F extends Filter<C>, C extends Enum<C>> FilterBeanDescriptor<F, C> ofFilter(Class<F> filterClass) {
        return new AnnotationBasedFilterBeanDescriptor<F, C>(filterClass);
    }
267151
public static Filter createFilter(Class<? extends FilterFactory> filterFactoryClass, FilterFactoryParams params)
            throws FilterFactory.FilterNotCreatedException {
        FilterFactory filterFactory = createFilterFactory(filterFactoryClass);

        return filterFactory.createFilter(params);
    }
273943
public Predicate create(Filter filter) {
        List<Predicate> predicates = new ArrayList<>(filter.getPredicates().size());

        for (org.cdlflex.fruit.Predicate fp : filter.getPredicates()) {
            predicates.add(create(fp));
        }

        return connect(predicates, filter.getConnective());
    }
984756
public static <T extends CcgExample> List<T> filterExampleCollection(
      final CcgParser parser, List<T> examples) {
    MapReduceExecutor executor = MapReduceConfiguration.getMapReduceExecutor();

    List<T> filteredExamples = executor.filter(examples, new Predicate<T>() {
      @Override
      public boolean apply(CcgExample example) {
        return isPossibleExample(parser, example);
      }
    });

    return filteredExamples;
  }
420799
@RequestMapping(value = "branches/{branchId}/filters", method = RequestMethod.POST)
    public Ack createFilter(@PathVariable ID branchId, @RequestBody @Valid BuildFilterInput input) {
        return buildFilterService.saveFilter(branchId, input.isShared(), input.getName(), input.getType(), input.getData());
    }
1139506
@Override
  public <T extends Filter> T createFilter(Class<T> classToCreate) throws ServletException {
      
      logger.logp(Level.FINE, CLASS_NAME, "createFilter", "called for class: " + classToCreate);
      return super.createFilter(classToCreate);
  }
297825
@NotNull
    public FileFilter getFileFilter() {
        if (fileFilter == null) {
            final List<IOFileFilter> filters = new ArrayList<>();
            final Parsers parsers = config.getParsers();
            if (parsers != null) {
                final List<ParserConfig> parserConfigs = parsers.getList();
                if (parserConfigs != null) {
                    for (final ParserConfig pc : parserConfigs) {
                        final Parser<Object> pars = pc.getParser();
                        if (pars instanceof IncrementalParser) {
                            final IncrementalParser<?> parser = (IncrementalParser<?>) pars;
                            filters.add(parser.getFileFilter());
                        }
                    }
                }
            }
            fileFilter = new OrFileFilter(filters);
        }
        return fileFilter;
    }
901578
public FilterType<WebFragmentType<T>> getOrCreateFilter()
   {
      List<Node> nodeList = childNode.get("filter");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterTypeImpl<WebFragmentType<T>>(this, "filter", childNode, nodeList.get(0));
      }
      return createFilter();
   }
187797
public Model filter(Model model) {
		if(model == null || model.getLevel() != BioPAXLevel.L2)
			return model; // nothing to do

		preparePep2PEIDMap(model);

		final Model newModel = factory.createModel();
		newModel.getNameSpacePrefixMap().putAll(model.getNameSpacePrefixMap());
		newModel.setXmlBase(model.getXmlBase());
		
		// facilitate the conversion
		normalize(model);
		
		// First, map classes (and only set ID) if possible (pre-processing)
		for(BioPAXElement bpe : model.getObjects()) {
			Level3Element l3element = mapClass(bpe);
			if(l3element != null) {
				newModel.add(l3element);
			} else {
				log.debug("Skipping " + bpe + " " + bpe.getModelInterface().getSimpleName());
			}
		}
		
		/* process each L2 element (mapping properties), 
		 * except for pEPs and oCVs that must be processed as values
		 * (anyway, we do not want dangling elements)
		 */
		for(BioPAXElement e : model.getObjects()) {
			if(e instanceof physicalEntityParticipant
				|| e instanceof openControlledVocabulary) {
				continue;
			}
			
			// map properties
			traverse((Level2Element) e, newModel);
		}

		log.info("Done: new L3 model contains " + newModel.getObjects().size() + " BioPAX individuals.");
		
		// fix new model (e.g., add PathwayStep's processes to the pathway components ;))
		normalize(newModel);
		
		return newModel;
	}
73906
public Instance filterInstance(Instance x) {


		if(dataset==null){
			initialize(x);
		}		

		double z_[] = new double[H+1];

		int d = x.numAttributes() - 1; // suppose one class attribute (at the end)

		for(int k = 0; k < H; k++) {
			// for each hidden unit ...
			double a_k = 0.; 								// k-th activation (dot product)
			for(int j = 0; j < d; j++) {
				a_k += (x.value(j) * W[k][j]);
			}
			z_[k] = (a_k > 0. ? a_k : 0.);				  // <------- can change threshold here
		}
		z_[H] = x.classValue();

		Instance z = new InstanceImpl(x.weight(),z_);
		z.setDataset(dataset);

		return z;
	}
883560
private static Filter createFilter(final BundleContext bundleContext, final Class<?>... classes) {
		final StringBuilder filter = new StringBuilder();
		if (classes != null) {
			if (classes.length > 1) {
				filter.append("(|");
			}
			for (Class<?> clazz : classes) {
				filter.append("(").append(Constants.OBJECTCLASS).append("=").append(clazz.getName()).append(")");
			}
			if (classes.length > 1) {
				filter.append(")");
			}
		}
		try {
			return bundleContext.createFilter(filter.toString());
		} catch (InvalidSyntaxException e) {
			throw new IllegalArgumentException("Unexpected InvalidSyntaxException: " + e.getMessage());
		}
	}
722007
@GwtIncompatible // Class.isInstance
  public static <T> Iterable<T> filter(final Iterable<?> unfiltered, final Class<T> desiredType) {
    checkNotNull(unfiltered);
    checkNotNull(desiredType);
    return new FluentIterable<T>() {
      @Override
      public Iterator<T> iterator() {
        return Iterators.filter(unfiltered.iterator(), desiredType);
      }
    };
  }
1124088
public static FilterAdapter buildAdapter() {
    FilterAdapter adapter = new FilterAdapter();
    adapter.addFilterAdapter(
        ColumnPrefixFilter.class, new ColumnPrefixFilterAdapter());
    adapter.addFilterAdapter(
        ColumnRangeFilter.class, new ColumnRangeFilterAdapter());
    adapter.addFilterAdapter(
        KeyOnlyFilter.class, new KeyOnlyFilterAdapter());
    adapter.addFilterAdapter(
        MultipleColumnPrefixFilter.class, new MultipleColumnPrefixFilterAdapter());
    adapter.addFilterAdapter(
        TimestampsFilter.class, new TimestampsFilterAdapter());
    adapter.addFilterAdapter(
      TimestampRangeFilter.class, new TimestampRangeFilterAdapter());
    ValueFilterAdapter valueFilterAdapter = new ValueFilterAdapter();
    adapter.addFilterAdapter(
        ValueFilter.class, valueFilterAdapter);
    SingleColumnValueFilterAdapter scvfa =
        new SingleColumnValueFilterAdapter(valueFilterAdapter);
    adapter.addFilterAdapter(
        SingleColumnValueFilter.class, scvfa);
    adapter.addFilterAdapter(
        SingleColumnValueExcludeFilter.class,
        new SingleColumnValueExcludeFilterAdapter(scvfa));
    adapter.addFilterAdapter(
        ColumnPaginationFilter.class, new ColumnPaginationFilterAdapter());
    adapter.addFilterAdapter(
        FirstKeyOnlyFilter.class, new FirstKeyOnlyFilterAdapter());
    adapter.addFilterAdapter(
        ColumnCountGetFilter.class, new ColumnCountGetFilterAdapter());
    adapter.addFilterAdapter(
        RandomRowFilter.class, new RandomRowFilterAdapter());
    adapter.addFilterAdapter(
        PrefixFilter.class, new PrefixFilterAdapter());
    adapter.addFilterAdapter(
        QualifierFilter.class, new QualifierFilterAdapter());
    adapter.addFilterAdapter(
        PageFilter.class, new PageFilterAdapter());
    adapter.addFilterAdapter(
      WhileMatchFilter.class, new WhileMatchFilterAdapter(adapter));
    adapter.addFilterAdapter(
        org.apache.hadoop.hbase.filter.RowFilter.class, new RowFilterAdapter());
    adapter.addFilterAdapter(FuzzyRowFilter.class, new FuzzyRowFilterAdapter());
    adapter.addFilterAdapter(FamilyFilter.class, new FamilyFilterAdapter());
    adapter.addFilterAdapter(BigtableFilter.class, new BigtableFilterAdapter());

    // MultiRowRangeFilter only exists in hbase >= 1.1
    try {
      adapter.addFilterAdapter(
          org.apache.hadoop.hbase.filter.MultiRowRangeFilter.class,
          new MultiRowRangeFilterAdapter()
      );
    } catch (NoClassDefFoundError ignored) {
    }

    // Passing the FilterAdapter in to the FilterListAdapter is a bit
    // unfortunate, but makes adapting the FilterList's subfilters simpler.
    FilterListAdapter filterListAdapter = new FilterListAdapter(adapter);
    // FilterList implements UnsupportedStatusCollector so it should
    // be used when possible (third parameter to addFilterAdapter()).
    adapter.addFilterAdapter(
        FilterList.class, filterListAdapter, filterListAdapter);

    return adapter;
  }
954020
public DocServiceBuilder exampleRequestForMethod(Class<?> serviceType, String methodName,
                                                     Iterable<?> exampleRequests) {
        requireNonNull(serviceType, "serviceType");
        return exampleRequestForMethod(serviceType.getName(), methodName, exampleRequests);
    }
365881
public DocServiceBuilder exampleRequestForMethod(String serviceName, String methodName,
                                                     Object... exampleRequests) {
        requireNonNull(exampleRequests, "exampleRequests");
        return exampleRequestForMethod(serviceName, methodName, ImmutableList.copyOf(exampleRequests));
    }