add setPath method to HasContentType class and instances