Package org.openrdf.sail.federation.signatures

Examples of org.openrdf.sail.federation.signatures.SignedConnection


        // No results for this expression and thus for the entire join
        join.replaceWith(new EmptySet());
        return;
      }
      else if (owners.size() == 1) {
        SignedConnection owner = owners.iterator().next();
        replacement.addArg(new OwnedTupleExpr(owner, joinArg));
      }
      else if (joinArg instanceof Join || distinct) {
        // Local join with multiple owners or distinct federation members
        Union union = new Union();
View Full Code Here


    Var leftSubject = getLocalSubject(leftJoin.getLeftArg());
    Var rightSubject = getLocalSubject(leftJoin.getRightArg());
    // if local then left and right can be combined
    boolean local = leftSubject != null && leftSubject.equals(rightSubject);
    SignedConnection leftOwner = getSingleOwner(leftJoin.getLeftArg());
    SignedConnection rightOwner = getSingleOwner(leftJoin.getRightArg());
    addOwners(leftJoin, leftOwner, rightOwner, local);
  }
View Full Code Here

  {
    super.meet(union);

    List<Owned<Union>> ownedJoins = new ArrayList<Owned<Union>>();
    for (TupleExpr arg : union.getArgs()) {
      SignedConnection member = getSingleOwner(arg);
      if (ownedJoins.size() > 0 && ownedJoins.get(ownedJoins.size() - 1).getOwner() == member) {
        ownedJoins.get(ownedJoins.size() - 1).getOperation().addArg(arg.clone());
      }
      else {
        ownedJoins.add(new Owned<Union>(member, new Union(arg.clone())));
View Full Code Here

  @Override
  protected void meetUnaryTupleOperator(UnaryTupleOperator node)
    throws StoreException
  {
    super.meetUnaryTupleOperator(node);
    SignedConnection owner = getSingleOwner(node.getArg());
    if (owner != null) {
      node.replaceWith(new OwnedTupleExpr(owner, node.clone()));
    }
  }
View Full Code Here

    }
  }

  private void addOwners(Union node, List<Owned<Union>> ownedJoins) {
    if (ownedJoins.size() == 1) {
      SignedConnection o = ownedJoins.get(0).getOwner();
      if (o != null) {
        // every element is used by the same owner
        node.replaceWith(new OwnedTupleExpr(o, node.clone()));
      }
    }
    else {
      Union replacement = new Union();
      for (Owned<Union> e : ownedJoins) {
        SignedConnection o = e.getOwner();
        Union union = e.getOperation();
        if (o == null) {
          // multiple owners
          for (TupleExpr arg : union.getArgs()) {
            replacement.addArg(arg.clone());
View Full Code Here

TOP

Related Classes of org.openrdf.sail.federation.signatures.SignedConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.