Package lupos.engine.operators

Examples of lupos.engine.operators.BasicOperator.addSucceedingOperator()


        allowedSubjects = this.getSetOfLiterals(subjectNode);
        allowedObjects = this.getSetOfLiterals(objectNode);
      }

      final PathLengthZero zeroOperator = new PathLengthZero(subject, object, allowedSubjects, allowedObjects);
      memoryScan.addSucceedingOperator(new OperatorIDTuple(zeroOperator,0));

      final Union union = new Union();
      zeroOperator.addSucceedingOperator(new OperatorIDTuple(union,0));
      startingOperator.addSucceedingOperator(new OperatorIDTuple(union,1));
View Full Code Here


      final BasicOperator startingOperator = node.jjtGetChild(0).accept(this, connection, graphConstraint, subject, object, subjectNode, objectNode);
      final Union union = new Union();

      final BasicOperator leftSide = this.zeroPath(node, graphConstraint, subject, object, subjectNode, objectNode);
      leftSide.addSucceedingOperator(new OperatorIDTuple(union,0));

      final Projection projection = new Projection();
      projection.addProjectionElement(subject);
      projection.addProjectionElement(object);
      if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
View Full Code Here

        allowedSubjects = this.getSetOfLiterals(subjectNode);
        allowedObjects = this.getSetOfLiterals(objectNode);
      }

      final Closure closure = new Closure(subject, object, allowedSubjects, allowedObjects);
      startingOperator.addSucceedingOperator(new OperatorIDTuple(closure,0));

      final Item[] items = {subject,this.getVariable(subject.toString(),object.toString(),"predicate"),object};
      final TriplePattern tp = new TriplePattern(items);
      final LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
      temp.add(tp);
View Full Code Here

      final LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
      temp.add(tp);
      final BasicOperator memoryScan = this.indexScanCreator.createIndexScanAndConnectWithRoot(null, temp, graphConstraint);

      final PathLengthZero zeroOperator = new PathLengthZero(subject, object, allowedSubjects, allowedObjects);
      memoryScan.addSucceedingOperator(new OperatorIDTuple(zeroOperator,0));

      final Union union = new Union();
      zeroOperator.addSucceedingOperator(new OperatorIDTuple(union,0));
      startingOperator.removeSucceedingOperator(closure);
      startingOperator.addSucceedingOperator(new OperatorIDTuple(union,1));
View Full Code Here

        replaceVari.addSubstitution(object, variable);
        if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
          replaceVari.addSubstitution((Variable)graphConstraint, (Variable)graphConstraint);
        }

        startingOperator.addSucceedingOperator(new OperatorIDTuple(filter,0));
        startingOperator.addSucceedingOperator(new OperatorIDTuple(union,1));
        final Join intermediateJoinOperator = new Join();
        replaceVar.addSucceedingOperator(new OperatorIDTuple(memoryDistinct,0));
        memoryDistinct.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,1));
        filter.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,0));
View Full Code Here

        if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
          replaceVari.addSubstitution((Variable)graphConstraint, (Variable)graphConstraint);
        }

        startingOperator.addSucceedingOperator(new OperatorIDTuple(filter,0));
        startingOperator.addSucceedingOperator(new OperatorIDTuple(union,1));
        final Join intermediateJoinOperator = new Join();
        replaceVar.addSucceedingOperator(new OperatorIDTuple(memoryDistinct,0));
        memoryDistinct.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,1));
        filter.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,0));
        filter.addSucceedingOperator(new OperatorIDTuple(replaceVar,0));
View Full Code Here

        union.addSucceedingOperator(new OperatorIDTuple(projection,0));

        //Zero Operator
        final BasicOperator startingPoint = this.zeroPath(node, graphConstraint, subject, object, subjectNode, objectNode);

        startingPoint.addSucceedingOperator(new OperatorIDTuple(union,0));

      } catch (final ParseException e) {
        System.out.println(e);
        e.printStackTrace();
      }
View Full Code Here

        allowedSubjects = this.getSetOfLiterals(subjectNode);
        allowedObjects = this.getSetOfLiterals(objectNode);
      }

      final Closure closure = new Closure(subject, object, allowedSubjects, allowedObjects);
      startingOperator.addSucceedingOperator(new OperatorIDTuple(closure,0));

      return closure;
    } else {
      // alternative way to evaluate (...)+ without using the Closure operator!
      final ReplaceVar replaceVar = new ReplaceVar();
View Full Code Here

        replaceVari.addSubstitution(object, variable);
        if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
          replaceVari.addSubstitution((Variable)graphConstraint, (Variable)graphConstraint);
        }

        startingOperator.addSucceedingOperator(new OperatorIDTuple(filter,0));
        startingOperator.addSucceedingOperator(new OperatorIDTuple(projection,0));
        final Join intermediateJoinOperator = new Join();
        replaceVar.addSucceedingOperator(new OperatorIDTuple(memoryDistinct,0));
        memoryDistinct.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,1));
        filter.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,0));
View Full Code Here

        if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
          replaceVari.addSubstitution((Variable)graphConstraint, (Variable)graphConstraint);
        }

        startingOperator.addSucceedingOperator(new OperatorIDTuple(filter,0));
        startingOperator.addSucceedingOperator(new OperatorIDTuple(projection,0));
        final Join intermediateJoinOperator = new Join();
        replaceVar.addSucceedingOperator(new OperatorIDTuple(memoryDistinct,0));
        memoryDistinct.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,1));
        filter.addSucceedingOperator(new OperatorIDTuple(intermediateJoinOperator,0));
        filter.addSucceedingOperator(new OperatorIDTuple(replaceVar,0));
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.