code: public void assignRole(XEvent event, String role) {
  		if (role != null && role.trim().length() > 0) {
  			XAttributeLiteral attr = (XAttributeLiteral) ATTR_ROLE.clone();
  			attr.setValue(role.trim());
  			event.getAttributes().put(KEY_ROLE, attr);
  		}
  	}
docs: Assigns the role attribute value for a given event.
  
  @param event
  Event to be modified.
  @param resource
  Role string to be assigned.