@Override public boolean equals(Object other) { if (other instanceof Projection && super.equals(other)) { Projection o = (Projection)other; return projElemList.equals(o.getProjectionElemList()); } return false; }
@Override public StatementPattern clone() { StatementPattern clone = (StatementPattern)super.clone(); clone.setSubjectVar(getSubjectVar().clone()); clone.setPredicateVar(getPredicateVar().clone()); clone.setObjectVar(getObjectVar().clone()); if (getContextVar() != null) { clone.setContextVar(getContextVar().clone()); } return clone; } }
@Override public ArbitraryLengthPath clone() { ArbitraryLengthPath clone = (ArbitraryLengthPath)super.clone(); clone.setSubjectVar(getSubjectVar().clone()); clone.setPathExpression(getPathExpression().clone()); clone.setObjectVar(getObjectVar().clone()); if (getContextVar() != null) { clone.setContextVar(getContextVar().clone()); } return clone; } }
@Override public boolean equals(Object other) { if (other instanceof ZeroLengthPath) { ZeroLengthPath o = (ZeroLengthPath)other; return subjectVar.equals(o.getSubjectVar()) && objectVar.equals(o.getObjectVar()) && nullEquals(contextVar, o.getContextVar()) && scope.equals(o.getScope()); } return false; }
private TupleExpr join(TupleExpr node, TupleExpr toMove) { toMove.replaceWith(new SingletonSet()); if (node != null) { node = new Join(node, toMove); } else { node = toMove; } return node; }
@Override public LeftJoin clone() { LeftJoin clone = (LeftJoin)super.clone(); if (hasCondition()) { clone.setCondition(getCondition().clone()); } return clone; } }
@Override public SubQueryValueOperator clone() { SubQueryValueOperator clone = (SubQueryValueOperator)super.clone(); clone.setSubQuery(getSubQuery().clone()); return clone; } }
@Override public Set<String> getAssuredBindingNames() { // Return all target binding names for which the source binding is assured // by the argument return projElemList.getTargetNamesFor(getArg().getAssuredBindingNames()); }
@Override public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor) throws X { for (ValueExpr arg : args) { arg.visit(visitor); } for (Var var : resultVars) { var.visit(visitor); } super.visitChildren(visitor); }
@Override public GroupElem clone() { GroupElem clone = (GroupElem)super.clone(); clone.setOperator(getOperator().clone()); return clone; } }
@Override public boolean equals(Object other) { if (other instanceof MathExpr && super.equals(other)) { MathExpr o = (MathExpr)other; return operator.equals(o.getOperator()); } return false; }
@Override public Regex clone() { Regex clone = (Regex)super.clone(); if (flagsArg != null) { clone.setFlagsArg(flagsArg.clone()); } return clone; } }
@Override public boolean equals(Object other) { if (other instanceof CompareAll && super.equals(other)) { CompareAll o = (CompareAll)other; return operator.equals(o.getOperator()); } return false; }
@Override public boolean equals(Object other) { if (other instanceof ZeroLengthPath) { ZeroLengthPath o = (ZeroLengthPath)other; return subjectVar.equals(o.getSubjectVar()) && objectVar.equals(o.getObjectVar()) && nullEquals(contextVar, o.getContextVar()) && scope.equals(o.getScope()); } return false; }