if (node.jjtGetNumChildren() > 0) {
SimpleNode child = (SimpleNode) node.jjtGetChild(0);
if (child.getId() == JJTQNAME || child.getId() == JJTQNAMEFORITEMTYPE) {
try {
if (queryNode.getType() == QueryNode.TYPE_LOCATION) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
if (name.equals(JCR_ROOT)) {
name = LocationStepQueryNode.EMPTY_NAME;
}
((LocationStepQueryNode) queryNode).setNameTest(name);
} else if (queryNode.getType() == QueryNode.TYPE_DEREF) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
((DerefQueryNode) queryNode).setRefProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_RELATION) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
((RelationQueryNode) queryNode).setProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_PATH) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
root.addSelectProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_ORDER) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
root.getOrderNode().addOrderSpec(name, true);
} else if (queryNode.getType() == QueryNode.TYPE_TEXTSEARCH) {
QName name = ISO9075.decode(NameFormat.parse(child.getValue(), resolver));
((TextsearchQueryNode) queryNode).setPropertyName(name);
}
} catch (IllegalNameException e) {
exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
} catch (UnknownPrefixException e) {