@Override public Expr copy(Expr e1, Expr e2) { return new E_Equals(e1 , e2 ) ; } }
@Override public Expr copy(Expr e1, Expr e2) { return new E_Equals(e1 , e2 ) ; } }
private E_LogicalOr createPredicateConditions(NodeValue predicateExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_PREDICATE_EXPR_VAR, predicateExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_PREDICATE_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createObjectConditions(NodeValue objectExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_OBJECT_EXPR_VAR, objectExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_OBJECT_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createSubjectConditions(NodeValue subjectExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_SUBJECT_EXPR_VAR, subjectExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_SUBJECT_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createPredicateConditions(NodeValue predicateExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_PREDICATE_EXPR_VAR, predicateExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_PREDICATE_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createObjectConditions(NodeValue objectExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_OBJECT_EXPR_VAR, objectExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_OBJECT_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createSubjectConditions(NodeValue subjectExpr) { return new E_LogicalOr(new E_SameTerm( PublishSubscribeConstants.SUBSUBSCRIPTION_SUBJECT_EXPR_VAR, subjectExpr), new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_SUBJECT_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR)); }
private E_LogicalOr createGraphConditions(NodeValue graphExpr) { return new E_LogicalOr( new E_StrStartsWith( new E_Str( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR), graphExpr), new E_LogicalOr( new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR), // the following condition is here for finding // subscriptions which have been rewritten by // using the graph value (but not the meta graph value) // associated to the quadruple which is matching the // subscription new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR, graphExpr))); }
private E_LogicalOr createGraphConditions(NodeValue graphExpr) { return new E_LogicalOr( new E_StrStartsWith( new E_Str( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR), graphExpr), new E_LogicalOr( new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR, PublishSubscribeConstants.SUBSUBSCRIPTION_VARIABLE_EXPR), // the following condition is here for finding // subscriptions which have been rewritten by // using the graph value (but not the meta graph value) // associated to the quadruple which is matching the // subscription new E_Equals( PublishSubscribeConstants.SUBSUBSCRIPTION_GRAPH_EXPR_VAR, graphExpr))); }
@Override public Expr make(ItemList list) { BuilderLib.checkLength(3, list, "=: wanted 2 arguments: got :"+numArgs(list)) ; Expr left = buildExpr(list.get(1)) ; Expr right = buildExpr(list.get(2)) ; return new E_Equals(left, right) ; } };
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { PathEqualityTest pathEqualityTest = (PathEqualityTest) nodeTest; Var tmpVar = LDPathEvaluator.evaluate(pathEqualityTest.getPath(), elementGroup, var, evaluatorConfiguration); if(pathEqualityTest.getNode() instanceof org.openrdf.model.impl.LiteralImpl) { return new E_Equals(new ExprVar(tmpVar.asNode()), new NodeValueNode(NodeFactory.createLiteral(((LiteralImpl) pathEqualityTest.getNode()).getLabel().toString()))); } else { return new E_Equals(new ExprVar(tmpVar.asNode()), new NodeValueNode(NodeFactory.createURI(pathEqualityTest.getNode().toString()))); } } }
public Expr make(ItemList list) { BuilderLib.checkLength(3, list, "=: wanted 2 arguments: got :"+list.size()) ; Expr left = buildExpr(list.get(1)) ; Expr right = buildExpr(list.get(2)) ; return new E_Equals(left, right) ; } };
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { LiteralTypeTest literalTypeTest = (LiteralTypeTest) nodeTest; return new E_Equals(new E_Datatype(new ExprVar(var)), new E_URI(new NodeValueString(literalTypeTest.getTypeUri().toString()))); } }
@Override public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) { IsATest isATest = (IsATest) nodeTest; Var tmpVar = Var.alloc(Var.alloc(VarIDGenerator.createID())); elementGroup.addTriplePattern(new Triple(var.asNode(), RDF.type.asNode(), tmpVar.asNode())); return new E_Equals(new ExprVar(tmpVar.asNode()), new NodeValueNode(NodeFactory.createURI(isATest.getPathExpression(new SesameValueBackend()).replace("<", "").replace(">", "").replaceFirst("is-a ", "")))); } }
protected static E_Equals toEqualsFilter(Expr left, Expr right) { Node ln = toNode(left); com.hp.hpl.jena.sparql.expr.Expr le = ln.isVariable()? new ExprVar(ln.getName()) : new NodeValueNode(ln); Node rn = toNode(right); com.hp.hpl.jena.sparql.expr.Expr re = rn.isVariable()? new ExprVar(rn.getName()) : new NodeValueNode(rn); return new E_Equals(le, re); } protected static E_Equals toIRIEqualsFilter(Expr left, Expr right) {
protected static E_Equals toIRIEqualsFilter(Expr left, Expr right) { Node ln = toNode(left); com.hp.hpl.jena.sparql.expr.Expr le = ln.isVariable()? new ExprVar(ln.getName()) : new NodeValueNode(ln); Node rn = toNode(right); com.hp.hpl.jena.sparql.expr.Expr re = rn.isVariable()? new ExprVar(rn.getName()) : new NodeValueNode(rn); return new E_Equals(new E_Str(le), new E_Str(re)); }
Expr e2 = new E_Equals(x, sub) ; if ( disjunction == null ) disjunction = e2 ;
Expr e2 = new E_Equals(x, sub) ; if ( disjunction == null ) disjunction = e2 ;
expr = new E_LessThanOrEqual(new ExprVar(variable.asNode()), new NodeValueDouble(Double.parseDouble(resolvedConstraint))); } else if (criteria.getComparison().equals(Comparison.EQ)) { expr = new E_Equals(new ExprVar(variable.asNode()), new ExprVar(criteria.getConstraint())); } else { throw new IllegalStateException(criteria.getComparison() + " is not allowed on Numbers.");