UnaryTupleOperator.setArg
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.openrdf.query.algebra.UnaryTupleOperator.setArg (Showing top 13 results out of 315)

origin: org.openrdf.sesame/sesame-queryalgebra-model

/**
 * Creates a new unary tuple operator.
 * 
 * @param arg
 *        The operator's argument, must not be <tt>null</tt>.
 */
public UnaryTupleOperator(TupleExpr arg) {
  setArg(arg);
}
origin: org.openrdf.sesame/sesame-queryalgebra-model

@Override
public void replaceChildNode(QueryModelNode current, QueryModelNode replacement) {
  if (arg == current) {
    setArg((TupleExpr)replacement);
  }
  else {
    super.replaceChildNode(current, replacement);
  }
}
origin: org.openrdf.elmo/elmo-repository

@Override
protected void meetUnaryTupleOperator(UnaryTupleOperator node) {
  if (predicate.equals(SeRQO.ARG)) {
    node.setArg((TupleExpr) model.get(object));
  } else {
    super.meetUnaryTupleOperator(node);
  }
}
origin: org.openrdf.sesame/sesame-queryalgebra-model

@Override
protected void meetUnaryTupleOperator(UnaryTupleOperator node)
{
  assert former == node.getArg();
  if (replacement == null) {
    removeNode(node);
  }
  else {
    node.setArg((TupleExpr)replacement);
  }
}
origin: org.openrdf.sesame/sesame-queryalgebra-model

  @Override
  public UnaryTupleOperator clone() {
    UnaryTupleOperator clone = (UnaryTupleOperator)super.clone();
    clone.setArg(getArg().clone());
    return clone;
  }
}
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 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-spin

private UnaryTupleOperator visitTemplates(Resource templates)
  throws OpenRDFException
{
  List<ProjectionElemList> projElemLists = new ArrayList<ProjectionElemList>();
  Iteration<? extends Resource, QueryEvaluationException> iter = Statements.listResources(templates,
      store);
  while (iter.hasNext()) {
    Resource r = iter.next();
    ProjectionElemList projElems = visitTemplate(r);
    projElemLists.add(projElems);
  }
  UnaryTupleOperator expr;
  if (projElemLists.size() > 1) {
    MultiProjection proj = new MultiProjection();
    proj.setProjections(projElemLists);
    expr = proj;
  }
  else {
    Projection proj = new Projection();
    proj.setProjectionElemList(projElemLists.get(0));
    expr = proj;
  }
  Reduced reduced = new Reduced();
  reduced.setArg(expr);
  tupleRoot = reduced;
  SingletonSet stub = new SingletonSet();
  expr.setArg(stub);
  tupleNode = stub;
  return expr;
}
origin: org.openrdf.sesame/sesame-queryrender

  aCurr.setArg(aOrder);
  aCurr = aOrder;
  aCurr.setArg(aDistinct);
  aCurr = aDistinct;
  aCurr.setArg(aReduced);
  aCurr = aReduced;
aCurr.setArg(aProjection);
aCurr.setArg(aJoin);
origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

UnaryTupleOperator proj = (UnaryTupleOperator)projElems.getParentNode();
Extension ext = new Extension(proj.getArg());
proj.setArg(ext);
Var lostVar = new Var(name);
Value value = bindings.getValue(name);
origin: apache/marmotta

@Override
public void meet(Reduced 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);
  }
}
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);
  }
}
origin: apache/marmotta

@Override
public void meet(Slice 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);
  }
}
org.openrdf.query.algebraUnaryTupleOperatorsetArg

Javadoc

Sets the argument of this unary tuple operator.

Popular methods of UnaryTupleOperator

  • getArg
    Gets the argument of this unary tuple operator.
  • clone
  • replaceWith
  • equals
  • replaceChildNode
  • getParentNode
  • getSignature
  • hashCode
  • visit
  • visitChildren

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)