wro4j-core/src/main/java/ro/isdc/wro/model/resource/Resource.java
public static Resource create(final String uri) {
    final String resourceExtension = FilenameUtils.getExtension(uri);
    final ResourceType type = ResourceType.get(resourceExtension);
    return new Resource(uri, type);
  }
public static Resource create(final String uri) {
    final String resourceExtension = FilenameUtils.getExtension(uri);
    final ResourceType type = ResourceType.get(resourceExtension);
    return new Resource(uri, type);
  }
Creates a resource and set the correct {@link ResourceType} based on uri extension. If resourceType cannot be
identified an exception is thrown.

@param uri of the resource to create.
@return Resource with the provided uri and correct type.