@Produces({ BASE_JSON_MEDIA_TYPE, BASE_XML_MEDIA_TYPE })
public Response search() {
if(searchRepository.get() == null) {
return Response.status(Response.Status.SERVICE_UNAVAILABLE).build();
}
Collection<Conference> conferences = searchRepository.get().search(new ConferenceCriteria());
Collection<ConferenceRepresentation> conferenceRepresentations = getConverter().from(getUriInfo(), (Collection)conferences);
return Response.ok(new GenericEntity<Collection<ConferenceRepresentation>>(conferenceRepresentations){})
.type(
matchMediaType(CONFERENCE_XML_MEDIA_TYPE, CONFERENCE_JSON_MEDIA_TYPE))