Package org.exist.util

Examples of org.exist.util.OrderedLinkedList$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

                XQueryContext context) {
            this.proxy = proxy;
            try {
                final Sequence seq = expr.eval(proxy);
                final StringBuilder buf = new StringBuilder();
                final OrderedLinkedList strings = new OrderedLinkedList();
                Item item;
                for(final SequenceIterator i = seq.iterate(); i.hasNext(); ) {
                    item = i.nextItem();
                    strings.add(new OrderedLinkedList.SimpleNode(item.getStringValue().toUpperCase()));
                }
                for (final Iterator<OrderedLinkedList.SimpleNode> j = strings.iterator(); j.hasNext();)
                    buf.append((j.next()).getData());
                value = buf.toString();
            } catch (final XPathException e) {
                LOG.warn(e.getMessage(), e); //TODO : throw exception ! -pb
            }
View Full Code Here

TOP

Related Classes of org.exist.util.OrderedLinkedList$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.