本文整理了Java中org.openrdf.query.algebra.Difference.<init>()
方法的一些代码示例,展示了Difference.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Difference.<init>()
方法的具体详情如下:
包路径:org.openrdf.query.algebra.Difference
类名称:Difference
方法名:<init>
[英]Creates a new minus operator that operates on the two specified arguments.
[中]创建对两个指定参数进行操作的新减号运算符。
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-serql
@Override
public TupleExpr visit(ASTTupleMinus node, Object data)
throws VisitorException
{
TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);
return new Difference(leftArg, rightArg);
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-serql
@Override
public TupleExpr visit(ASTGraphMinus node, Object data)
throws VisitorException
{
TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);
return new Difference(leftArg, rightArg);
}
代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql
@Override
public Object visit(ASTMinusGraphPattern node, Object data)
throws VisitorException
{
GraphPattern parentGP = graphPattern;
TupleExpr leftArg = graphPattern.buildTupleExpr();
graphPattern = new GraphPattern(parentGP);
node.jjtGetChild(0).jjtAccept(this, null);
TupleExpr rightArg = graphPattern.buildTupleExpr();
parentGP = new GraphPattern();
parentGP.addRequiredTE(new Difference(leftArg, rightArg));
graphPattern = parentGP;
return null;
}
代码示例来源:origin: org.openrdf.sesame/sesame-spin
QueryRoot groupRoot = new QueryRoot(tupleNode);
visitGroupGraphPattern((Resource)elements);
Difference difference = new Difference();
currentNode.replaceWith(difference);
difference.setLeftArg(currentNode);
代码示例来源:origin: org.openrdf.alibaba/alibaba-repository-optimistic
@Override
public void meet(StatementPattern sp) throws RuntimeException {
super.meet(sp);
ExternalModel externalR = new ExternalModel(sp, dataset, additional);
ExternalModel externalA = new ExternalModel(sp, dataset, additional);
Model minus = open(externalR.filter(removed, bindings));
Model union = open(externalA.filter(added, bindings));
TupleExpr node = sp;
if (!minus.isEmpty()) {
modified = true;
externalR.setModel(minus);
if (sp.getContextVar() == null) {
// difference must compare context, but only works if non-null
sp.setContextVar(newVar());
}
Difference rpl = new Difference(node.clone(), externalR);
node.replaceWith(rpl);
node = rpl;
}
if (!union.isEmpty()) {
modified = true;
externalA.setModel(union);
Union rpl = new Union(externalA, node.clone());
node.replaceWith(rpl);
node = rpl;
}
}
内容来源于网络,如有侵权,请联系作者删除!