code: protected Node getContentNode(Session session, String path)
              throws RepositoryException {
          Node node = null;
          try {
              Item item = session.getItem(path);
              if (item.isNode()) {
                  node = (Node) item;
              } else {
                  node = item.getParent();
              }
              while (node != null
                      && !isTargetNode(node)
                      && (path = getTargetPath(node)) != null) {
                  node = node.getParent();
              }
          } catch (PathNotFoundException ignore) {
              // probably removed... ignore
          }
          return path != null ? node : null;
      }
docs: determines the target node (the node to perform the change) of one event item