public Set<ResourceTypes> getResourceTypes() {
        if (resourceTypes != null) {
            return resourceTypes;
        }
        if (resources == null) {
            return Set.of();
        }
        Set<ResourceTypes> resourceTypes = new HashSet<>();
        for (Resource resource : resources) {
            String resourceUrl = resource.getTargetUrl();
            String resourceType = resourceUrl.substring(0, resourceUrl.indexOf('/'));
            resourceTypes.add(ResourceTypes.of(resourceType));
        }

        return resourceTypes;
    }
Review resource url to review: files/review-bucket/folder/file.txt
server/src/main/java/com/epam/aidial/core/server/data/Publication.java