Examples of jjtGetChild()


Examples of lupos.sparql1_1.ASTGroupConstraint.jjtGetChild()

        // 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

Examples of lupos.sparql1_1.ASTGroupConstraint.jjtGetChild()

      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

Examples of lupos.sparql1_1.ASTSelectQuery.jjtGetChild()

          // 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

Examples of lupos.sparql1_1.Node.jjtGetChild()

      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

Examples of lupos.sparql1_1.Node.jjtGetChild()

      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

Examples of lupos.sparql1_1.Node.jjtGetChild()

    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

Examples of lupos.sparql1_1.Node.jjtGetChild()

    // 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

Examples of lupos.sparql1_1.Node.jjtGetChild()

    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

Examples of lupos.sparql1_1.Node.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

Examples of lupos.sparql1_1.Node.jjtGetChild()

  @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
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.