Package lupos.sparql1_1

Examples of lupos.sparql1_1.ASTAndNode.jjtGetChild()


      }
    } else if (n instanceof ASTDoubleCircumflex) {
      if (n.jjtGetNumChildren() != 2) {
        System.err.println(n + " is expected to have 2 children!");
      } else {
        final String content = getLiteral(n.jjtGetChild(0), false).toString();
        final String type = getLiteral(n.jjtGetChild(1), false).toString();

        try {
          literal = (allowLazyLiteral) ? LiteralFactory
              .createTypedLiteral(content, type)
View Full Code Here


    } else if (n instanceof ASTDoubleCircumflex) {
      if (n.jjtGetNumChildren() != 2) {
        System.err.println(n + " is expected to have 2 children!");
      } else {
        final String content = getLiteral(n.jjtGetChild(0), false).toString();
        final String type = getLiteral(n.jjtGetChild(1), false).toString();

        try {
          literal = (allowLazyLiteral) ? LiteralFactory
              .createTypedLiteral(content, type)
              : TypedLiteralOriginalContent.createTypedLiteral(
View Full Code Here

                  .createLiteralWithoutLazyLiteral(content
                      + "^^" + type);
        }
      }
    } else if (n instanceof ASTLangTag) {
      final String content = getLiteral(n.jjtGetChild(0), false).toString();
      final String lang = ((ASTLangTag) n).getLangTag();
      literal = (allowLazyLiteral) ? LiteralFactory
          .createLanguageTaggedLiteral(content, lang)
          : LanguageTaggedLiteralOriginalLanguage
              .createLanguageTaggedLiteral(content, lang);
View Full Code Here

        literal = (allowLazyLiteral) ? LiteralFactory.createLiteral("<"
            + name + ">") : LiteralFactory
            .createLiteralWithoutLazyLiteral("<" + name + ">");
      }
    } else if(n instanceof ASTObjectList){
      literal = getLiteral(n.jjtGetChild(0), allowLazyLiteral);
    } else {
      System.err.println("Unexpected type! "
          + n.getClass().getSimpleName());
    }
View Full Code Here

  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

      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

    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

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.