/** * Adds a path element to the existing relative path. To add a path element * which matches all node names use {@link #STAR_NAME_TEST}. * * @param element the path element to append. */ public void addPathElement(Path.Element element) { LocationStepQueryNode step = factory.createLocationStepQueryNode(relPath); if (element.getName().equals(STAR_NAME_TEST)) { step.setNameTest(null); } else { step.setNameTest(element.getName()); } relPath.addPathStep(step); }
/** * Adds a path element to the existing relative path. To add a path element * which matches all node names use {@link #STAR_NAME_TEST}. * * @param element the path element to append. */ public void addPathElement(Path.Element element) { LocationStepQueryNode step = factory.createLocationStepQueryNode(relPath); if (element.getName().equals(STAR_NAME_TEST)) { step.setNameTest(null); } else { step.setNameTest(element.getName()); } relPath.addPathStep(step); }
step.setNameTest(null); step.setIncludeDescendants(true); pathNode.addPathStep(step); } else { try { step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
step.setNameTest(null); step.setIncludeDescendants(true); pathNode.addPathStep(step); } else { try { step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
PathQueryNode pathNode = (PathQueryNode) queryNode; pathNode.addPathStep(createDerefQueryNode(node, descendant, pathNode)); } else if (queryNode.getType() == QueryNode.TYPE_RELATION) { RelationQueryNode relNode = (RelationQueryNode) queryNode; DerefQueryNode deref = createDerefQueryNode(node, descendant, relNode.getRelativePath()); relNode.getRelativePath().addPathStep(deref); } else { exceptions.add(new InvalidQueryException("Unsupported location for jcr:deref()"));
PathQueryNode pathNode = (PathQueryNode) queryNode; pathNode.addPathStep(createDerefQueryNode(node, descendant, pathNode)); } else if (queryNode.getType() == QueryNode.TYPE_RELATION) { RelationQueryNode relNode = (RelationQueryNode) queryNode; DerefQueryNode deref = createDerefQueryNode(node, descendant, relNode.getRelativePath()); relNode.getRelativePath().addPathStep(deref); } else { exceptions.add(new InvalidQueryException("Unsupported location for jcr:deref()"));