siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
SiteStructure structure = siteManager.getSiteStructure(doc.getFactory(), publication,
doc.getArea());
if (structure instanceof SiteTree) {
SiteTreeNode node = (SiteTreeNode) doc.getLink().getNode();
SiteTreeNode[] siblings = null;
String direction = getParameterAsString(DIRECTION);
if (direction.equals(UP)) {
siblings = node.getPrecedingSiblings();
} else if (direction.equals(DOWN)) {
siblings = node.getNextSiblings();
} else {
addErrorMessage(MESSAGE_DIRECTION_UNKNOWN, new String[] { direction });
}
if (siblings != null && siblings.length == 0) {