Package com.google.common.collect

Examples of com.google.common.collect.BstTesting$SimpleNode


      if(this.predicates.get(child).size() == index) {
        this.predicates.get(child).add(null);
      }

      // parse new value...
      SimpleNode node = SPARQL1_1Parser.parseVerbWithoutVar(predicate, this.prefix.getPrefixNames());

      // remove old value...
      if(this.predicates.get(child).get(index) != null) {
        this.predicates.get(child).remove(index);
      }
View Full Code Here


    }
  }

  public void applyChange(String value) throws ModificationException {
    try {
      SimpleNode node = SPARQL1_1Parser.parseGraphTerm(value, this.prefix.getPrefixNames());

      this.item = this.getItem(node);
    }
    catch(Throwable t) {
      this.handleParseError(t);
View Full Code Here

    }
  }

  @Override
  public String visit(final ASTFilterConstraint node) {
    final Node n = new SimpleNode(0);
    final Node parent = node.jjtGetParent();
    n.jjtAddChild(node, 0);
    node.jjtSetParent(n);
    parent.replaceChild2(node, n);
    n.jjtSetParent(parent);
    this.applyRules(node);
    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

      }
    }

   
    private Literal getLiteral(String content) throws ParseException {
        final SimpleNode node = SPARQL1_1Parser.parseGraphTerm(content, null);
        return LazyLiteral.getLiteral(node, false);
    }
View Full Code Here

  }


  public static Literal getLiteral(final String content, final boolean allowLazyLiteral) {
    try {
      final SimpleNode node = SPARQL1_1Parser.parseGraphTerm(content, null);
      return getLiteral(node, allowLazyLiteral);
    } catch (final Throwable t) {
      System.err.println("Trying to parse string "+content+" for transforming it to a literal...");
      System.err.println(t);
      t.printStackTrace();
View Full Code Here

TOP

Related Classes of com.google.common.collect.BstTesting$SimpleNode

Copyright © 2018 www.massapicom. 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.