if (sortByNode != null) {
nlProps = (NodeList)xpath.evaluate("ogc:SortProperty",sortByNode,XPathConstants.NODESET);
}
if ((nlProps != null) && (nlProps.getLength() > 0)) {
for (int i=0; i<nlProps.getLength(); i++) {
Sortable sortable = this.parsePropertyName(nlProps.item(i),xpath).asSortable();
Node ndDir = (Node)xpath.evaluate("ogc:SortOrder",nlProps.item(i),XPathConstants.NODE);
if (ndDir != null) {
String sSortDir = ndDir.getTextContent();
try {
LOGGER.finer("Setting sort direction:"+sSortDir);
sortable.setDirection(Sortable.SortDirection.from(sSortDir));
} catch (IllegalArgumentException e) {
String msg = "This parameter value is not supported: "+sSortDir;
throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,"SortOrder",msg);
}
}