Package lupos.engine.operators.messages

Examples of lupos.engine.operators.messages.BoundVariablesMessage


    }

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
  }
View Full Code Here


    }

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
    return null;
  }
View Full Code Here

    return this.rootNodeOfSubGraph;
  }

  @Override
  public Message preProcessMessage(final BoundVariablesMessage msg) {
    final BoundVariablesMessage newMsg = new BoundVariablesMessage(msg);
    //Send Message through the subgraph container graph
    this.getRootOfSubgraph().sendMessage(new BoundVariablesMessage());
    // Search for "result"-node
    final Result result = (Result) this.getRootOfSubgraph().visitAndStop(new SimpleOperatorGraphVisitor(){
      @Override
      public Object visit(final BasicOperator basicOperator) {
        if(basicOperator instanceof Result) {
          return basicOperator;
        } else {
          return null;
        }
      }});
    //set the union variables of the result node of the subgraph
    newMsg.setVariables(result.getUnionVariables());
    this.unionVariables = result.getUnionVariables();
    this.intersectionVariables = result.getUnionVariables();
    return newMsg;
  }
View Full Code Here

    return msg;
  }

  @Override
  public Message preProcessMessage(final BoundVariablesMessage msg) {
    final BoundVariablesMessage msg_result = new BoundVariablesMessage(msg);
    Set<Variable> variableSet = null;
    // the variables, which are always bound are the intersection
    // variables of the left hand side
    for (final BasicOperator parent : this.getPrecedingOperators()) {
      final OperatorIDTuple opID = parent.getOperatorIDTuple(this);
      if (opID.getId() == 0) {
        if (variableSet == null) {
          variableSet = new HashSet<Variable>();
          if(parent.getIntersectionVariables()!=null){
            variableSet.addAll(parent.getIntersectionVariables());
          } else {
            System.err.println("Minus: Intersection variables of parent node not set!");
          }
        } else {
          if(parent.getIntersectionVariables()!=null){
            variableSet.retainAll(parent.getIntersectionVariables());
          } else {
            System.err.println("Minus: Intersection variables of parent node not set!");
          }
        }
      }
    }

    this.intersectionVariables = variableSet;

    msg_result.setVariables(this.intersectionVariables);
    return msg_result;
  }
View Full Code Here

    if (deleteFilter || operator instanceof Join) {
      final BasicOperator op2 = filter.getPrecedingOperators().get(0);
      op2.setSucceedingOperators(filter.getSucceedingOperators());
      rootOperator.deleteParents();
      rootOperator.setParents();
      rootOperator.sendMessage(new BoundVariablesMessage());
      deleted.add(filter);
    }
    return new Tuple<Collection<BasicOperator>, Collection<BasicOperator>>(
        added, deleted);
  }
View Full Code Here

    }

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
    return null;
  }
View Full Code Here

    triplePattern.setSucceedingOperator(new OperatorIDTuple(addBinding, 0));

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
    deleted.add(filter);
    if (deleted.size() > 0 || added.size() > 0)
      return new Tuple<Collection<BasicOperator>, Collection<BasicOperator>>(
          added, deleted);
    else
View Full Code Here

    }

    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
    deleted.add(op);
    if (deleted.size() > 0 || added.size() > 0)
      return new Tuple<Collection<BasicOperator>, Collection<BasicOperator>>(
          added, deleted);
    else
View Full Code Here

      }
    }
    rootOperator.deleteParents();
    rootOperator.setParents();
    rootOperator.detectCycles();
    rootOperator.sendMessage(new BoundVariablesMessage());
    if (deleted.size() > 0 || added.size() > 0) {
      return new Tuple<Collection<BasicOperator>, Collection<BasicOperator>>(
          added, deleted);
    } else {
      return null;
View Full Code Here

  }

  @Override
  public Message preProcessMessage(final BoundVariablesMessage msg) {
    this.recomputeVariables();
    final BoundVariablesMessage result = new BoundVariablesMessage(msg);
    result.getVariables().addAll(this.unionVariables);
    return result;
  }
View Full Code Here

TOP

Related Classes of lupos.engine.operators.messages.BoundVariablesMessage

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.