Examples of TupleExpr


Examples of org.openrdf.query.algebra.TupleExpr

  @Override
  public TupleExpr visit(ASTSelect node, Object data)
    throws VisitorException
  {
    TupleExpr result = (TupleExpr)data;

    ProjectionElemList projElemList = new ProjectionElemList();

    for (int i = 0; i < node.jjtGetNumChildren(); i++) {
      Var projVar = (Var)node.jjtGetChild(i).jjtAccept(this, null);
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

    throws VisitorException
  {
    // Start with building the graph pattern
    graphPattern = new GraphPattern();
    node.getWhereClause().jjtAccept(this, null);
    TupleExpr tupleExpr = graphPattern.buildTupleExpr();

    // Apply result ordering
    ASTOrderClause orderNode = node.getOrderClause();
    if (orderNode != null) {
      List<OrderElem> orderElemements = (List<OrderElem>)orderNode.jjtAccept(this, null);
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

  @Override
  public TupleExpr visit(ASTConstruct node, Object data)
    throws VisitorException
  {
    TupleExpr result = (TupleExpr)data;

    // Collect construct triples
    graphPattern = new GraphPattern();
    super.visit(node, null);
    TupleExpr constructExpr = graphPattern.buildTupleExpr();

    // Retrieve all StatementPattern's from the construct expression
    List<StatementPattern> statementPatterns = StatementPatternCollector.process(constructExpr);

    Set<Var> constructVars = getConstructVars(statementPatterns);
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

  @Override
  public TupleExpr visit(ASTDescribeQuery node, Object data)
    throws VisitorException
  {
    TupleExpr tupleExpr = null;

    if (node.getWhereClause() != null) {
      // Start with building the graph pattern
      graphPattern = new GraphPattern();
      node.getWhereClause().jjtAccept(this, null);
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

  @Override
  public TupleExpr visit(ASTDescribe node, Object data)
    throws VisitorException
  {
    TupleExpr result = (TupleExpr)data;

    // Create a graph query that produces the statements that have the
    // requests resources as subject or object
    Var subjVar = createAnonVar("-descr-subj");
    Var predVar = createAnonVar("-descr-pred");
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

  {
    graphPattern = new GraphPattern();

    super.visit(node, null);

    TupleExpr tupleExpr = graphPattern.buildTupleExpr();
    tupleExpr = new Slice(tupleExpr, 0, 1);

    return tupleExpr;
  }
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

    super.visit(node, null);

    // Optional constraints also apply to left hand side of operator
    List<ValueExpr> constraints = graphPattern.removeAllConstraints();

    TupleExpr leftArg = parentGP.buildTupleExpr();
    TupleExpr rightArg = graphPattern.buildTupleExpr();

    LeftJoin leftJoin;

    if (constraints.isEmpty()) {
      leftJoin = new LeftJoin(leftArg, rightArg);
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

  {
    GraphPattern parentGP = graphPattern;

    graphPattern = new GraphPattern(parentGP);
    node.jjtGetChild(0).jjtAccept(this, null);
    TupleExpr leftArg = graphPattern.buildTupleExpr();

    graphPattern = new GraphPattern(parentGP);
    node.jjtGetChild(1).jjtAccept(this, null);
    TupleExpr rightArg = graphPattern.buildTupleExpr();

    parentGP.addRequiredTE(new Union(leftArg, rightArg));
    graphPattern = parentGP;

    return null;
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

    @Override
    public void meet(LeftJoin leftJoin) {
      super.meet(leftJoin);

      TupleExpr leftArg = leftJoin.getLeftArg();
      TupleExpr rightArg = leftJoin.getRightArg();
      ValueExpr condition = leftJoin.getCondition();

      if (leftArg instanceof EmptySet) {
        leftJoin.replaceWith(leftArg);
      }
View Full Code Here

Examples of org.openrdf.query.algebra.TupleExpr

    @Override
    public void meet(Difference difference) {
      super.meet(difference);

      TupleExpr leftArg = difference.getLeftArg();
      TupleExpr rightArg = difference.getRightArg();

      if (leftArg instanceof EmptySet) {
        difference.replaceWith(leftArg);
      }
      else if (rightArg instanceof EmptySet) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.