@Test public void testAsCNF() { Literal l1 = new Literal(1); Literal l2 = new Literal(1); ComparisonExpression comparisonExpression = new ComparisonExpression( new Comparison(l1, Comparator.EQ, l2) ); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(comparisonExpression); CNF reference = new CNF(); reference.addPredicate(cnfElement); assertEquals(reference, comparisonExpression.asCNF()); }
@Override public CNF asCNF() { CNF cnf = new CNF(); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(this); cnf.addPredicate(cnfElement); return cnf; }
ComparisonExpression extends QueryPredicate { @Override public CNF asCNF() { CNF cnf = new CNF(); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(this); cnf.addPredicate(cnfElement); return cnf; } }
ComparisonExpression extends QueryPredicate { @Override public CNF asCNF() { CNF cnf = new CNF(); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(this); cnf.addPredicate(cnfElement); return cnf; } ComparisonExpression(Comparison comparison); }
ComparisonExpression extends QueryPredicate { @Override public CNF asCNF() { CNF cnf = new CNF(); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(this); cnf.addPredicate(cnfElement); return cnf; } ComparisonExpression(Comparison comparison); QueryComparable getLhs(); QueryComparable getRhs(); Comparator getComparator(); boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); boolean evaluate(GraphElement element); Set<String> getVariables(); Set<String> getPropertyKeys(String variable); @Override CNF asCNF(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ComparisonExpression extends QueryPredicate { @Override public CNF asCNF() { CNF cnf = new CNF(); CNFElement cnfElement = new CNFElement(); cnfElement.addPredicate(this); cnf.addPredicate(cnfElement); return cnf; } ComparisonExpression(Comparison comparison); QueryComparable getLhs(); QueryComparable getRhs(); Comparator getComparator(); boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); boolean evaluate(GraphElement element); Set<String> getVariables(); Set<String> getPropertyKeys(String variable); @Override CNF asCNF(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }