public void removeNode(Object nodeToRemove) {
CriteriaTreeNode node = (CriteriaTreeNode) nodeToRemove;
// only remove the node if it is not the root node
if (node.getParent() != null) {
CriteriaNode parentNode = (CriteriaNode) node.getParent();
parentNode.removeChild(node);
}
}
/**
* Method responsible for indicating if a given part of the tree should be