Examples of ASTStringLiteral


Examples of lupos.sparql1_1.ASTStringLiteral

    if (literal != null) {
      return literal;
    }

    if (n instanceof ASTStringLiteral) {
      final ASTStringLiteral lit = (ASTStringLiteral) n;
      final String quotedContent = lit.getStringLiteral();

      literal = (allowLazyLiteral) ?
          LiteralFactory.createLiteral(quotedContent)
          : LiteralFactory.createLiteralWithoutLazyLiteral(quotedContent);
    } else if (n instanceof ASTInteger) {
      final ASTInteger lit = (ASTInteger) n;
      final String content = String.valueOf(lit.getValue());

      try {
        literal = (allowLazyLiteral) ? LiteralFactory
            .createTypedLiteral("\"" + content + "\"",
                "<http://www.w3.org/2001/XMLSchema#integer>")
            : TypedLiteralOriginalContent.createTypedLiteral("\""
                + content + "\"",
                "<http://www.w3.org/2001/XMLSchema#integer>");
      } catch (final URISyntaxException e) {
        literal = (allowLazyLiteral) ? LiteralFactory
            .createLiteral(content) : LiteralFactory
            .createLiteralWithoutLazyLiteral(content);
      }
    } else if (n instanceof ASTFloatingPoint) {
      final ASTFloatingPoint lit = (ASTFloatingPoint) n;
      final String content = lit.getValue();

      try {
        if (content.contains("e") || content.contains("E")) {
          literal = (allowLazyLiteral) ? LiteralFactory
              .createTypedLiteral("\"" + content + "\"",
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.