private void setOrderSpecPath(SimpleNode node, OrderQueryNode queryNode) { SimpleNode child = (SimpleNode) node.jjtGetChild(0); try { String propName = child.getValue(); if (child.getId() == JJTQNAMELPAR) { // function name // cut off left parenthesis at end propName = propName.substring(0, propName.length() - 1); } Path.Element element = PathFactoryImpl.getInstance().createElement( decode(resolver.getQName(propName))); Path path = getRelativePath(); if (path != null) { path = path.resolve(element); } else { path = PathFactoryImpl.getInstance().create(element); } queryNode.setPath(path); } catch (NameException e) { exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue())); } catch (NamespaceException e) { exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue())); } }
private void setOrderSpecPath(SimpleNode node, OrderQueryNode queryNode) { SimpleNode child = (SimpleNode) node.jjtGetChild(0); try { String propName = child.getValue(); if (child.getId() == JJTQNAMELPAR) { // function name // cut off left parenthesis at end propName = propName.substring(0, propName.length() - 1); } Path.Element element = PathFactoryImpl.getInstance().createElement( decode(resolver.getQName(propName))); Path path = getRelativePath(); if (path != null) { path = path.resolve(element); } else { path = PathFactoryImpl.getInstance().create(element); } queryNode.setPath(path); } catch (NameException e) { exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue())); } catch (NamespaceException e) { exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue())); } }