@Override public AstElement copyOf() { return new ChildNodeImpl(selectorName, parentPath); } }
@Override public boolean visit(ChildNodeImpl node) { node.setQuery(query); node.bindSelector(source); return true; }
@Override public boolean evaluate() { String p = selector.currentPath(); String local = getLocalPath(p); if (local == null) { // not a local path return false; } // the parent of the root is the root, // so we need to special case this if (PathUtils.denotesRoot(local)) { return false; } String path = normalizePath(parentPath); return PathUtils.getParentPath(local).equals(path); }
@Override public void restrict(FilterImpl f) { if (selector.equals(f.getSelector())) { String path = normalizePath(parentPath); f.restrictPath(path, Filter.PathRestriction.DIRECT_CHILDREN); } }
@Override public boolean evaluate() { String p = selector.currentPath(); String local = getLocalPath(p); if (local == null) { // not a local path return false; } // the parent of the root is the root, // so we need to special case this if (PathUtils.denotesRoot(local)) { return false; } String path = normalizePath(parentPath); return PathUtils.getParentPath(local).equals(path); }
@Override public void restrict(FilterImpl f) { if (selector.equals(f.getSelector())) { String path = normalizePath(parentPath); f.restrictPath(path, Filter.PathRestriction.DIRECT_CHILDREN); } }
@Override public boolean visit(ChildNodeImpl node) { node.setQuery(query); node.bindSelector(source); return true; }
@Override public boolean evaluate() { String p = selector.currentPath(); String local = getLocalPath(p); if (local == null) { // not a local path return false; } // the parent of the root is the root, // so we need to special case this if (PathUtils.denotesRoot(local)) { return false; } String path = normalizePath(parentPath); return PathUtils.getParentPath(local).equals(path); }
@Override public AstElement copyOf() { return new ChildNodeImpl(selectorName, parentPath); } }
@Override public void restrict(FilterImpl f) { if (selector.equals(f.getSelector())) { String path = normalizePath(parentPath); f.restrictPath(path, Filter.PathRestriction.DIRECT_CHILDREN); } }
@Override public boolean visit(ChildNodeImpl node) { node.setQuery(query); node.bindSelector(source); return true; }
@Override public AstElement copyOf() { return new ChildNodeImpl(selectorName, parentPath); } }
public ChildNodeImpl childNode(String selectorName, String path) { return new ChildNodeImpl(selectorName, path); }
public ChildNodeImpl childNode(String selectorName, String path) { return new ChildNodeImpl(selectorName, path); }
public ChildNodeImpl childNode(String selectorName, String path) { return new ChildNodeImpl(selectorName, path); }