Package lupos.sparql1_1

Examples of lupos.sparql1_1.ASTAndNode.jjtGetChild()


  protected boolean handleInAndNotIn(final Node node, final Bindings b, final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    final Object arg1 = Helper.unlazy(this.resultOfChildZero(node, b, d));
    final Node child1 = node.jjtGetChild(1);
    for(int i=0; i<child1.jjtGetNumChildren(); i++) {
      final Object arg2 = Helper.unlazy(child1.jjtGetChild(i).accept(this, b, d));
      if(Helper.equals(arg1, arg2)) {
        return true;
      }
    }
    return false;
View Full Code Here


  @Override
  public Object evaluate(final ASTCoalesceFuncNode node, final Bindings b, final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    final Node child0 = node.jjtGetChild(0);
    for(int i=0; i<child0.jjtGetNumChildren(); i++){
      try {
        return Helper.unlazy(child0.jjtGetChild(i).accept(this, b, d));
      } catch(final Error e){
        // ignore...
      } catch(final Exception e){
        // ignore...
      }
View Full Code Here

      final Node n = node.jjtGetChild(i);
      if (n instanceof ASTType) {
        dot = ((ASTType) n).getType();
        slidingNumber = ((ASTType) n).getValue();
        if(dot == ASTType.TYPE.INSTANCESDURATION || dot == ASTType.TYPE.INSTANCESNUMBER){
          iri = ((ASTQuotedURIRef)n.jjtGetChild(0)).getLiteral(true);
        }
      }
    }
    final Window window;
    switch(dot){
View Full Code Here

    final Item[] item = { null, null, null };

    for (int i = 0; i < 3; i++) {
      final Node n = node.jjtGetChild(i);
      if(n instanceof ASTObjectList){
        item[i] = getItem(n.jjtGetChild(0));
      } else {
        item[i] = getItem(n);
      }
    }
    final TriplePattern tpe = new TriplePattern(item[0], item[1], item[2]);
View Full Code Here

      final OperatorConnection connection, final Item graphConstraint,
      final Variable subject, final Variable object, final Node subjectNode, final Node objectNode) {
    if(USE_CLOSURE_AND_PATHLENGTHZERO_OPERATORS){
      Node predicateNode = node.jjtGetChild(0);
      while (predicateNode instanceof ASTOptionalOccurence){
        predicateNode = predicateNode.jjtGetChild(0);
      }
      final BasicOperator startingOperator = predicateNode.accept(this, connection, graphConstraint, subject, object, subjectNode, objectNode);

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

      final Variable subject, final Variable object, final Node subjectNode, final Node objectNode) {
    if(USE_CLOSURE_AND_PATHLENGTHZERO_OPERATORS){
      Node predicateNode = node.jjtGetChild(0);
      while (predicateNode instanceof ASTArbitraryOccurences ||
          predicateNode instanceof ASTArbitraryOccurencesNotZero){
        predicateNode = predicateNode.jjtGetChild(0);
      }
      final BasicOperator startingOperator = predicateNode.accept(this, connection, graphConstraint, subject, object, subjectNode, objectNode);
      // System.out.println(startingOperator);

      Set<Literal> allowedObjects = null;
View Full Code Here

      while (predicateNode instanceof ASTArbitraryOccurences ||
          predicateNode instanceof ASTArbitraryOccurencesNotZero){
        if(predicateNode instanceof ASTArbitraryOccurences){
          return predicateNode.accept(this, connection, graphConstraint, subject, object, subjectNode, objectNode);
        }
        predicateNode = predicateNode.jjtGetChild(0);
      }
      final BasicOperator startingOperator = predicateNode.accept(this, connection, graphConstraint, subject, object, subjectNode, objectNode);

      Set<Literal> allowedObjects = null;
      Set<Literal> allowedSubjects = null;
View Full Code Here

    // Dealing with the HAVING clause
    for (int i = 0; i < numberChildren; i++) {
      final Node childi = node.jjtGetChild(i);
      if (childi instanceof ASTHaving) {
        for (int k = 0; k < childi.jjtGetNumChildren(); k++) {
          if (childi.jjtGetChild(k) instanceof ASTFilterConstraint) {
            final Having filter = new Having((ASTFilterConstraint) childi
                .jjtGetChild(k));
            this.processExistChildren(node, graphConstraint, filter);
            filter.setEvaluator(this.evaluator);
            connection.connectAndSetAsNewOperatorConnection(filter);
View Full Code Here

    for (int i = 0; i < numberChildren; i++) {
      final Node childi = node.jjtGetChild(i);
      if (childi instanceof ASTHaving) {
        for (int k = 0; k < childi.jjtGetNumChildren(); k++) {
          if (childi.jjtGetChild(k) instanceof ASTFilterConstraint) {
            final Having filter = new Having((ASTFilterConstraint) childi
                .jjtGetChild(k));
            this.processExistChildren(node, graphConstraint, filter);
            filter.setEvaluator(this.evaluator);
            connection.connectAndSetAsNewOperatorConnection(filter);
          }
View Full Code Here

      ASTVar variable = null;
      final Node childi = node.jjtGetChild(j);
      onlyAggregations = true;
      if (childi instanceof ASTGroup) {
        for (int i = 0; i < childi.jjtGetNumChildren(); i++) {
          if (childi.jjtGetChild(i) instanceof ASTAdditionNode
              || childi.jjtGetChild(i) instanceof ASTSubtractionNode
              || childi.jjtGetChild(i) instanceof ASTMultiplicationNode
              || childi.jjtGetChild(i) instanceof ASTDivisionNode) {
            throw new Error(
                "Error in GROUP BY statement: AS not found");
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.