/** * Build up this event role with a person. * @param person The person. * @return this. */ public EventRole person(ResourceReference person) { setPerson(person); return this; }
/** * Build up this event role with a person. * @param person The person. * @return this. */ public EventRole person(Person person) { if (person.getId() == null) { throw new IllegalStateException("Cannot reference person: no id."); } setPerson(new ResourceReference(URI.create("#" + person.getId()))); return this; }