class GuestAtomFeed {

    @GET
    @Produces(MediaType.APPLICATION_ATOM_XML)
    public Feed getGuestFeed(@Context UriInfo uriInfo) {
        Feed feed = abdera.newFeed();

        feed.setId("tag:koenighotze.org,2015:/guest");
        feed.setTitle("Guests");
        feed.setUpdated(new Date());

        final String baseUri = uriInfo.getBaseUri().toString();
        feed.addLink(baseUri + "feed", "self"); // todo self ref
        guestService.getAllGuests().stream().forEach(guest -> {
            Entry entry = feed.addEntry();
            entry.setId(guest.getId() + "");
            entry.setUpdated(from(guest.getLastUpdate().toInstant(UTC)));
            entry.setAttributeValue("Version", guest.getVersion() + "");
            entry.addLink(baseUri + "guests/" + guest.getPublicId());
        });

        return feed;
    }

    public  GuestAtomFeed();
    @Inject public  GuestAtomFeed(GuestService guestService, Abdera abdera);

}