org.openrdf.query.algebra.Difference.getLeftArg()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.openrdf.query.algebra.Difference.getLeftArg()方法的一些代码示例,展示了Difference.getLeftArg()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Difference.getLeftArg()方法的具体详情如下:
包路径:org.openrdf.query.algebra.Difference
类名称:Difference
方法名:getLeftArg

Difference.getLeftArg介绍

暂无

代码示例

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
  protected Iteration<BindingSet, QueryEvaluationException> createIteration()
    throws QueryEvaluationException
  {
    return evaluate(difference.getLeftArg(), bindings);
  }
};

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
  protected Iteration<BindingSet, QueryEvaluationException> createIteration()
    throws QueryEvaluationException
  {
    return evaluate(difference.getLeftArg(), bindings);
  }
};

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model

public Set<String> getBindingNames() {
  return getLeftArg().getBindingNames();
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model

public Set<String> getAssuredBindingNames() {
  return getLeftArg().getAssuredBindingNames();
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

/**
 * @inheritDoc
 */
@Override
public void meet(Difference theOp)
  throws Exception
{
  String aLeft = renderTupleExpr(theOp.getLeftArg());
  String aRight = renderTupleExpr(theOp.getRightArg());
  mJoinBuffer.append("\n{").append(aLeft).append("}").append("\nminus\n").append("{").append(aRight).append(
      "}.\n");
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

/**
 * @inheritDoc
 */
@Override
public void meet(Difference theOp)
  throws Exception
{
  String aLeft = renderTupleExpr(theOp.getLeftArg());
  String aRight = renderTupleExpr(theOp.getRightArg());
  mBuffer.append(aLeft).append("\nminus\n").append(aRight);
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

/**
 * @inheritDoc
 */
@Override
public void meet(Difference theOp)
  throws Exception
{
  binaryOpMeet(theOp, theOp.getLeftArg(), theOp.getRightArg());
}

代码示例来源:origin: apache/marmotta

@Override
  public void meet(Difference node) throws RuntimeException {
    Set<String> leftVars  = new VariableFinder(node.getLeftArg()).variables;
    Set<String> rightVars = new VariableFinder(node.getRightArg()).variables;
    if(Sets.intersection(leftVars,rightVars).size() > 0) {
      // left and right share variables, so we replace with a FILTER with NOT EXISTS
      log.debug("replacing SPARQL MINUS with a FILTER on NOT EXISTS, because there are shared variables");
      log.debug("AST before:\n{}", node);
      ValueExpr notExists = new Not(new Exists(node.getRightArg()));
      Filter replacement = new Filter(node.getLeftArg(), notExists);
      node.replaceWith(replacement);
      log.debug("AST after:\n{}", node);
    } else {
      // left and right do not share variables, so we replace with the left subquery
      log.debug("replacing SPARQL MINUS with its left argument, because there are no variables");
      node.replaceWith(node.getLeftArg());
    }
  }
}

代码示例来源:origin: eu.fbk.knowledgestore/ks-server

@Override
public void meet(final Difference n) {
  final TupleExpr l = n.getLeftArg();
  final TupleExpr r = n.getRightArg();
  emit(l, true).emit(" MINUS ").emit(r, true);
}

代码示例来源:origin: eu.fbk.rdfpro/rdfpro-rules

@Override
public void meet(final Difference n) {
  final TupleExpr l = n.getLeftArg();
  final TupleExpr r = n.getRightArg();
  emit(l, true).emit(" MINUS ").emit(r, true);
}

代码示例来源:origin: org.apache.rya/rya.indexing

@Override
public void meet(final Difference node) {
  if (Sets.intersection(node.getRightArg().getBindingNames(), filterVars).size() > 0) {
    relocate(filter, node.getRightArg());
  } else if (Sets.intersection(node.getLeftArg().getBindingNames(), filterVars).size() > 0) {
    final Filter clone = new Filter(filter.getArg(), filter
        .getCondition().clone());
    relocate(clone, node.getLeftArg());
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
public void meet(Difference difference) {
  super.meet(difference);
  TupleExpr leftArg = difference.getLeftArg();
  TupleExpr rightArg = difference.getRightArg();
  if (leftArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (rightArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (leftArg instanceof SingletonSet && rightArg instanceof SingletonSet) {
    difference.replaceWith(new EmptySet());
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-federation

@Override
public void meet(Difference difference) {
  super.meet(difference);
  TupleExpr leftArg = difference.getLeftArg();
  TupleExpr rightArg = difference.getRightArg();
  if (leftArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (rightArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (leftArg instanceof SingletonSet && rightArg instanceof SingletonSet) {
    difference.replaceWith(new EmptySet());
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
public void meet(Difference difference) {
  super.meet(difference);
  TupleExpr leftArg = difference.getLeftArg();
  TupleExpr rightArg = difference.getRightArg();
  if (leftArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (rightArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (leftArg instanceof SingletonSet && rightArg instanceof SingletonSet) {
    difference.replaceWith(new EmptySet());
  }
}

代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-federation

@Override
public void meet(Difference difference) {
  super.meet(difference);
  TupleExpr leftArg = difference.getLeftArg();
  TupleExpr rightArg = difference.getRightArg();
  if (leftArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (rightArg instanceof EmptySet) {
    difference.replaceWith(leftArg);
  }
  else if (leftArg instanceof SingletonSet && rightArg instanceof SingletonSet) {
    difference.replaceWith(new EmptySet());
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
public void meet(Difference node) {
  Filter clone = new Filter();
  clone.setCondition(filter.getCondition().clone());

  relocate(filter, node.getLeftArg());
  relocate(clone, node.getRightArg());

  FilterRelocator.relocate(filter);
  FilterRelocator.relocate(clone);
}

代码示例来源:origin: apache/marmotta

@Override
public void meet(Difference node) {
  Filter clone = new Filter();
  clone.setCondition(filter.getCondition().clone());
  relocate(filter, node.getLeftArg());
  relocate(clone, node.getRightArg());
  FilterRelocator.relocate(filter);
  FilterRelocator.relocate(clone);
}

代码示例来源:origin: org.openrdf.sesame/sesame-spin

@Override
public void meet(Difference node)
  throws RDFHandlerException
{
  node.getLeftArg().visit(this);
  listEntry();
  handler.handleStatement(valueFactory.createStatement(subject, RDF.TYPE, SP.MINUS_CLASS));
  Resource elementsList = valueFactory.createBNode();
  handler.handleStatement(
      valueFactory.createStatement(subject, SP.ELEMENTS_PROPERTY, elementsList));
  ListContext elementsCtx = newList(elementsList);
  node.getRightArg().visit(this);
  endList(elementsCtx);
}

相关文章