Examples of RuleFilter


Examples of lupos.rif.operator.RuleFilter

        final Set<RuleFilter> visited = new LinkedHashSet<RuleFilter>();
        while (i < predicates.size()) {
          if (!predicates.get(i).getExpression()
              .isPossibleAssignment()
              && !visited.contains(predicates.get(i))) {
            final RuleFilter temp = predicates.get(i);
            predicates.remove(temp);
            predicates.add(temp);
            visited.add(temp);
            continue;
          }
View Full Code Here

Examples of lupos.rif.operator.RuleFilter

      final BasicOperator root = this.indexScanCreator.getRoot();
      this.booleanIndex = new BooleanIndexScan((root instanceof Root)? (Root) root : null);
      this.indexScanCreator.getRoot().addSucceedingOperator(new OperatorIDTuple(this.booleanIndex, 0));
      this.booleanIndex.addPrecedingOperator(this.indexScanCreator.getRoot());
    }
    RuleFilter filter = null;
    if (!this.usesEqualities || !(expr instanceof Equality)) {
      filter = new RuleFilter(expr, this.equalityMap);
    } else {
      filter = new EqualityFilter(expr, this.equalityMap);
      this.add(this.tripleConsumer, BuildOperatorGraphRuleVisitor.keyEquality, filter);
    }
    this.booleanIndex.addSucceedingOperator(filter);
    filter.addPrecedingOperator(this.booleanIndex);
    if(arg!=null){
      filter.setSucceedingOperator((OperatorIDTuple) arg);
      ((OperatorIDTuple) arg).getOperator().addPrecedingOperator(filter);
    }
    return filter;
  }
View Full Code Here

Examples of lupos.rif.operator.RuleFilter

        Set<RuleFilter> visited = new HashSet<RuleFilter>();
        while (i < predicates.size()) {
          if (!predicates.get(i).getExpression()
              .isPossibleAssignment()
              && !visited.contains(predicates.get(i))) {
            RuleFilter temp = predicates.get(i);
            predicates.remove(temp);
            predicates.add(temp);
            visited.add(temp);
            continue;
          }
View Full Code Here

Examples of lupos.rif.operator.RuleFilter

      return pattern;
  }

  @Override
  protected RuleFilter buildRuleFilter(IExpression expr, Object arg) {
    final RuleFilter filter = new RuleFilter(expr, null);
    ((BasicOperator) arg).addSucceedingOperator(filter);
    return filter;
  }
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                ((FormComponent)form.get("servicesUrl")).processInput();
                String servicesUrl = (String)((FormComponent)form.get("servicesUrl")).getConvertedInput();
                RuleReaderService ruleReader = getRuleReaderService(servicesUrl);
                try {
                    List<ShortRule> rules = ruleReader.getMatchingRules(new RuleFilter());
                   
                    info(new StringResourceModel(GeofencePage.class.getSimpleName() +
                            ".connectionSuccessful", null).getObject());
                } catch(Exception e) {
                    error(e);
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

        System.out.println(cachedRuleReader.getStats());
        assertEquals(0, cachedRuleReader.getStats().hitCount());
        assertEquals(0, cachedRuleReader.getStats().missCount());
        assertEquals(0, cachedRuleReader.getStats().evictionCount());

        RuleFilter filter1 = new RuleFilter();
        filter1.setUser("test_1");
        RuleFilter filter2 = new RuleFilter();
        filter2.setUser("test_2");
        RuleFilter filter3 = new RuleFilter();
        filter3.setUser("test_3");

        assertNotSame(filter1, filter2);

        // expected stats
        int hitExp = 0;
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

        System.out.println(cachedRuleReader.getStats());
        assertEquals(0, cachedRuleReader.getStats().hitCount());
        assertEquals(0, cachedRuleReader.getStats().missCount());
        assertEquals(0, cachedRuleReader.getStats().evictionCount());

        RuleFilter filter1 = new RuleFilter();
        filter1.setUser("test_1");
        RuleFilter filter2 = new RuleFilter();
        filter2.setUser("test_2");
        RuleFilter filter3 = new RuleFilter();
        filter3.setUser("test_3");

        int hitExp = 0;
        int missExp = 0;
        int evictExp = 0;
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

        StoreInfo store = resource.getStore();
        WorkspaceInfo ws = store.getWorkspace();
        String workspace = ws.getName();

        // get the request infos
        RuleFilter ruleFilter = new RuleFilter(RuleFilter.SpecialFilterType.ANY);
        setRuleFilterUserOrRole(user, ruleFilter);
       
        ruleFilter.setInstance(configurationManager.getConfiguration().getInstanceName());
        if (service != null)
        {
            if ("*".equals(service))
            {
                ruleFilter.setService(RuleFilter.SpecialFilterType.ANY);
            }
            else
            {
                ruleFilter.setService(service);
            }
        } else {
            ruleFilter.setService(RuleFilter.SpecialFilterType.DEFAULT);
        }

        if (request != null)
        {
            if ("*".equals(request))
            {
                ruleFilter.setRequest(RuleFilter.SpecialFilterType.ANY);
            }
            else
            {
                ruleFilter.setRequest(request);
            }
        } else {
            ruleFilter.setRequest(RuleFilter.SpecialFilterType.DEFAULT);
        }
        ruleFilter.setWorkspace(workspace);
        ruleFilter.setLayer(layer);

        String sourceAddress = retrieveCallerIpAddress();
        if(sourceAddress != null) {
            ruleFilter.setSourceAddress(sourceAddress);
        } else {
            LOGGER.log(Level.WARNING, "No source IP address found");
            ruleFilter.setSourceAddress(RuleFilter.SpecialFilterType.DEFAULT);
        }

        LOGGER.log(Level.FINE, "ResourceInfo filter: {0}", ruleFilter);

        AccessInfo rule = rules.getAccessInfo(ruleFilter);
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

       
        for(LayerInfo layer : layers) {
          ResourceInfo resource = layer.getResource();

            // get the rule, it contains default and allowed styles
            RuleFilter ruleFilter = new RuleFilter(RuleFilter.SpecialFilterType.ANY);
            setRuleFilterUserOrRole(user, ruleFilter);           
            ruleFilter.setInstance(configurationManager.getConfiguration().getInstanceName());
            ruleFilter.setService(service);
            ruleFilter.setRequest(request);
            ruleFilter.setWorkspace(resource.getStore().getWorkspace().getName());
            ruleFilter.setLayer(resource.getName());

            LOGGER.log(Level.FINE, "Getting access limits for getLegendGraphic", ruleFilter);

            AccessInfo rule = rules.getAccessInfo(ruleFilter);
           
View Full Code Here

Examples of org.geoserver.geofence.services.dto.RuleFilter

            } else if(!configurationManager.getConfiguration().isAllowRemoteAndInlineLayers()) {
                throw new ServiceException("Remote layers are not allowed");               
            }

            // get the rule, it contains default and allowed styles
            RuleFilter ruleFilter = new RuleFilter(RuleFilter.SpecialFilterType.ANY);

            setRuleFilterUserOrRole(user, ruleFilter);
            ruleFilter.setInstance(configurationManager.getConfiguration().getInstanceName());
            ruleFilter.setService(service);
            ruleFilter.setRequest(request);
            if(info != null) {
              ruleFilter.setWorkspace(info.getStore().getWorkspace().getName());
              ruleFilter.setLayer(info.getName());
             
            } else {
              ruleFilter.setWorkspace(RuleFilter.SpecialFilterType.ANY);
              ruleFilter.setLayer(RuleFilter.SpecialFilterType.ANY);
            }

            LOGGER.log(Level.FINE, "Getting access limits for getMap", ruleFilter);

            AccessInfo rule = rules.getAccessInfo(ruleFilter);
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.