Examples of SeveralSucceedingOperators


Examples of lupos.engine.operators.singleinput.SeveralSucceedingOperators

import lupos.sparql1_1.operatorgraph.helper.OperatorConnection;

public abstract class ServiceGeneratorToJoinWithOriginal extends ServiceGenerator {
  @Override
  public void insertFederatedQueryOperator(final ASTService node, final OperatorConnection connection){
    SeveralSucceedingOperators sso = new SeveralSucceedingOperators();
    BasicOperator federatedQuery = this.getFederatedQuery(node);
    Node child0 = node.jjtGetChild(0);
    if(child0 instanceof ASTVar){
      Sort sort = new Sort();
      LinkedList<Variable> listOfVars = new LinkedList<Variable>();
      listOfVars.add(new Variable(((ASTVar)child0).getName()));
      ComparatorVariables comparator = new ComparatorVariables(listOfVars);
      sort.setComparator(comparator);
      Group group = new Group(comparator);
      sort.addSucceedingOperator(group);
      group.addSucceedingOperator(federatedQuery);
      sso.addSucceedingOperator(sort);
    } else {
      sso.addSucceedingOperator(federatedQuery);
    }
    Join join = new Join();
    federatedQuery.addSucceedingOperator(join, 1);
    sso.addSucceedingOperator(join, 0);
    connection.connect(join);
    connection.setOperatorConnection(sso);
  }
View Full Code Here

Examples of lupos.engine.operators.singleinput.SeveralSucceedingOperators

  public void insertFederatedQueryOperator(final ASTService node, final OperatorConnection connection){
    Node child0 = node.jjtGetChild(0);
    if (child0 instanceof ASTVar) {
      Join join = new Join();
      connection.connect(join);
      SeveralSucceedingOperators sso = new SeveralSucceedingOperators();
      sso.addSucceedingOperator(join, 0);
      FederatedQueryTrivialApproach federatedQuery = new FederatedQueryTrivialApproach(node);
      Projection projection = new Projection();
      projection.addProjectionElement(new Variable(((ASTVar)child0).getName()));
      Distinct distinct = new Distinct();
      projection.addSucceedingOperator(distinct);
      distinct.addSucceedingOperator(federatedQuery);
      sso.addSucceedingOperator(projection, 0);
      federatedQuery.addSucceedingOperator(join, 1);
      connection.setOperatorConnection(sso);
    }   
  }
View Full Code Here

Examples of lupos.engine.operators.singleinput.SeveralSucceedingOperators

      succeedingOperators.add(connection.getOperatorIDTuple());
     
      generateInsertForModify((ASTConstructTemplate)node.jjtGetChild(insertIndex).jjtGetChild(0), connection, with);
      succeedingOperators.add(connection.getOperatorIDTuple());
     
      final SeveralSucceedingOperators sso = new SeveralSucceedingOperators();
      sso.setSucceedingOperators(succeedingOperators);
     
      connection.setOperatorConnection(sso);     
    } else {
      if(deleteIndex>=0){
        generateDeleteForModify((ASTConstructTemplate)node.jjtGetChild(deleteIndex).jjtGetChild(0), connection, with);
View Full Code Here

Examples of lupos.engine.operators.singleinput.SeveralSucceedingOperators

      Construct construct=entry.getFirst();
      construct.addSucceedingOperator(muo);
      connection.connect(muo);
    }
    if(ops.size()>1){
      SeveralSucceedingOperators endOp = new SeveralSucceedingOperators();
      for(Tuple<Construct, Item> entry: graphConstraints){
        endOp.addSucceedingOperator(entry.getFirst());
      }
      connection.setOperatorConnection(endOp);
    } else {
      connection.setOperatorConnection(graphConstraints.get(0).getFirst());
    }
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.