Examples of jjtGetChild()


Examples of lupos.sparql1_1.SimpleNode.jjtGetChild()

  public DebugContainerQuery<BasicOperatorByteArray, Node> compileQueryDebugByteArray(
      final String query, final Prefix prefixInstance) throws ParseException {
    final SimpleNode root = StreamSPARQL1_1Parser.parse(query);
    if(root!=null){
      for (int i = 0; i < root.jjtGetNumChildren(); ++i) {
        final Node child = root.jjtGetChild(i); // get current child

        if (child instanceof ASTPrefixDecl) {
          // get prefix...
          final String prefix = ((ASTPrefixDecl) child).getPrefix();
View Full Code Here

Examples of lupos.sparql1_1.SimpleNode.jjtGetChild()

      dcq = this.rdfsStreamQueryToIndexQueryDebugByteArray(query, root_param, prefixInstance);
    } else {
      final SimpleNode root = SPARQL1_1Parser.parse(query);

      for (int i = 0; i < root.jjtGetNumChildren(); ++i) {
        final Node child = root.jjtGetChild(i); // get current child

        if (child instanceof ASTPrefixDecl) {
          // get prefix...
          final String prefix = ((ASTPrefixDecl) child).getPrefix();
View Full Code Here

Examples of lupos.sparql1_1.SimpleNode.jjtGetChild()

    String ret = "";
    final String prefix = (parent instanceof ASTOrderConditions || parent instanceof ASTHaving)? "" : "FILTER";
    final String postfix = (parent instanceof ASTOrderConditions || parent instanceof ASTHaving)? "" : ".\n";
    final int numberOfChildren = n.jjtGetNumChildren();
    for (int i = 0; i < numberOfChildren; i++) {
      final Node currentChild=n.jjtGetChild(i);
      for(int j=0; j<currentChild.jjtGetNumChildren();j++){
        ret += prefix + "(" + this.visitChild(currentChild, j) + ")"+postfix;
      }
    }
    return ret;
View Full Code Here

Examples of opennlp.ccgbank.parse.SimpleNode.jjtGetChild()

          // skipped and the next child is accessed.

          if (child.jjtGetNumChildren() == 1
              && child.type.equals("complexcat")) {

            child = (SimpleNode) child.jjtGetChild(0);

            // The element which is to be added to the xml
            // representation
            leaf = new Element("atomcat");
View Full Code Here

Examples of org.apache.commons.jexl.parser.SimpleNode.jjtGetChild()

        SimpleNode node = (SimpleNode) tree.jjtGetChild(0);

        if( (node instanceof ASTReferenceExpression) ||
            (node instanceof ASTExpressionExpression) )
        {
            node = (SimpleNode) node.jjtGetChild(0);
            Expression e = new ExpressionImpl(expression, node);
       
            return e;
        }
        else
View Full Code Here

Examples of org.apache.commons.jexl2.parser.ASTArrayAccess.jjtGetChild()

            antVar = true;
        } else if (propertyNode instanceof ASTArrayAccess) {
            // first objectNode is the identifier
            objectNode = propertyNode;
            ASTArrayAccess narray = (ASTArrayAccess) objectNode;
            Object nobject = narray.jjtGetChild(0).jjtAccept(this, object);
            if (nobject == null) {
                throw new JexlException(objectNode, "array element is null");
            } else {
                object = nobject;
            }
View Full Code Here

Examples of org.apache.commons.jexl2.parser.ASTArrayAccess.jjtGetChild()

            }
            // can have multiple nodes - either an expression, integer literal or
            // reference
            last = narray.jjtGetNumChildren() - 1;
            for (int i = 1; i < last; i++) {
                objectNode = narray.jjtGetChild(i);
                if (objectNode instanceof JexlNode.Literal<?>) {
                    object = objectNode.jjtAccept(this, object);
                } else {
                    Object index = objectNode.jjtAccept(this, null);
                    object = getAttribute(object, index, objectNode);
View Full Code Here

Examples of org.apache.commons.jexl2.parser.ASTArrayAccess.jjtGetChild()

                } else {
                    Object index = objectNode.jjtAccept(this, null);
                    object = getAttribute(object, index, objectNode);
                }
            }
            property = narray.jjtGetChild(last).jjtAccept(this, null);
        } else {
            throw new JexlException(objectNode, "illegal assignment form");
        }
        // deal with ant variable; set context
        if (antVar) {
View Full Code Here

Examples of org.apache.commons.jexl2.parser.ASTJexlScript.jjtGetChild()

        expr = "#0" + (expr.charAt(0) == '[' ? "" : ".") + expr + ";";
        try {
            parser.ALLOW_REGISTERS = true;
            Scope frame = new Scope("#0");
            ASTJexlScript script = parse(expr, null, frame);
            JexlNode node = script.jjtGetChild(0);
            Interpreter interpreter = createInterpreter(context);
            // set frame
            interpreter.setFrame(script.createFrame(bean));
            return node.jjtAccept(interpreter, null);
        } catch (JexlException xjexl) {
View Full Code Here

Examples of org.apache.commons.jexl2.parser.ASTReference.jjtGetChild()

    /** {@inheritDoc} */
    public Object visit(ASTForeachStatement node, Object data) {
        Object result = null;
        /* first objectNode is the loop variable */
        ASTReference loopReference = (ASTReference) node.jjtGetChild(0);
        ASTIdentifier loopVariable = (ASTIdentifier) loopReference.jjtGetChild(0);
        /* second objectNode is the variable to iterate */
        Object iterableValue = node.jjtGetChild(1).jjtAccept(this, data);
        // make sure there is a value to iterate on and a statement to execute
        if (iterableValue != null && node.jjtGetNumChildren() >= 3) {
            /* third objectNode is the statement to execute */
 
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.