Added a convenience constructor to Resource to instantiate Resources loaded from the database