public Object visit(LocationStepQueryNode node, Object data) throws RepositoryException { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ LocationStepQueryNode: "); buffer.append(" NodeTest="); if (node.getNameTest() == null) { buffer.append("*"); } else { buffer.append(node.getNameTest()); } buffer.append(" Descendants=").append(node.getIncludeDescendants()); buffer.append(" Index="); if (node.getIndex() == LocationStepQueryNode.NONE) { buffer.append("NONE"); } else if (node.getIndex() == LocationStepQueryNode.LAST) { buffer.append("last()"); } else { buffer.append(node.getIndex()); } buffer.append("\n"); traverse(node.getOperands(), buffer); return buffer; }
public Object visit(LocationStepQueryNode node, Object data) throws RepositoryException { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ LocationStepQueryNode: "); buffer.append(" NodeTest="); if (node.getNameTest() == null) { buffer.append("*"); } else { buffer.append(node.getNameTest()); } buffer.append(" Descendants=").append(node.getIncludeDescendants()); buffer.append(" Index="); if (node.getIndex() == LocationStepQueryNode.NONE) { buffer.append("NONE"); } else if (node.getIndex() == LocationStepQueryNode.LAST) { buffer.append("last()"); } else { buffer.append(node.getIndex()); } buffer.append("\n"); traverse(node.getOperands(), buffer); return buffer; }
public Object visit(LocationStepQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; if (node.getNameTest() == null) { sb.append("%"); } else { if (node.getNameTest().getLocalName().length() > 0) { try { sb.append(resolver.getJCRName(node.getNameTest())); } catch (NamespaceException e) { exceptions.add(e); } if (node.getIndex() == LocationStepQueryNode.NONE) { sb.append("[%]"); } else if (node.getIndex() == 1) { // do nothing } else { sb.append('[').append(node.getIndex()).append(']'); } } else { // empty name test indicates root node } } return sb; }
public Object visit(LocationStepQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; if (node.getNameTest() == null) { sb.append("%"); } else { if (node.getNameTest().getLocalName().length() > 0) { try { sb.append(resolver.getJCRName(node.getNameTest())); } catch (NamespaceException e) { exceptions.add(e); } if (node.getIndex() == LocationStepQueryNode.NONE) { sb.append("[%]"); } else if (node.getIndex() == 1) { // do nothing } else { sb.append('[').append(node.getIndex()).append(']'); } } else { // empty name test indicates root node } } return sb; }
step.setNameTest(steps[i].getNameTest()); step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
step.setNameTest(steps[i].getNameTest()); step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
if (node.getIndex() == LocationStepQueryNode.NONE) { context = new DescendantSelfAxisQuery(context, false); andQuery.add(context, Occur.MUST); context = new DescendantSelfAxisQuery(context, true); andQuery.add(new ChildAxisQuery(sharedItemMgr, context, null, node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST); nameTest.getName(), node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST); } else { node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST);
if (node.getIndex() == LocationStepQueryNode.NONE) { context = new DescendantSelfAxisQuery(context, false); andQuery.add(context, Occur.MUST); context = new DescendantSelfAxisQuery(context, true); andQuery.add(new ChildAxisQuery(sharedItemMgr, context, null, node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST); nameTest.getName(), node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST); } else { node.getIndex(), indexFormatVersion, nsMappings), Occur.MUST);