Examples of FilterPredicate


Examples of com.google.appengine.api.datastore.Query.FilterPredicate

      String marker, int maxResults, long timeoutMillis) throws IOException {
    Query query = makeQuery(bucket);
    int prefixLength;
    if (!Strings.isNullOrEmpty(prefix)) {
      Key keyPrefix = makeKey(bucket, prefix);
      query.setFilter(new FilterPredicate(KEY_RESERVED_PROPERTY, GREATER_THAN_OR_EQUAL, keyPrefix));
      prefixLength = prefix.length();
    } else {
      prefixLength = 0;
    }
    FetchOptions fetchOptions = FetchOptions.Builder.withDefaults();
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.FilterPredicate

  private static void assertFilterPredicatesEqual(
      List<FilterPredicate> expected, List<FilterPredicate> actual) {
    List<FilterPredicate> expected2 = Utils.newArrayList();
    for (FilterPredicate fp : expected) {
      if (fp.getValue() == null) {
        expected2.add(new FilterPredicate(fp.getPropertyName(), fp.getOperator(), "____null"));
      } else {
        expected2.add(fp);
      }
    }
    List<FilterPredicate> actual2 = Utils.newArrayList();
    for (FilterPredicate fp : actual) {
      if (fp.getValue() == null) {
        actual2.add(new FilterPredicate(fp.getPropertyName(), fp.getOperator(), "____null"));
      } else {
        actual2.add(fp);
      }
    }
    assertEquals(expected2, actual2);
View Full Code Here

Examples of com.google.appengine.api.datastore.Query.FilterPredicate

  private static void assertFilterPredicatesEqual(
      List<FilterPredicate> expected, List<FilterPredicate> actual) {
    List<FilterPredicate> expected2 = Utils.newArrayList();
    for (FilterPredicate fp : expected) {
      if (fp.getValue() == null) {
        expected2.add(new FilterPredicate(fp.getPropertyName(), fp.getOperator(), "____null"));
      } else {
        expected2.add(fp);
      }
    }
    List<FilterPredicate> actual2 = Utils.newArrayList();
    for (FilterPredicate fp : actual) {
      if (fp.getValue() == null) {
        actual2.add(new FilterPredicate(fp.getPropertyName(), fp.getOperator(), "____null"));
      } else {
        actual2.add(fp);
      }
    }
    assertEquals(expected2, actual2);
View Full Code Here

Examples of org.apache.ambari.server.controller.predicate.FilterPredicate

  @Override
  public Predicate toPredicate(String prop, String val) throws InvalidQueryException {
    if (val == null) {
      throw new InvalidQueryException("Filter operator is missing a required right operand.");
    }
    return new FilterPredicate(prop, val);
  }
View Full Code Here

Examples of org.jboss.weld.metadata.FilterPredicate

    public void testExclusionFilters1() {
        BeansXml xml = getBeansXml("cdi11-exclude-beans1.xml");
        Collection<Metadata<Filter>> filters = xml.getScanning().getExcludes();
        assertEquals(filters.size(), 3);
        for (Metadata<Filter> filter : filters) {
            new FilterPredicate(filter, DefaultResourceLoader.INSTANCE);
        }
    }
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

              return len;
            }
          });

        if (onlyUsePositives)
          pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
            @Override
            public boolean shouldBeReturned(Object name) {
              return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
            }
          }));
        else
          pta.paths.augmentPTA(generator.getAllSequences(0));// the PTA will have very few reject-states because we are generating few sequences and hence there will be few negative sequences.
          // In order to approximate the behaviour of our case study, we need to compute which pairs are not allowed from a reference graph and use those as if-then automata to start the inference.
        //pta.paths.augmentPTA(referenceGraph.wmethod.computeNewTestSet(referenceGraph.getInit(),1));
   
        List<List<Label>> sPlus = generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
        List<List<Label>> sMinus= generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return !((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

            }
          });

        if (onlyUsePositives)
        {
          pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
            @Override
            public boolean shouldBeReturned(Object name) {
              return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
            }
          }));
        }
        else
          pta.paths.augmentPTA(generator.getAllSequences(0));
   
        List<List<Label>> sPlus = generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
        List<List<Label>> sMinus= generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return !((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

            }
          });

        if (onlyUsePositives)
        {
          pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
            @Override
            public boolean shouldBeReturned(Object name) {
              return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
            }
          }));
        }
        else
          pta.paths.augmentPTA(generator.getAllSequences(0));
   
        List<List<Label>> sPlus = generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
        List<List<Label>> sMinus= generator.getAllSequences(0).getData(new FilterPredicate() {
          @Override
          public boolean shouldBeReturned(Object name) {
            return !((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
          }
        });
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

          pta.paths.augmentPTA(seq, referenceGraph.getVertex(seq) != null, false, null);
        }*/
        //pta.paths.augmentPTA(referenceGraph.wmethod.computeNewTestSet(referenceGraph.getInit(),1));// this one will not set any states as rejects because it uses shouldbereturned
        //referenceGraph.pathroutines.completeGraph(referenceGraph.nextID(false));
        if (onlyUsePositives)
          pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
            @Override
            public boolean shouldBeReturned(Object name) {
              return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
            }
          }));
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.FilterPredicate

          pta.paths.augmentPTA(seq, referenceGraph.getVertex(seq) != null, false, null);
        }*/
        //pta.paths.augmentPTA(referenceGraph.wmethod.computeNewTestSet(referenceGraph.getInit(),1));// this one will not set any states as rejects because it uses shouldbereturned
        //referenceGraph.pathroutines.completeGraph(referenceGraph.nextID(false));
        if (onlyUsePositives)
          pta.paths.augmentPTA(generator.getAllSequences(0).filter(new FilterPredicate() {
            @Override
            public boolean shouldBeReturned(Object name) {
              return ((statechum.analysis.learning.rpnicore.RandomPathGenerator.StateName)name).accept;
            }
          }));
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.