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

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

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

Extension.<init>介绍

暂无

代码示例

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

private void addSourceExpressions(UnaryTupleOperator op, Collection<ProjectionElem> elems) {
  Extension ext = null;
  for (ProjectionElem projElem : elems) {
    ExtensionElem extElem = projElem.getSourceExpression();
    if (extElem != null) {
      if (ext == null) {
        ext = new Extension(op.getArg());
        op.setArg(ext);
      }
      ext.addElement(extElem);
    }
  }
}

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

private void visitBind(Resource r)
  throws OpenRDFException
{
  Value expr = Statements.singleValue(r, SP.EXPRESSION_PROPERTY, store);
  ValueExpr valueExpr = visitExpression(expr);
  Value varValue = Statements.singleValue(r, SP.VARIABLE_PROPERTY, store);
  if (!(varValue instanceof Resource)) {
    throw new MalformedSpinException(
        String.format("Value of %s is not a resource", SP.VARIABLE_PROPERTY));
  }
  String varName = getVarName((Resource)varValue);
  tupleNode = new Extension(tupleNode, new ExtensionElem(valueExpr, varName));
}

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

Extension ex = new Extension();
for (Var var: s.getMap().keySet()) {
  String name = var.getName();

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

if (varsBefore.contains(name)) {
  UnaryTupleOperator proj = (UnaryTupleOperator)projElems.getParentNode();
  Extension ext = new Extension(proj.getArg());
  proj.setArg(ext);
  Var lostVar = new Var(name);

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

@Override
public TupleExpr visit(ASTDescribe node, Object data)
  throws VisitorException
{
  TupleExpr tupleExpr = (TupleExpr)data;
  if (tupleExpr == null) {
    tupleExpr = new SingletonSet();
  }
  Extension e = new Extension();
  ProjectionElemList projectionElements = new ProjectionElemList();
  for (int i = 0; i < node.jjtGetNumChildren(); i++) {
    ValueExpr resource = (ValueExpr)node.jjtGetChild(i).jjtAccept(this, null);
    if (resource instanceof Var) {
      projectionElements.addElement(new ProjectionElem(((Var)resource).getName()));
    }
    else {
      String alias = "_describe_" + UUID.randomUUID().toString().replaceAll("-", "_");
      ExtensionElem elem = new ExtensionElem(resource, alias);
      e.addElement(elem);
      projectionElements.addElement(new ProjectionElem(alias));
    }
  }
  if (!e.getElements().isEmpty()) {
    e.setArg(tupleExpr);
    tupleExpr = e;
  }
  Projection p = new Projection(tupleExpr, projectionElements);
  return new DescribeOperator(p);
}

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

RR.STAR_SELECT_GRAPH.stringValue(), filterGraphVars), new Var("_const-"
    + UUID.randomUUID(), RDF.NIL), CompareOp.NE));
body = new Extension(body, new ExtensionElem(new FunctionCall(
    RR.STAR_SELECT_GRAPH.stringValue(), bindGraphVars), prefix));

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

if (join.getLeftArg().getAssuredBindingNames().containsAll(elemVars)) {
  newArg = join.getLeftArg() instanceof Extension ? (Extension) join
      .getLeftArg() : new Extension(join.getLeftArg());
      join.setLeftArg(newArg);
} else if (join.getRightArg().getAssuredBindingNames().contains(elemVars)) {
  newArg = join.getRightArg() instanceof Extension ? (Extension) join
      .getRightArg() : new Extension(join.getRightArg());
      join.setRightArg(newArg);

代码示例来源:origin: niclashoyer/neo4j-sparql-extension

sp = new StatementPattern(s, p2, o, c);
next.add(sp);
union.add(new Extension(
  sp,
  new ExtensionElem(

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

private void renameVar(Var oldVar, Var newVar, Filter filter) {
  filter.getArg().visit(new VarRenamer(oldVar, newVar));
  // TODO: skip this step if old variable name is not used
  // Replace SameTerm-filter with an Extension, the old variable name
  // might still be relevant to nodes higher in the tree
  Extension extension = new Extension(filter.getArg());
  extension.addElement(new ExtensionElem(new Var(newVar.getName()), oldVar.getName()));
  filter.replaceWith(extension);
}

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

private TupleExpr visitHaving(Resource having)
  throws OpenRDFException
{
  UnaryTupleOperator op = (UnaryTupleOperator)group.getParentNode();
  op.setArg(new Extension(group));
  Iteration<? extends Resource, QueryEvaluationException> iter = Statements.listResources(having,
      store);
  while (iter.hasNext()) {
    Resource r = iter.next();
    ValueExpr havingExpr = visitExpression(r);
    Filter filter = new Filter(op.getArg(), havingExpr);
    op.setArg(filter);
    op = filter;
  }
  return op;
}

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

private void renameVar(Var oldVar, Var newVar, Filter filter) {
  filter.getArg().visit(new VarRenamer(oldVar.getName(), newVar.getName()));
  // TODO: skip this step if old variable name is not used
  // Replace SameTerm-filter with an Extension, the old variable name
  // might still be relevant to nodes higher in the tree
  Extension extension = new Extension(filter.getArg());
  extension.addElement(new ExtensionElem(new Var(newVar.getName()), oldVar.getName()));
  filter.replaceWith(extension);
}

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

result = new Extension(result, extElemMap.values());

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

Extension extension = new Extension();
ProjectionElemList projElemList = new ProjectionElemList();

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

String alias = ((ASTVar)aliasNode).getName();
Extension extension = new Extension();
extension.addElement(new ExtensionElem(ve, alias));

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

extension = new Extension();

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

collector.meet(orderElem);
Extension extension = new Extension();

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

ValueExpr expr = parser.parseExpression(subj, qp.getTripleSource());
TupleExpr root = new Extension(new SingletonSet(), new ExtensionElem(expr, "result"));
parsedQuery = new ParsedTupleQuery(root);

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

aExt = new Extension();
aExt = new Extension();
aExt = new Extension();

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

Extension extension = new Extension();
for (AggregateOperator operator : collector.getOperators()) {
  Var var = createAnonVar();

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

if(obj.isConstant()) { // subject is the variable
  extension = new Extension(
      new StatementPattern(obj, TYPE_VAR, new Var(type.stringValue(), type)),
      new ExtensionElem(obj, node.getSubjectVar().getName()));
} else { //o is a variable and s may either be defined or a variable
  extension = new Extension(
      new StatementPattern(node.getSubjectVar(), TYPE_VAR, new Var(type.stringValue(), type)),
      new ExtensionElem(node.getSubjectVar(), obj.getName()));

相关文章