@Test public void testGraphElementEvaluationWithMissingProperty() { String queryString = "MATCH (a) WHERE a.name = \"Alice\" AND __label__=\"Person\""; QueryHandler query = new QueryHandler(queryString); CNF cnf = query.getPredicates(); Properties properties = new Properties(); properties.set("age", 42); EPGMVertex vertex = new EPGMVertexFactory().createVertex("Person", properties); assertFalse(cnf.evaluate(vertex)); }
@Override public boolean evaluate(Embedding embedding, EmbeddingMetaData metaData) { for (CNFElement element : predicates) { if (!element.evaluate(embedding, metaData)) { return false; } } return true; }
CNF extends PredicateCollection<CNFElement> { @Override public boolean evaluate(Embedding embedding, EmbeddingMetaData metaData) { for (CNFElement element : predicates) { if (!element.evaluate(embedding, metaData)) { return false; } } return true; } }
CNF extends PredicateCollection<CNFElement> { @Override public boolean evaluate(Embedding embedding, EmbeddingMetaData metaData) { for (CNFElement element : predicates) { if (!element.evaluate(embedding, metaData)) { return false; } } return true; } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); }
CNF extends PredicateCollection<CNFElement> { @Override public boolean evaluate(Embedding embedding, EmbeddingMetaData metaData) { for (CNFElement element : predicates) { if (!element.evaluate(embedding, metaData)) { return false; } } return true; } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); CNF and(CNF other); CNF or(CNF other); @Override boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); @Override boolean evaluate(GraphElement graphElement); @Override String operatorName(); CNF getSubCNF(String variable); CNF getSubCNF(Set<String> variables); CNF removeSubCNF(String variable); CNF removeSubCNF(Set<String> variables); @Override Set<String> getVariables(); @Override Set<String> getPropertyKeys(String variable); }
CNF extends PredicateCollection<CNFElement> { @Override public boolean evaluate(Embedding embedding, EmbeddingMetaData metaData) { for (CNFElement element : predicates) { if (!element.evaluate(embedding, metaData)) { return false; } } return true; } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); CNF and(CNF other); CNF or(CNF other); @Override boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); @Override boolean evaluate(GraphElement graphElement); @Override String operatorName(); CNF getSubCNF(String variable); CNF getSubCNF(Set<String> variables); CNF removeSubCNF(String variable); CNF removeSubCNF(Set<String> variables); @Override Set<String> getVariables(); @Override Set<String> getPropertyKeys(String variable);  }