Changed resource type from class String to a more structured one, the
enum ResourceType.