code: private boolean checkDeletedParentFolder(CmsDbContext dbc, List<CmsResource> deletedFolders, CmsResource res) {
  
          String parentPath = CmsResource.getParentFolder(res.getRootPath());
  
          if (parentPath == null) {
              // resource has no parent
              return false;
          }
  
          CmsResource parent;
          try {
              parent = readResource(dbc, parentPath, CmsResourceFilter.ALL);
          } catch (Exception e) {
              // failure: if we cannot read the parent, we should not publish the resource
              return false;
          }
  
          if (!parent.getState().isDeleted()) {
              // parent is not deleted
              return false;
          }
  
          for (int j = 0; j < deletedFolders.size(); j++) {
              if ((deletedFolders.get(j)).getStructureId().equals(parent.getStructureId())) {
                  // parent is deleted, and it will get published
                  return true;
              }
          }
  
          // parent is new, but it will not get published
          return false;
      }
docs: Checks the parent of a resource during publishing.<p>
  
  @param dbc the current database context
  @param deletedFolders a list of deleted folders
  @param res a resource to check the parent for
  
  @return <code>true</code> if the parent resource will be deleted during publishing