Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.EmptySet


    for (RepositoryConnection member : members) {
      if (member.hasMatch(subj, pred, obj, true, ctx)) {
        return;
      }
    }
    node.replaceWith(new EmptySet());
  }
View Full Code Here


      TupleExpr joinArg = entry.getKey();
      Set<SignedConnection> owners = entry.getValue();

      if (owners.isEmpty()) {
        // 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));
View Full Code Here

        result = new Distinct(result);
      }
    }
    else {
      // Empty constructor
      result = new EmptySet();
    }

    if (!distinct) {
      result = new Reduced(result);
    }
View Full Code Here

        if (leftArg instanceof Var && !bindingNames.contains(((Var)leftArg).getName())
            || rightArg instanceof Var && !bindingNames.contains(((Var)rightArg).getName()))
        {
          // One or both var(s) are unbound, this expression will never
          // return any results
          filter.replaceWith(new EmptySet());
          return;
        }

        Set<String> assuredBindingNames = filterArg.getAssuredBindingNames();
        if (leftArg instanceof Var && !assuredBindingNames.contains(((Var)leftArg).getName())
View Full Code Here

    else if (projList.size() > 1) {
      result = new MultiProjection(result, projList);
    }
    else {
      // Empty constructor
      result = new EmptySet();
    }

    return new Reduced(result);
  }
View Full Code Here

      super.meet(join);

      for (TupleExpr arg : join.getArgs()) {
        if (arg instanceof EmptySet) {
          // Any join with an empty set always result in an empty set
          join.replaceWith(new EmptySet());
          return;
        }

        // singletons can be safely removed from a join, but be careful not
        // to create an empty join
View Full Code Here

          union.removeArg(arg);
        }
      }

      if (union.getNumberOfArguments() == 0) {
        union.replaceWith(new EmptySet());
      }
      else if (union.getNumberOfArguments() == 1) {
        union.replaceWith(union.getArg(0));
      }
      else {
View Full Code Here

      }
      else if (rightArg instanceof EmptySet) {
        difference.replaceWith(leftArg);
      }
      else if (leftArg instanceof SingletonSet && rightArg instanceof SingletonSet) {
        difference.replaceWith(new EmptySet());
      }
    }
View Full Code Here

        result = new Distinct(result);
      }
    }
    else {
      // Empty constructor
      result = new EmptySet();
    }

    return result;
  }
View Full Code Here

        if (leftArg instanceof Var && !bindingNames.contains(((Var)leftArg).getName())
            || rightArg instanceof Var && !bindingNames.contains(((Var)rightArg).getName()))
        {
          // One or both var(s) are unbound, this expression will never
          // return any results
          filter.replaceWith(new EmptySet());
          return;
        }

        if (leftArg instanceof Var && rightArg instanceof Var) {
          // Rename rightArg to leftArg
View Full Code Here

TOP

Related Classes of org.openrdf.query.algebra.EmptySet

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.