docs: public synchronized SiteNode findClosestParent(URI uri) {
      	if (uri == null) {
      		return null;
      	}
          SiteNode lastParent = null;
          SiteNode parent = getRoot();
          String folder = "";
          
          try {
          	String host = getHostName(uri);
          	
              // no host yet
              parent = findChild(parent, host);
              if (parent == null) {
                  return null;
          	}
              lastParent = parent;
              
              List<String> path = model.getSession().getTreePath(uri);
              for (int i=0; i < path.size(); i++) {
              	folder = path.get(i);
                  if (folder != null && !folder.equals("")) {
                      if (i == path.size()-1) {
                          lastParent = parent;
                      } else {
                          parent = findChild(parent, folder);
                          if (parent == null) {
                              break;
                          }
                          lastParent = parent;
                      }
                  }
              }
          } catch (URIException e) {
              log.error(e.getMessage(), e);
          }
          
          return lastParent;
      }