@GET
@Produces({BASE_JSON_MEDIA_TYPE, BASE_XML_MEDIA_TYPE})
public Response listAllResources() {
RootRepresentation root = new RootRepresentation(REP_TYPE, uriInfo);
for (TopLevelResource resource : resources) {
root.addLink(
new ResourceLink(
toResourceName(resource.getResourceClass()),
uriInfo.getAbsolutePathBuilder().path(resource.getResourceClass()).build(),
resource.getResourceMediaType()));
}