本文整理了Java中org.openrdf.query.algebra.Distinct.replaceWith()
方法的一些代码示例,展示了Distinct.replaceWith()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Distinct.replaceWith()
方法的具体详情如下:
包路径:org.openrdf.query.algebra.Distinct
类名称:Distinct
方法名:replaceWith
暂无
代码示例来源:origin: org.openrdf.sesame/sesame-sail-rdbms
@Override
public void meet(Distinct node)
throws RuntimeException
{
super.meet(node);
if (node.getArg() instanceof SelectQuery) {
SelectQuery query = (SelectQuery)node.getArg();
query.setDistinct(true);
node.replaceWith(query);
}
}
代码示例来源:origin: org.apache.rya/mongodb.rya
@Override
public void meet(Distinct distinctNode) throws Exception {
distinctNode.visitChildren(this);
if (distinctNode.getArg() instanceof AggregationPipelineQueryNode && distinctNode.getParentNode() != null) {
AggregationPipelineQueryNode pipelineNode = (AggregationPipelineQueryNode) distinctNode.getArg();
pipelineNode.distinct();
distinctNode.replaceWith(pipelineNode);
}
}
代码示例来源:origin: apache/marmotta
@Override
public void meet(Distinct node) throws RuntimeException {
TupleExpr child = node.getArg();
if(!isSupported(child) && child instanceof UnaryTupleOperator) {
UnaryTupleOperator replacement = (UnaryTupleOperator)child.clone();
// switch positions of child and node
node.replaceWith(replacement);
node.setArg(((UnaryTupleOperator) child).getArg().clone());
replacement.setArg(node.clone());
// visit the newly inserted replacement node (i.e. the clone of child now containing the old "node" as
// child, so "node" can be bubbled down further if needed)
replacement.visit(this);
}
}
内容来源于网络,如有侵权,请联系作者删除!