Package org.apache.commons.jxpath

Examples of org.apache.commons.jxpath.Pointer.asPath()


                                          attrs);
                    String path = "";
                    if (contextPath != null) {
                        path = contextPath + "/.";
                    }
                    path += ptr.asPath();
                    execute(consumer,
                            form,
                            currentView,
                            path,
                            rootContext,
View Full Code Here


                    Repeater.RepeaterRow thisRow = (Repeater.RepeaterRow) rowIterator.next();
                    // -->  create the path to let the context be created
                    Pointer newRowContextPointer = repeaterContext.createPath(this.rowPath + "[" + indexCount + "]");
                    JXPathContext newRowContext = repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled())
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
                }               
View Full Code Here

                    Repeater.RepeaterRow thisRow = (Repeater.RepeaterRow) rowIterator.next();
                    // -->  create the path to let the context be created
                    Pointer newRowContextPointer = repeaterContext.createPath(this.rowPath + "[" + indexCount + "]");
                    JXPathContext newRowContext = repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled())
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
                }               
View Full Code Here

                        currentContext.getRelativeContext(ptr);
                    String path = "";
                    if (contextPath != null) {
                        path = contextPath + "/.";
                    }
                    path += ptr.asPath();
                    execute(consumer,
                            form,
                            currentView,
                            path,
                            rootContext,
View Full Code Here

                    Pointer ptr = (Pointer)iter.next();
                    JXPathContext localJXPathContext =
                        currentContext.getRelativeContext(ptr);
                    AttributesImpl attrs = new AttributesImpl();
                    attrs.addAttribute(null, REF, REF, "CDATA",
                                       ptr.asPath());
                    consumer.startElement(NS, ITEM, ITEM,
                                          attrs);
                    String path = "";
                    if (contextPath != null) {
                        path = contextPath + "/.";
View Full Code Here

                                          attrs);
                    String path = "";
                    if (contextPath != null) {
                        path = contextPath + "/.";
                    }
                    path += ptr.asPath();
                    execute(consumer,
                            form,
                            currentView,
                            path,
                            rootContext,
View Full Code Here

        List nodeset = new LinkedList();
        Iterator iter = jxcontext_.iteratePointers(xpathSelector);

        while (iter.hasNext()) {
            Pointer nextPointer = (Pointer) iter.next();
            String path = nextPointer.asPath();

            nodeset.add(path);
        }
        return nodeset;
    }
View Full Code Here

            Pointer ptr = (Pointer) pointerIter.next();

            // prepare result Rule
            Rule nextFailedRule = new Rule();

            nextFailedRule.setContext(ptr.asPath());

            // switch to the context of the rule
            JXPathContext localJxpContext = jxpContext.getRelativeContext(ptr);

            // evaluate asserts
View Full Code Here

        Pointer ptr = getContextNodePointer();
        if (ptr == null) {
            return "Empty expression context";
        }
        else {
            return "Expression context [" + getPosition() + "] " + ptr.asPath();
        }
    }

    /**
     * Returns the root context of the path, which provides easy
View Full Code Here

    Iterator<Pointer> params = conn.iteratePointers("*");
    while (params.hasNext())
    {
      Pointer pointer = params.next();
      //JSONObject param = (JSONObject) pointer.getNode();
      String paramName = pointer.asPath().replaceAll(".*name='(.*?)'.*", "$1");
      String placement = ((String) conn.getValue(pointer.asPath() + "/placement", String.class)).toLowerCase();

      if (placement.equals("attrib"))
      {
        if (paramName.equals("id"))
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.