@Override public boolean evaluate() { String a = ancestorSelector.currentPath(); String d = descendantSelector.currentPath(); return PathUtils.isAncestor(a, d); }
@Override public boolean evaluate() { String a = ancestorSelector.currentPath(); String d = descendantSelector.currentPath(); return PathUtils.isAncestor(a, d); }
@Override public boolean evaluate() { String a = ancestorSelector.currentPath(); String d = descendantSelector.currentPath(); return PathUtils.isAncestor(a, d); }
@Override public boolean evaluate() { String p = parentSelector.currentPath(); String c = childSelector.currentPath(); // the parent of the root is the root, // so we need to special case this return !PathUtils.denotesRoot(c) && PathUtils.getParentPath(c).equals(p); }
/** * Get the tree at the current path. * * @return the current tree, or null */ public Tree currentTree() { String path = currentPath(); if (path == null) { return null; } return getTree(path); }
@Override public boolean evaluate() { String p = normalizePath(path); return selector.currentPath().equals(p); }
@Override public boolean evaluate() { String p = parentSelector.currentPath(); String c = childSelector.currentPath(); // the parent of the root is the root, // so we need to special case this return !PathUtils.denotesRoot(c) && PathUtils.getParentPath(c).equals(p); }
@Override public boolean evaluate() { String p = normalizePath(path); return selector.currentPath().equals(p); }
/** * Get the tree at the current path. * * @return the current tree, or null */ public Tree currentTree() { String path = currentPath(); if (path == null) { return null; } return getTree(path); }
@Override public boolean evaluate() { String p1 = selector1.currentPath(); String p2 = selector2.currentPath(); if (selector2Path.equals(".")) { return p1.equals(p2); } String pn = normalizePath(selector2Path); String p = PathUtils.concat(p2, pn); return p.equals(p1); }
@Override public boolean evaluate() { String p1 = selector1.currentPath(); String p2 = selector2.currentPath(); if (selector2Path.equals(".")) { return p1.equals(p2); } String pn = normalizePath(selector2Path); String p = PathUtils.concat(p2, pn); return p.equals(p1); }
@Override public boolean evaluate() { String p = normalizePath(path); return selector.currentPath().equals(p); }
@Override public boolean evaluate() { String p1 = selector1.currentPath(); String p2 = selector2.currentPath(); if (selector2Path.equals(".")) { return p1.equals(p2); } String pn = normalizePath(selector2Path); String p = PathUtils.concat(p2, pn); return p.equals(p1); }
@Override public boolean evaluate() { String p = parentSelector.currentPath(); String c = childSelector.currentPath(); // the parent of the root is the root, // so we need to special case this return !PathUtils.denotesRoot(c) && PathUtils.getParentPath(c).equals(p); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); // TODO reverse namespace remapping? return PropertyValues.newName(name); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); // TODO reverse namespace remapping? return PropertyValues.newName(name); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); // TODO reverse namespace remapping? return PropertyValues.newName(name); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); String localName = getLocalName(name); // TODO reverse namespace remapping? return PropertyValues.newString(localName); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); String localName = getLocalName(name); // TODO reverse namespace remapping? return PropertyValues.newString(localName); }
@Override public PropertyValue currentProperty() { String path = selector.currentPath(); if (path == null) { return null; } String name = PathUtils.getName(path); String localName = getLocalName(name); // TODO reverse namespace remapping? return PropertyValues.newString(localName); }