Examples of Filter


Examples of org.openfaces.component.filter.Filter

        Object data = (rowObj instanceof RowInfo)
                ? ((RowInfo) rowObj).getRowData() // RowInfo for DataTable (for storing original row indexes)
                : rowObj; // row data object for TreeTable (for there's no notion of index in TreeTable)
        boolean rowAccepted = true;
        for (int filterIndex = 0, filterCount = filters.size(); filterIndex < filterCount; filterIndex++) {
            Filter filter = filters.get(filterIndex);
            FilterCriterion filterValue = (FilterCriterion) filter.getValue();

            Predicate predicate = filterValue != null ? PredicateBuilder.build(filterValue) : null;
            boolean filterAcceptsData = predicate == null || predicate.evaluate(data);
            if (!filterAcceptsData)
                rowAccepted = false;
View Full Code Here

Examples of org.opengis.filter.Filter

  }

  private Map<VectorLayer, Filter> dtoAttributeCriterionToFilters(AttributeCriterion criterion)
      throws GeomajasException {
    Map<VectorLayer, Filter> filters = new LinkedHashMap<VectorLayer, Filter>();
    Filter f;
    VectorLayer l = configurationService.getVectorLayer(criterion.getServerLayerId());
    if (l == null) {
      throw new GeomajasException(ExceptionCode.LAYER_NOT_FOUND, criterion.getServerLayerId());
    }
View Full Code Here

Examples of org.openrdf.query.algebra.Filter

      }

      // set the filter conditions on the query pattern
      if (filterConditions.getNumberOfArguments() == 1) {
        // no second argument in the or
        expandedPattern = new Filter(expandedPattern, filterConditions.getArg(0));
      }
      else {
        expandedPattern = new Filter(expandedPattern, filterConditions);
      }

      // expand the query.
      parent.replaceChildNode(statementPattern, expandedPattern);
    }
View Full Code Here

Examples of org.opensolaris.opengrok.index.Filter

        setVerbose(false);
        setPrintProgress(false);
        setGenerateHtml(true);
        setQuickContextScan(true);
        setIgnoredNames(new IgnoredNames());
        setIncludedNames(new Filter());
        setUserPage("http://www.myserver.org/viewProfile.jspa?username=");
        setBugPage("http://bugs.myserver.org/bugdatabase/view_bug.do?bug_id=");
        setBugPattern("\\b([12456789][0-9]{6})\\b");
        setReviewPage("http://arc.myserver.org/caselog/PSARC/");
        setReviewPattern("\\b(\\d{4}/\\d{3})\\b"); // in form e.g. PSARC 2008/305
View Full Code Here

Examples of org.openstreetmap.josm.data.osm.Filter

                putValue(SHORT_DESCRIPTION,  tr("Add filter."));
                putValue(SMALL_ICON, ImageProvider.get("dialogs","add"));
            }
            @Override
            public void actionPerformed(ActionEvent e) {
                Filter filter = (Filter)SearchAction.showSearchDialog(new Filter());
                if(filter != null){
                    filterModel.addFilter(filter);
                }
            }});
        SideButton editButton = new SideButton(new AbstractAction() {
            {
                putValue(NAME, tr("Edit"));
                putValue(SHORT_DESCRIPTION, tr("Edit filter."));
                putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
            }
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectionModel().getMinSelectionIndex();
                if(index < 0) return;
                Filter f = filterModel.getFilter(index);
                Filter filter = (Filter)SearchAction.showSearchDialog(f);
                if(filter != null){
                    filterModel.setFilter(index, filter);
                }
            }
        });
        SideButton deleteButton = new SideButton(new AbstractAction() {
            {
                putValue(NAME, tr("Delete"));
                putValue(SHORT_DESCRIPTION, tr("Delete filter."));
                putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
            }
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectionModel().getMinSelectionIndex();
                if(index < 0) return;
                filterModel.removeFilter(index);
            }
        });
        SideButton upButton = new SideButton(new AbstractAction() {
            {
                putValue(NAME, tr("Up"));
                putValue(SHORT_DESCRIPTION, tr("Move filter up."));
                putValue(SMALL_ICON, ImageProvider.get("dialogs", "up"));
            }
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectionModel().getMinSelectionIndex();
                if(index < 0) return;
                filterModel.moveUpFilter(index);
                userTable.getSelectionModel().setSelectionInterval(index-1, index-1);
            }

        });
        SideButton downButton = new SideButton(new AbstractAction() {
            {
                putValue(NAME, tr("Down"));
                putValue(SHORT_DESCRIPTION, tr("Move filter down."));
                putValue(SMALL_ICON, ImageProvider.get("dialogs", "down"));
            }
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectionModel().getMinSelectionIndex();
                if(index < 0) return;
                filterModel.moveDownFilter(index);
                userTable.getSelectionModel().setSelectionInterval(index+1, index+1);
            }
        });

        // Toggle filter "enabled" on Enter
        InputMapUtils.addEnterAction(userTable, new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectedRow();
                if (index<0) return;
                Filter filter = filterModel.getFilter(index);
                filterModel.setValueAt(!filter.enable, index, FilterTableModel.COL_ENABLED);
            }
        });

        // Toggle filter "hiding" on Spacebar
        InputMapUtils.addSpacebarAction(userTable, new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                int index = userTable.getSelectedRow();
                if (index<0) return;
                Filter filter = filterModel.getFilter(index);
                filterModel.setValueAt(!filter.hiding, index, FilterTableModel.COL_HIDING);
            }
        });

        createLayout(userTable, true, Arrays.asList(new SideButton[] {
View Full Code Here

Examples of org.ops4j.pax.exam.util.Filter

        Class<?> type = field.getType();
        String filterString = "";
        String timeoutProp = System.getProperty(EXAM_SERVICE_TIMEOUT_KEY,
            EXAM_SERVICE_TIMEOUT_DEFAULT);
        long timeout = Integer.parseInt(timeoutProp);
        Filter filter = field.getAnnotation(Filter.class);
        if (filter != null) {
            filterString = filter.value();
            timeout = filter.timeout();
        }

        // Retrieve bundle Context just before calling getService to avoid that the bundle restarts
        // in between
        BundleContext bc = getBundleContext(targetClass, timeout);
View Full Code Here

Examples of org.osgi.framework.Filter

     */
    public Osgi2Jini() throws Exception {
        try {
            RMICodeBaseService.getRMICodeBaseService("/RMI");

            Filter filter = Activator.bc.createFilter("(&(" +
                    org.osgi.service.device.Constants.DEVICE_CATEGORY + "=" +
                    JiniDriver.DEVICE_CATEGORY + ")(" + JiniDriver.EXPORT +
                    "=*))");
            ServiceTrackerCustomizer serviceTrackerCustomizer = new JiniExporter();
            serviceTracker = new ServiceTracker(Activator.bc, filter,
View Full Code Here

Examples of org.pdfbox.filter.Filter

     * @throws IOException If there is an error parsing the stream.
     */
    private void doDecode( COSName filterName ) throws IOException
    {
        FilterManager manager = getFilterManager();
        Filter filter = manager.getFilter( filterName );
        InputStream input;

        boolean done = false;
        IOException exception = null;
        long position = unFilteredStream.getPosition();
        long length = unFilteredStream.getLength();

        if( length == 0 )
        {
            //if the length is zero then don't bother trying to decode
            //some filters don't work when attempting to decode
            //with a zero length stream.  See zlib_error_01.pdf
            unFilteredStream = new RandomAccessFileOutputStream( file );
            done = true;
        }
        else
        {
            //ok this is a simple hack, sometimes we read a couple extra
            //bytes that shouldn't be there, so we encounter an error we will just
            //try again with one less byte.
            for( int tryCount=0; !done && tryCount<5; tryCount++ )
            {
                try
                {
                    input = new BufferedInputStream(
                        new RandomAccessFileInputStream( file, position, length ), BUFFER_SIZE );
                    unFilteredStream = new RandomAccessFileOutputStream( file );
                    filter.decode( input, unFilteredStream, this );
                    done = true;
                }
                catch( IOException io )
                {
                    length--;
View Full Code Here

Examples of org.platformlayer.Filter

    }
  }

  @Override
  public List<Machine> getMachines(boolean required) throws OpsException {
    Filter parentFilter = TagFilter.byTag(Tag.buildParentTag(model.getKey()));

    List<Machine> machines = Lists.newArrayList();

    for (SolrServer server : platformLayer.listItems(SolrServer.class, parentFilter)) {
      Machine machine = instances.getMachine(server, required);
View Full Code Here

Examples of org.radeox.filter.Filter

        RenderContext context = new BaseRenderContext();
       
        InitialRenderContext initialContext = new BaseInitialRenderContext();
        initialContext.set(RenderContext.INPUT_LOCALE, new Locale("atabaque", ""));
        initialContext.set(RenderContext.OUTPUT_LOCALE, new Locale("atabaque", ""));
        Filter filter = new UnderlineFilter();
        filter.setInitialContext(initialContext);
        RenderEngine engineWithContext = new BaseRenderEngine(initialContext);
        return engineWithContext.render(arg, context);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.