@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setDistinct(false); } },
@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setReduced(true); } },
/** * Adds a variable to be projected. The variable is modeled as an assignment * of itself to itself, so everything in the projection node winds up * looking like an assignment. * * @param var * The variable. */ public void addProjectionVar(final VarNode var) { addExpr(new AssignmentNode(var, var)); }
/** * Checks whether the filter node's value expression node is in CNF. */ static public boolean isCNF(final FilterNode filter) { return isCNF(filter.getValueExpressionNode()); }
@Override public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
/** * Resolves the {@link NamedSubqueryInclude} in the given context, * returning the associated {@link NamedSubqueryRoot} object. Returns * null if resolval fails. */ public NamedSubqueryRoot resolveNamedSubqueryInclude( final NamedSubqueryInclude nsi, final StaticAnalysis sa) { return sa==null || nsi==null || nsi.getName()==null ? null : sa.getNamedSubqueryRoot(nsi.getName()); }
@Override @SuppressWarnings("rawtypes") public void setValueExpression(final IValueExpression<? extends IV> ve) { getValueExpressionNode().setValueExpression(ve); }
public TermNode getContext() { final IQueryNode parent = getParent(); if (parent instanceof GroupMemberNodeBase<?>) { return ((GroupMemberNodeBase<?>) parent).getContext(); } return null; }
public Set<IVariable<?>> getProjectedVars(final Set<IVariable<?>> vars) { final ProjectionNode tmp = getProjection(); if(tmp != null) { tmp.getProjectionVars(vars); } return vars; }
@Override @SuppressWarnings("rawtypes") public IValueExpression<? extends IV> getValueExpression() { return getValueExpressionNode().getValueExpression(); }
@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setDistinct(true); } },
@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setReduced(true); } },
@Override @SuppressWarnings("unchecked") public GraphPatternGroup<IGroupMemberNode> getParentGraphPatternGroup() { IGroupNode<?> parent = getParent(); while (parent != null) { if (parent instanceof GraphPatternGroup) return (GraphPatternGroup<IGroupMemberNode>) parent; parent = parent.getParent(); } return null; }
@SuppressWarnings("unchecked") public GraphPatternGroup<IGroupMemberNode> getParentGraphPatternGroup() { IGroupNode<?> parent = getParent(); while (parent != null) { if (parent instanceof GraphPatternGroup) return (GraphPatternGroup<IGroupMemberNode>) parent; parent = parent.getParent(); } return null; }
@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setDistinct(true); } },
@Override public void apply(ASTBase rslt) { ((QueryBase) rslt).getProjection().setDistinct(false); } },