Package lupos.sparql1_1

Examples of lupos.sparql1_1.ASTAndNode.jjtGetChild()


    final ASTFilterConstraint a = (ASTFilterConstraint) n
        .cloneStillChild(true);
    final ASTFilterConstraint b = (ASTFilterConstraint) n
        .cloneStillChild(true);
    n.jjtGetParent().removeChild(n);
    a.addChild(and.jjtGetChild(0));
    b.addChild(and.jjtGetChild(0));
    return true;
  }

  private boolean nestedOr(final ASTAndNode node) {
View Full Code Here


        .cloneStillChild(true);
    final ASTFilterConstraint b = (ASTFilterConstraint) n
        .cloneStillChild(true);
    n.jjtGetParent().removeChild(n);
    a.addChild(and.jjtGetChild(0));
    b.addChild(and.jjtGetChild(0));
    return true;
  }

  private boolean nestedOr(final ASTAndNode node) {
    final int ind = this.checkNestedOr(node);
View Full Code Here

        // or from the whole DataEditor) must be first inserted!

        final ASTGroupConstraint node = SPARQL1_1Parser.parseGroupGraphPatternsAndRDFTerms(content);

        for (int i = 0; i < node.jjtGetNumChildren(); i++) {
          final Node child = node.jjtGetChild(i);

          if (child instanceof ASTGroupConstraint) {
            final VisualQueryGenerator vqg = new VisualQueryGenerator(
                ((VisualGraphOperatorWithPrefix) this.visualGraphs
                    .get(0)).prefix);
View Full Code Here

      try {
        final ASTGroupConstraint node = SPARQL1_1Parser.parseN3GroupGraphPatternsAndRDFTerms(content);

        for(int i = 0; i < node.jjtGetNumChildren(); i++) {
          final Node child = node.jjtGetChild(i);

          if(child instanceof ASTGroupConstraint) {
            final VisualDataGenerator vdg = new VisualDataGenerator(((VisualGraphOperatorWithPrefix) this.visualGraphs.get(0)).prefix);
            rdfTermToJoin.addAll((Collection<Operator>) child.jjtAccept((SPARQL1_1ParserVisitor) vdg, rdfHash));
          }
View Full Code Here

          // SELECT is not the wildcard *...
          if (!selectChild.isSelectAll()) {
            // walk through select children...
            for (int j = 0; j < selectChild.jjtGetNumChildren(); ++j) {
              final Node selectChildChild = selectChild
              .jjtGetChild(j);

              // child of select is variable...
              if (selectChildChild instanceof ASTVar) {
                final ASTVar var = (ASTVar) selectChildChild;
View Full Code Here

      final Node or = node.jjtGetChild(ind).clone(false);
      node.removeChild(ind);
      parent.addChild(or);
      or.addChild(node);
      final ASTAndNode addAnd = (ASTAndNode) node.cloneStillChild(false);
      node.addChild(or.jjtGetChild(0));
      addAnd.addChild(or.jjtGetChild(0));
    }
    return ind >= 0;
  }
View Full Code Here

      node.removeChild(ind);
      parent.addChild(or);
      or.addChild(node);
      final ASTAndNode addAnd = (ASTAndNode) node.cloneStillChild(false);
      node.addChild(or.jjtGetChild(0));
      addAnd.addChild(or.jjtGetChild(0));
    }
    return ind >= 0;
  }

  private int checkNestedOr(final ASTAndNode node) {
View Full Code Here

    if(externalFunction!=null){
      final Node child1 = node.jjtGetChild(1);
      final int number = child1.jjtGetNumChildren();
      final Object[] args = new Object[number];
      for(int i=0; i<number; i++){
        args[i] = child1.jjtGetChild(i).accept(this, b, d);
      }
      return externalFunction.evaluate(args);
    }
    if (name.toString().startsWith("<http://www.w3.org/2001/XMLSchema#")) {
      return Helper.cast(name.toString(), this.resultOfChildZero(node.jjtGetChild(1), b, d));
View Full Code Here

    // jump over ASTExpressionList!
    final Node child0 = node.jjtGetChild(0);
    if (child0 instanceof ASTNIL || child0.jjtGetNumChildren() == 0) {
      return "";
    }
    Object result = Helper.unlazy(child0.jjtGetChild(0).accept(this, b, d));
    if (Helper.isNumeric(result)) {
      return null;
    }
    for (int i = 1; i < child0.jjtGetNumChildren(); i++) {
View Full Code Here

    if (Helper.isNumeric(result)) {
      return null;
    }
    for (int i = 1; i < child0.jjtGetNumChildren(); i++) {

      final Object child = Helper.unlazy(child0.jjtGetChild(i).accept(this, b, d));

      if (Helper.isNumeric(child)) {
        return null;
      }
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.