code: public void deleteAllProperties(CmsDbContext dbc, String resourcename) throws CmsException {
  
          CmsResource resource = null;
          List<CmsResource> resources = new ArrayList<CmsResource>();
  
          try {
              // read the resource
              resource = readResource(dbc, resourcename, CmsResourceFilter.IGNORE_EXPIRATION);
  
              // check the security
              m_securityManager.checkPermissions(
                  dbc,
                  resource,
                  CmsPermissionSet.ACCESS_WRITE,
                  false,
                  CmsResourceFilter.ALL);
  
              // delete the property values
              if (resource.getSiblingCount() > 1) {
                  // the resource has siblings- delete only the (structure) properties of this sibling
                  getVfsDriver(dbc).deletePropertyObjects(
                      dbc,
                      dbc.currentProject().getUuid(),
                      resource,
                      CmsProperty.DELETE_OPTION_DELETE_STRUCTURE_VALUES);
                  resources.addAll(readSiblings(dbc, resource, CmsResourceFilter.ALL));
  
              } else {
                  // the resource has no other siblings- delete all (structure+resource) properties
                  getVfsDriver(dbc).deletePropertyObjects(
                      dbc,
                      dbc.currentProject().getUuid(),
                      resource,
                      CmsProperty.DELETE_OPTION_DELETE_STRUCTURE_AND_RESOURCE_VALUES);
                  resources.add(resource);
              }
          } finally {
              // clear the driver manager cache
              m_monitor.flushCache(CmsMemoryMonitor.CacheType.PROPERTY, CmsMemoryMonitor.CacheType.PROPERTY_LIST);
  
              // fire an event that all properties of a resource have been deleted
              OpenCms.fireCmsEvent(
                  new CmsEvent(
                      I_CmsEventListener.EVENT_RESOURCES_AND_PROPERTIES_MODIFIED,
                      Collections.<String, Object> singletonMap(I_CmsEventListener.KEY_RESOURCES, resources)));
          }
      }
docs: Deletes all property values of a file or folder.<p>
  
  If there are no other siblings than the specified resource,
  both the structure and resource property values get deleted.
  If the specified resource has siblings, only the structure
  property values get deleted.<p>
  
  @param dbc the current database context
  @param resourcename the name of the resource for which all properties should be deleted
  
  @throws CmsException if operation was not successful