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

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

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

Extension.getArg介绍

暂无

代码示例

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

@Override
public void meet(Extension node)
  throws RDFHandlerException
{
  node.getArg().visit(this);
}

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

@Override
public void meet(Extension node) {
  if (node.getArg().getBindingNames().containsAll(filterVars)) {
    node.getArg().visit(this);
  }
  else {
    relocate(filter, node);
  }
}

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

@Override
public void meet(Extension node) {
  if (node.getArg().getBindingNames().containsAll(filterVars)) {
    node.getArg().visit(this);
  }
  else {
    relocate(filter, node);
  }
}

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

@Override
public void meet(Projection node) throws QueryEvaluationException {
  TupleExpr arg = node.getArg();
  if (arg instanceof Extension) {
    Extension extension = (Extension) arg;
    TupleExpr arg2 = extension.getArg();
    if (arg2 instanceof SingletonSet) {
      evaluate(node);
    }
  }
}

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

@Override
public void meet(MultiProjection node) throws QueryEvaluationException {
  TupleExpr arg = node.getArg();
  if (arg instanceof Extension) {
    Extension extension = (Extension) arg;
    TupleExpr arg2 = extension.getArg();
    if (arg2 instanceof SingletonSet) {
      evaluate(node);
    }
  }
}

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

@Override
public void meet(Extension extensionNode) throws Exception {
  extensionNode.visitChildren(this);
  if (extensionNode.getArg() instanceof AggregationPipelineQueryNode && extensionNode.getParentNode() != null) {
    AggregationPipelineQueryNode pipelineNode = (AggregationPipelineQueryNode) extensionNode.getArg();
    if (pipelineNode.extend(extensionNode.getElements())) {
      extensionNode.replaceWith(pipelineNode);
    }
  }
}

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

@Override
public void meet(Extension node)
  throws RDFHandlerException
{
  if (inlineBindings != null && inlineBindings.extension == node) {
    // this is the first Extension node and has already been handled
    // by meetExtension()
    // to produce inline bindings in SELECT so we can skip it here
    node.getArg().visit(this);
  }
  else {
    // any further Extension nodes produce BIND() clauses
    node.getArg().visit(this);
    for (ExtensionElem elem : node.getElements()) {
      elem.visit(this);
    }
  }
}

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

public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Extension extension,
    BindingSet bindings)
      throws QueryEvaluationException
{
  CloseableIteration<BindingSet, QueryEvaluationException> result;
  try {
    result = this.evaluate(extension.getArg(), bindings);
  }
  catch (ValueExprEvaluationException e) {
    // a type error in an extension argument should be silently ignored
    // and
    // result in zero bindings.
    result = new EmptyIteration<BindingSet, QueryEvaluationException>();
  }
  result = new ExtensionIterator(extension, result, this);
  return result;
}

代码示例来源:origin: Quetzal-RDF/quetzal

/**
 * 
 */
public Rule(ParsedQuery constructQuery) {
  /* Getting elements of the construct part, they are always implemented 
  *  as a pair of projection and extension before the actual algebra of the query
    e.g.,
    Projection
     ProjectionElemList
       ProjectionElem "x" AS "subject"
       ProjectionElem "_const-f5e5585a-uri" AS "predicate"
       ProjectionElem "_const-a31c101d-uri" AS "object"
     Extension
       ExtensionElem (_const-a31c101d-uri)
        ValueConstant (value=http://example.org/Company)
       ExtensionElem (_const-f5e5585a-uri)
        ValueConstant (value=http://www.w3.org/1999/02/22-rdf-syntax-ns#type)
       Join...
   */
  TupleExpr expr = constructQuery.getTupleExpr();
  Projection projection = (Projection)((Reduced) expr).getArg();
  Extension extension = (Extension) projection.getArg();
  
  antecedent = extension.getArg();
  extractConsequent(expr, projection, extension);
}

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

@Override
public void meet(final Extension n) {
  emit(n.getArg());
  if (!(n.getArg() instanceof SingletonSet)) {
    newline();
  }
  boolean first = true;
  for (final ExtensionElem e : n.getElements()) {
    final ValueExpr expr = e.getExpr();
    if (!(expr instanceof Var) || !((Var) expr).getName().equals(e.getName())) {
      if (!first) {
        newline();
      }
      emit("BIND (").emit(expr).emit(" AS ?").emit(e.getName()).emit(")");
      first = false;
    }
  }
}

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

@Override
public void meet(final Extension n) {
  emit(n.getArg());
  if (!(n.getArg() instanceof SingletonSet)) {
    newline();
  }
  boolean first = true;
  for (final ExtensionElem e : n.getElements()) {
    final ValueExpr expr = e.getExpr();
    if (!(expr instanceof Var) || !((Var) expr).getName().equals(e.getName())) {
      if (!first) {
        newline();
      }
      emit("BIND (").emit(expr).emit(" AS ?").emit(e.getName()).emit(")");
      first = false;
    }
  }
}

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

@Override
  public void updateQueryModelNodes(boolean hasResult) {
    QueryModelNode replacementNode = hasResult ? new SingletonSet() : new EmptySet();
    geoStatement.replaceWith(replacementNode);

    if(hasResult) {
      filter.replaceWith(filter.getArg());
    } else {
      filter.replaceWith(new EmptySet());
    }

    if(functionParent instanceof ExtensionElem) {
      Extension extension = (Extension) functionParent.getParentNode();
      List<ExtensionElem> elements = extension.getElements();
      if(elements.size() > 1) {
        elements.remove(functionParent);
      } else {
        extension.replaceWith(extension.getArg());
      }
    }
  }
}

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

@Override
  public void updateQueryModelNodes(boolean hasResult) {
    QueryModelNode replacementNode = hasResult ? new SingletonSet() : new EmptySet();
    geoStatement.replaceWith(replacementNode);

    if(hasResult) {
      filter.replaceWith(filter.getArg());
    } else {
      filter.replaceWith(new EmptySet());
    }

    if(functionParent instanceof ExtensionElem) {
      Extension extension = (Extension) functionParent.getParentNode();
      List<ExtensionElem> elements = extension.getElements();
      if(elements.size() > 1) {
        elements.remove(functionParent);
      } else {
        extension.replaceWith(extension.getArg());
      }
    }
  }
}

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

translate(extension.getArg(), conditionExprs, extensionExprs, matchedVars);
for (final ExtensionElem elem : extension.getElements()) {
  if (elem.getExpr() instanceof Var

代码示例来源:origin: org.apache.rya/rya.pcj.fluo.app

if(extension.getArg() instanceof Group) {
  child = extension;
} else {
  child = extension.getArg();

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

for (final Extension extension : extractNodes(expr, Extension.class, null, null)) {
  TupleExpr arg = extension.getArg();
  while (arg instanceof Extension) {
    arg = ((Filter) arg).getArg();
      expr = (TupleExpr) replaceNode(expr, extension, extension.getArg());

代码示例来源:origin: org.apache.rya/rya.pcj.fluo.app

final TupleExpr arg = node.getArg();
if(arg instanceof Group) {
  final Group group = (Group) arg;

相关文章