Parse resource according to their type.