cast URI from input to resource